GATE CS Operating System questions
Practise Operating System questions for GATE CS. Explore official PYQs and original subject-wise quizzes, check answers and view available solutions. Free, no sign-in.
Trace the state changes explicitly. For scheduling, memory and synchronisation questions, record the given policy before calculating the result.
Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.
20 on this page
Assume that there are page frames which are initially empty. If the page reference string is the number of page faults using the optimal replacement policy is__________.
Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds. …
An operating system uses the Banker's algorithm for deadlock avoidance when managing the allocation of three resource types and to three processes and The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type allocated to each process and the Max …
Which one of the following is FALSE?
Suppose a disk has cylinders, numbered from to . At some time the disk arm is at cylinder , and there is a queue of disk access requests for cylinders and . If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder is serviced after …
Consider the main memory system that consists of memory modules attached to the system bus, which is one word wide. When a write request is made, the bus is occupied for nanoseconds (ns) by the data, address, and control signals. During the same ns, and for ns thereafter, the addressed memory module executes one cycle accepting …
A computer has twenty physical page frames which contain pages numbered through . Now a program accesses the pages numbered in that order, and repeats the access sequence THRICE. Which one of the following page replacement policies experiences the same number of page faults as the optimal page replacement policy for …
Three processes , and each execute a loop of iterations. In each iteration of the loop, a process performs a single computation that requires CPU milliseconds and then initiates a single I/O operation that lasts for milliseconds. It is assumed that the computer where the processes execute has sufficient number of …
Consider the procedure below for the Producer-Consumer problem which uses semaphores: semaphore n = 0; semaphore s = 1; void producer() { while(true) { produce(); semWait(s); addToBuffer(); semSignal(s); semSignal(n); } } void consumer() { while(true) { semWait(s); semWait(n); removeFromBuffer(); semSignal(s); consume(); } } Which one of the following is …
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is bytes in size. Given a bytes disk on which the file system is stored and data block size is bytes, the maximum size of a file that can be stored on this disk in units of bytes is _________.
Consider a paging hardware with a . Assume that the entire page table and all the pages are in the physical memory. It takes milliseconds to search the and milliseconds to access the physical memory. If the hit ratio is , the effective memory access time (in milliseconds) is _________.
An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds): …
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
A system uses page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below?
A computer uses virtual address, physical address, and a three–level paged page table organization. The page table base register stores the base address of the first-level table which occupies exactly one page. Each entry of stores the base address of a page of the second-level table …
A certain computation generates two arrays a and b such that for and for . Suppose this computation is decomposed into two concurrent processes and such that computes the array and computes the array . The processes employ two binary semaphores …
A shared variable , initialized to zero, is operated on by four concurrent processes as follows. Each of the processes and reads from memory, increments by one, stores it to memory, and then terminates. Each of the processes and reads from memory, decrements by two, stores it to memory, and then …
Consider a hard disk with recording surfaces having cylinders and each cylinder contains sectors . Data storage capacity in each sector is bytes. Data are organized cylinder-wise and the addressing format is . A …
Three concurrent processes , , and execute three different code segments that access and update certain shared variables. Process executes the operation (i.e., ) on semaphores , and ; process executes the operation on semaphores , and ; process executes the …
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with zero (the lowest priority). The scheduler re-evaluates the process priorities every time units and decides the next process to schedule. Which one of the following is TRUE if the processes have no I/O operations and all arrive at time zero?
