Topics

All Operating Systems questions

  1. GATE CS 2026 Set 1MSQ1 markEasy (estimate)

    GATE CS 2026 Set 1, Q.29

    With respect to deadlocks in an operating system, which of the following statements is/are FALSE?

    Deadlock Prevention, Avoidance and Detection

  2. GATE CS 2026 Set 1NAT1 markEasy (estimate)

    GATE CS 2026 Set 1, Q.35

    Consider a system consisting of instances of a resource , being shared by 5 processes. Assume that each process requires a maximum of two instances of resource and a...

    Deadlock Prevention, Avoidance and Detection

  3. GATE CS 2026 Set 1MSQ2 marksMedium (estimate)

    GATE CS 2026 Set 1, Q.54

    Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory is a physical address. The MMU has a translation lookasi...

    Memory Management and Virtual Memory

  4. GATE CS 2026 Set 1NAT2 marksMedium (estimate)

    GATE CS 2026 Set 1, Q.59

    Consider a hard disk with a rotational speed of rpm. The time to move the read/write head from a track to its adjacent track is millisecond. Initially, the head is o...

    File Systems, I/O and Disk Scheduling

  5. GATE CS 2026 Set 1NAT2 marksEasy (estimate)

    GATE CS 2026 Set 1, Q.63

    Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always successful in creating a...

    Processes, Threads and System Calls

  6. GATE CS 2026 Set 1NAT2 marksMedium (estimate)

    GATE CS 2026 Set 1, Q.64

    Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type, Controllers (C), requires a CPU bur...

    CPU Scheduling

  7. GATE CS 2026 Set 2MCQ1 markEasy (estimate)

    GATE CS 2026 Set 2, Q.23

    Which one of the following CPU scheduling algorithms cannot be preemptive?

    CPU Scheduling

  8. GATE CS 2026 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2026 Set 2, Q.51

    Consider three processes P1, P2, and P3 running identical code, as shown in the pseudocode below. A and B are two binary semaphores initialized to 1 and 0, respectively. X is a...

    Process Synchronization and Concurrency

  9. GATE CS 2026 Set 2NAT2 marksMedium (estimate)

    GATE CS 2026 Set 2, Q.53

    To keep track of free blocks in a file system, one of the two approaches is generally used - using bitmaps (bit vectors) or using linked lists. Consider that the linked list app...

    File Systems, I/O and Disk Scheduling

  10. GATE CS 2026 Set 2NAT2 marksMedium (estimate)

    GATE CS 2026 Set 2, Q.54

    A system has a Translation Lookaside Buffer (TLB) that has a reach of 1 MB. TLB reach is defined as the total amount of physical memory that can be accessed through the TLB entr...

    Memory Management and Virtual Memory

  11. GATE CS 2026 Set 2NAT2 marksEasy (estimate)

    GATE CS 2026 Set 2, Q.55

    Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 8 holes in the memory of sizes 20 KB, 4 KB, 25 KB, 18 KB, 7...

    Memory Management and Virtual Memory

  12. GATE CS 2025 Set 1MCQ1 markEasy (estimate)

    GATE CS 2025 Set 1, Q.14

    Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Assuming that the memory is byte addressable...

    Memory Management and Virtual Memory

  13. GATE CS 2025 Set 1NAT1 markEasy (estimate)

    GATE CS 2025 Set 1, Q.29

    Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into I/O queue whenever an I/O related operation is performed. Assume that...

    Processes, Threads and System Calls

  14. GATE CS 2025 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2025 Set 1, Q.38

    A computer has two processors, and . Four processes with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and...

    CPU Scheduling

  15. GATE CS 2025 Set 1NAT2 marksMedium (estimate)

    GATE CS 2025 Set 1, Q.51

    A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to st...

    File Systems, I/O and Disk Scheduling

  16. GATE CS 2025 Set 1NAT2 marksMedium (estimate)

    GATE CS 2025 Set 1, Q.54

    In optimal page replacement algorithm, information about all future page references is available to the operating system (OS). A modification of the optimal page replacement alg...

    Memory Management and Virtual Memory

  17. GATE CS 2025 Set 2MCQ1 markEasy (estimate)

    GATE CS 2025 Set 2, Q.26

    Processes arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Sh...

    CPU Scheduling

  18. GATE CS 2025 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2025 Set 2, Q.47

    Consider a demand paging system with three frames, and the following page reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2. The contents of the frames are as follows initially and...

    Memory Management and Virtual Memory

  19. GATE CS 2025 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2025 Set 2, Q.48

    consists of all active processes in an operating system. consists of single instances of distinct types of resources in...

    Deadlock Prevention, Avoidance and Detection

  20. GATE CS 2025 Set 2NAT2 marksEasy (estimate)

    GATE CS 2025 Set 2, Q.58

    A computer system supports a logical address space of bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a…

    Memory Management and Virtual Memory

  21. GATE CS 2024 Set 1MSQ1 markEasy (estimate)

    GATE CS 2024 Set 1, Q.24

    Which of the following statements about threads is/are TRUE?

    Processes, Threads and System Calls

  22. GATE CS 2024 Set 1MSQ1 markEasy (estimate)

    GATE CS 2024 Set 1, Q.25

    Which of the following process state transitions is/are NOT possible?

    Processes, Threads and System Calls · CPU Scheduling

  23. GATE CS 2024 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2024 Set 1, Q.40

    Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen...

    Process Synchronization and Concurrency

  24. GATE CS 2024 Set 1NAT2 marksEasy (estimate)

    GATE CS 2024 Set 1, Q.57

    Consider the following code snippet using the fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully wi...

    Processes, Threads and System Calls

  25. GATE CS 2024 Set 1NAT2 marksEasy (estimate)

    GATE CS 2024 Set 1, Q.62

    Consider a memory management system that uses a page size of 2 KB. Assume that both the physical and virtual addresses start from 0. Assume that the pages 0, 1, 2, and 3 are sto...

    Memory Management and Virtual Memory

  26. GATE CS 2024 Set 2MSQ1 markEasy (estimate)

    GATE CS 2024 Set 2, Q.24

    Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU) in a system with paging-based memory management?

    Memory Management and Virtual Memory

  27. GATE CS 2024 Set 2MSQ1 markMedium (estimate)

    GATE CS 2024 Set 2, Q.25

    Consider a process P running on a CPU. Which one or more of the following events will always trigger a context switch by the OS that results in process P moving to a non-running...

    Processes, Threads and System Calls · CPU Scheduling

  28. GATE CS 2024 Set 2MCQ2 marksEasy (estimate)

    GATE CS 2024 Set 2, Q.37

    Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second val...

    CPU Scheduling

  29. GATE CS 2024 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2024 Set 2, Q.46

    Consider a multi-threaded program with two threads T1 and T2. The threads share two semaphores: s1 (initialized to 1) and s2 (initialized to 0). The threads also share a glo...

    Process Synchronization and Concurrency · Deadlock Prevention, Avoidance and Detection

  30. GATE CS 2024 Set 2NAT2 marksEasy (estimate)

    GATE CS 2024 Set 2, Q.53

    Consider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors. A file has content store...

    File Systems, I/O and Disk Scheduling · I/O Interface, Interrupts and DMA

  31. GATE CS 2024 Set 2NAT2 marksMedium (estimate)

    GATE CS 2024 Set 2, Q.64

    Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each. Assume bytes. The OS uses a 2-level page table for memory manage...

    Memory Management and Virtual Memory

  32. GATE CS 2023MSQ1 markEasy (estimate)

    GATE CS 2023, Q.22

    Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) of the same process?

    Processes, Threads and System Calls

  33. GATE CS 2023MSQ1 markEasy (estimate)

    GATE CS 2023, Q.23

    Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?

    Processes, Threads and System Calls · Memory Management and Virtual Memory

  34. GATE CS 2023MSQ1 markMedium (estimate)

    GATE CS 2023, Q.27

    Which one or more of the following CPU scheduling algorithms can potentially cause starvation?

    CPU Scheduling

  35. GATE CS 2023MCQ2 marksMedium (estimate)

    GATE CS 2023, Q.38

    Consider the two functions incr and decr shown below. incr(){ wait(s); X = X+1; signal(s); } decr(){ wait(s); X = X-1; signal(s); } There are 5 threads each invoking inc...

    Process Synchronization and Concurrency

  36. GATE CS 2023NAT2 marksHard (estimate)

    GATE CS 2023, Q.57

    Consider the following two-dimensional array in the C programming language, which is stored in row-major order: int D[128][128]; Demand paging is used for allocatin...

    Memory Management and Virtual Memory

  37. GATE CS 2023NAT2 marksEasy (estimate)

    GATE CS 2023, Q.58

    Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with levels for virtual to physical address translation. The page siz...

    Memory Management and Virtual Memory · Memory Hierarchy: Cache, Main Memory and Secondary Storage

  38. GATE CS 2022MCQ1 markEasy (estimate)

    GATE CS 2022, Q.19

    Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3, operated upon using standard...

    Process Synchronization and Concurrency

  39. GATE CS 2022MSQ1 markMedium (estimate)

    GATE CS 2022, Q.26

    Which of the following statements is/are TRUE with respect to deadlocks?

    Deadlock Prevention, Avoidance and Detection

  40. GATE CS 2022MCQ2 marksMedium (estimate)

    GATE CS 2022, Q.38

    Which one of the following statements is FALSE?

    Memory Management and Virtual Memory

  41. GATE CS 2022MCQ2 marksHard (estimate)

    GATE CS 2022, Q.42

    Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time...

    CPU Scheduling

  42. GATE CS 2022NAT2 marksHard (estimate)

    GATE CS 2022, Q.63

    Consider two files systems A and B, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, cons...

    File Systems, I/O and Disk Scheduling

  43. GATE CS 2022NAT2 marksEasy (estimate)

    GATE CS 2022, Q.64

    Consider a demand paging system with four page frames (initially empty) and LRU page replacement policy. For the following page reference string…

    Memory Management and Virtual Memory

  44. GATE CS 2021 Set 1MSQ1 markEasy (estimate)

    GATE CS 2021 Set 1, Q.21 (CS Q.11)

    In the context of operating systems, which of the following statements is/are correct with respect to paging?

    Memory Management and Virtual Memory

  45. GATE CS 2021 Set 1MSQ1 markMedium (estimate)

    GATE CS 2021 Set 1, Q.24 (CS Q.14)

    Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?

    Processes, Threads and System Calls

  46. GATE CS 2021 Set 1MSQ1 markMedium (estimate)

    GATE CS 2021 Set 1, Q.25 (CS Q.15)

    Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, s...

    File Systems, I/O and Disk Scheduling

  47. GATE CS 2021 Set 1NAT1 markEasy (estimate)

    GATE CS 2021 Set 1, Q.35 (CS Q.25)

    Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievabl...

    CPU Scheduling

  48. GATE CS 2021 Set 1MSQ2 marksMedium (estimate)

    GATE CS 2021 Set 1, Q.56 (CS Q.46)

    Consider the following pseudocode, where is a semaphore initialized to 5 in line#2 and counter is a shared variable initialized to 0 in line#1. Assume that the increment ope...

    Process Synchronization and Concurrency

  49. GATE CS 2021 Set 2MSQ1 markMedium (estimate)

    GATE CS 2021 Set 2, Q.24 (CS Q.14)

    Which of the following statement(s) is/are correct in the context of CPU scheduling?

    CPU Scheduling

  50. GATE CS 2021 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2021 Set 2, Q.52 (CS Q.42)

    Consider the following multi-threaded code segment (in a mix of C and pseudo-code), invoked by two processes P1 and P2, and each of the processes spawns two threads T1 and T2…

    Process Synchronization and Concurrency

  51. GATE CS 2021 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2021 Set 2, Q.53 (CS Q.43)

    Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing...

    Deadlock Prevention, Avoidance and Detection

  52. GATE CS 2021 Set 2NAT2 marksMedium (estimate)

    GATE CS 2021 Set 2, Q.58 (CS Q.48)

    Consider a three-level page table to translate a 39-bit virtual address to a physical address as shown below. A 39-bit virtual address bit layout divided into four fields: Level...

    Memory Management and Virtual Memory

  53. GATE CS 2020MCQ1 markEasy (estimate)

    GATE CS 2020, Q.21 (CS Q.11)

    Consider allocation of memory to a new process. Assume that none of the existing holes in the memory will exactly fit the process's memory requirement. Hence, a new hole of smal...

    Memory Management and Virtual Memory

  54. GATE CS 2020MCQ1 markEasy (estimate)

    GATE CS 2020, Q.22 (CS Q.12)

    Consider the following statements about process state transitions for a system using preemptive scheduling. I. A running process can move to ready state. II. A ready process can...

    CPU Scheduling · Processes, Threads and System Calls

  55. GATE CS 2020MCQ2 marksMedium (estimate)

    GATE CS 2020, Q.44 (CS Q.34)

    Each of a set of processes executes the following code using two semaphores and initialized to 1 and 0, respectively. Assume that count is a shared variable initia...

    Process Synchronization and Concurrency

  56. GATE CS 2020MCQ2 marksEasy (estimate)

    GATE CS 2020, Q.45 (CS Q.35)

    Consider the following five disk access requests of the form (request id, cylinder number) that are present in the disk scheduler queue at a given time.…

    File Systems, I/O and Disk Scheduling

  57. GATE CS 2020NAT2 marksMedium (estimate)

    GATE CS 2020, Q.60 (CS Q.50)

    Consider the following set of processes, assumed to have arrived at time 0. Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume...

    CPU Scheduling

  58. GATE CS 2020NAT2 marksHard (estimate)

    GATE CS 2020, Q.63 (CS Q.53)

    Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns....

    Memory Management and Virtual Memory · Memory Management and Virtual Memory

  59. GATE CS 2019NAT1 markEasy (estimate)

    GATE CS 2019, Q.27 (CS Q.17)

    The following C program is executed on a Unix/Linux system: #include <unistd.h> int main() { int i; for (i = 0; i < 10; i++) if (i % 2 == 0) fork(); return 0; } The tot...

    Processes, Threads and System Calls

  60. GATE CS 2019NAT1 markHard (estimate)

    GATE CS 2019, Q.33 (CS Q.23)

    Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100. P1 P2 P3 : : : : : : D = D + 20 D = D -...

    Process Synchronization and Concurrency

  61. GATE CS 2019MCQ2 marksMedium (estimate)

    GATE CS 2019, Q.43 (CS Q.33)

    Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8 kB and...

    Memory Management and Virtual Memory

  62. GATE CS 2019MCQ2 marksMedium (estimate)

    GATE CS 2019, Q.49 (CS Q.39)

    Consider the following snapshot of a system running concurrent processes. Process is holding instances of a resource , . Assume that all instance...

    Process Synchronization and Concurrency

  63. GATE CS 2019NAT2 marksMedium (estimate)

    GATE CS 2019, Q.51 (CS Q.41)

    Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below: | Process | Arrival time | CPU burst...

    CPU Scheduling

  64. GATE CS 2019NAT2 marksMedium (estimate)

    GATE CS 2019, Q.52 (CS Q.42)

    The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is , and the disk block a...

    File Systems, I/O and Disk Scheduling

  65. GATE CS 2018MCQ1 markEasy (estimate)

    GATE CS 2018, Q.19 (CS Q.9)

    The following are some events that occur after a device controller issues an interrupt while process L is under execution. (P) The processor pushes the process status of L onto...

    Processes, Threads and System Calls

  66. GATE CS 2018MCQ1 markEasy (estimate)

    GATE CS 2018, Q.20 (CS Q.10)

    Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is av...

    Memory Management and Virtual Memory

  67. GATE CS 2018NAT1 markEasy (estimate)

    GATE CS 2018, Q.34 (CS Q.24)

    Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of instances. Resource instances can be requested and...

    Deadlock Prevention, Avoidance and Detection

  68. GATE CS 2018MCQ2 marksMedium (estimate)

    GATE CS 2018, Q.49 (CS Q.39)

    In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3 execute concurrently. At the outset, the processes have declared their maximum reso...

    Deadlock Prevention, Avoidance and Detection

  69. GATE CS 2018MCQ2 marksMedium (estimate)

    GATE CS 2018, Q.50 (CS Q.40)

    Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is . Three semaphores empty, full and mutex are defined with respecti...

    Process Synchronization and Concurrency

  70. GATE CS 2018NAT2 marksMedium (estimate)

    GATE CS 2018, Q.63 (CS Q.53)

    Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, … , 199), and 256 sectors per track (numbered as 0, 1, … , 255). The follow...

    File Systems, I/O and Disk Scheduling

  71. GATE CS 2017 Set 1MCQ1 markEasy (estimate)

    GATE CS 2017 Set 1, Q.18 (CS Q.18)

    Threads of a process share

    Processes, Threads and System Calls

  72. GATE CS 2017 Set 1NAT1 markEasy (estimate)

    GATE CS 2017 Set 1, Q.24 (CS Q.24)

    Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below: Process Arrival time Burst time P1 0 7 P2 3...

    CPU Scheduling

  73. GATE CS 2017 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2017 Set 1, Q.27 (CS Q.27)

    A multithreaded program executes with number of threads and uses number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks...

    Deadlock Prevention, Avoidance and Detection · Process Synchronization and Concurrency

  74. GATE CS 2017 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2017 Set 1, Q.40 (CS Q.40)

    Recall that Belady's anomaly is that the page-fault rate may increase as the number of allocated frames increases. Now, consider the following statements: S1: Random page replac...

    Memory Management and Virtual Memory

  75. GATE CS 2017 Set 2MCQ1 markEasy (estimate)

    GATE CS 2017 Set 2, Q.7 (CS Q.7)

    Which of the following is/are shared by all the threads in a process? I. Program counter II. Stack III. Address space IV. Registers

    Processes, Threads and System Calls

  76. GATE CS 2017 Set 2MCQ1 markEasy (estimate)

    GATE CS 2017 Set 2, Q.8 (CS Q.8)

    In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed? I. Contiguous II. Linked III. Indexed

    File Systems, I/O and Disk Scheduling

  77. GATE CS 2017 Set 2MCQ2 marksEasy (estimate)

    GATE CS 2017 Set 2, Q.33 (CS Q.33)

    A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below: | Process | Current Allocation | Maximum Requir...

    Deadlock Prevention, Avoidance and Detection

  78. GATE CS 2017 Set 2NAT2 marksMedium (estimate)

    GATE CS 2017 Set 2, Q.51 (CS Q.51)

    Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes...

    CPU Scheduling

  79. GATE CS 2016 Set 1MCQ1 markEasy (estimate)

    GATE CS 2016 Set 1, Q.30 (CS Q.20)

    Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling al...

    CPU Scheduling

  80. GATE CS 2016 Set 1NAT2 marksEasy (estimate)

    GATE CS 2016 Set 1, Q.57 (CS Q.47)

    Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table e...

    Memory Management and Virtual Memory

  81. GATE CS 2016 Set 1NAT2 marksEasy (estimate)

    GATE CS 2016 Set 1, Q.58 (CS Q.48)

    Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder n...

    File Systems, I/O and Disk Scheduling

  82. GATE CS 2016 Set 1NAT2 marksMedium (estimate)

    GATE CS 2016 Set 1, Q.59 (CS Q.49)

    Consider a computer system with ten physical page frames. The system is provided with an access sequence , where each i...

    Memory Management and Virtual Memory

  83. GATE CS 2016 Set 1MCQ2 marksHard (estimate)

    GATE CS 2016 Set 1, Q.60 (CS Q.50)

    Consider the following proposed solution for the critical section problem. There are processes: . In the code, function pmax returns an integer not smal...

    Process Synchronization and Concurrency

  84. GATE CS 2016 Set 2MCQ1 markEasy (estimate)

    GATE CS 2016 Set 2, Q.30 (CS Q.20)

    In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?

    Memory Management and Virtual Memory

  85. GATE CS 2016 Set 2NAT2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.57 (CS Q.47)

    Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-tim...

    CPU Scheduling

  86. GATE CS 2016 Set 2MCQ2 marksEasy (estimate)

    GATE CS 2016 Set 2, Q.58 (CS Q.48)

    Consider the following two-process synchronization solution. Process 0 -------- Entry: loop while (turn == 1); (critical section) Exit: turn = 1; Process 1 --------- Ent...

    Process Synchronization and Concurrency

  87. GATE CS 2016 Set 2NAT2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.59 (CS Q.49)

    Consider a non-negative counting semaphore . The operation decrements , and increments . During an execution, 20 operations and 12 operation...

    Process Synchronization and Concurrency

  88. GATE CS 2016 Set 2NAT2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.60 (CS Q.50)

    A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is 1 ms and to read a b...

    File Systems, I/O and Disk Scheduling · Memory Hierarchy: Cache, Main Memory and Secondary Storage

  89. GATE CS 2015 Set 1NAT1 markMedium (estimate)

    GATE CS 2015 Set 1, Q.19 (CS Q.9)

    The following two functions P1 and P2 that share a variable B with an initial value of execute concurrently. P1() { C = B - 1; B = 2 * C; } P2() { D = 2...

    Process Synchronization and Concurrency

  90. GATE CS 2015 Set 1NAT1 markEasy (estimate)

    GATE CS 2015 Set 1, Q.22 (CS Q.12)

    Consider a system with byte-addressable memory, 32-bit logical addresses, page size and page table entries of each. The size of the page tab...

    Memory Management and Virtual Memory

  91. GATE CS 2015 Set 1NAT2 marksMedium (estimate)

    GATE CS 2015 Set 1, Q.40 (CS Q.30)

    Suppose the following disk request sequence (track numbers) for a disk with tracks is given: . Assume that the initial position of the...

    File Systems, I/O and Disk Scheduling

  92. GATE CS 2015 Set 1NAT2 marksMedium (estimate)

    GATE CS 2015 Set 1, Q.56 (CS Q.46)

    Consider a uniprocessor system executing three tasks , and , each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically a...

    CPU Scheduling

  93. GATE CS 2015 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2015 Set 1, Q.57 (CS Q.47)

    Consider a main memory with five page frames and the following sequence of page references: . Which one of the following is true wit...

    Memory Management and Virtual Memory

  94. GATE CS 2015 Set 2MCQ1 markMedium (estimate)

    GATE CS 2015 Set 2, Q.33 (CS Q.23)

    A system has 6 identical resources and processes competing for them. Each process can request at most 2 resources. Which one of the following values of could lead to a d...

    Deadlock Prevention, Avoidance and Detection

  95. GATE CS 2015 Set 2NAT1 markMedium (estimate)

    GATE CS 2015 Set 2, Q.35 (CS Q.25)

    A computer system implements a 40-bit virtual address, page size of 8 kilobytes, and a 128-entry translation look-aside buffer (TLB) organized into 32 sets each having four ways...

    Memory Management and Virtual Memory

  96. GATE CS 2015 Set 2MCQ2 marksEasy (estimate)

    GATE CS 2015 Set 2, Q.40 (CS Q.30)

    Consider six memory partitions of sizes 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250 KB, where KB refers to kilobyte. These partitions need to be allotted to four processes of...

    Memory Management and Virtual Memory

  97. GATE CS 2015 Set 2NAT2 marksMedium (estimate)

    GATE CS 2015 Set 2, Q.57 (CS Q.47)

    A computer system implements 8 kilobyte pages and a 32-bit physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the transl...

    Memory Management and Virtual Memory

  98. GATE CS 2015 Set 2NAT2 marksMedium (estimate)

    GATE CS 2015 Set 2, Q.59 (CS Q.49)

    Consider a typical disk that rotates at 15000 rotations per minute (RPM) and has a transfer rate of bytes/sec. If the average seek time of the disk is twice the...

    File Systems, I/O and Disk Scheduling

  99. GATE CS 2015 Set 3MCQ1 markEasy (estimate)

    GATE CS 2015 Set 3, Q.11 (CS Q.1)

    The maximum number of processes that can be in Ready state for a computer system with CPUs is

    Processes, Threads and System Calls · CPU Scheduling

  100. GATE CS 2015 Set 3MCQ1 markMedium (estimate)

    GATE CS 2015 Set 3, Q.20 (CS Q.10)

    Two processes X and Y need to access a critical section. Consider the following synchronization construct used by both the processes /* Process X */ while (true) { varP = t...

    Process Synchronization and Concurrency

  101. GATE CS 2015 Set 3MCQ2 marksMedium (estimate)

    GATE CS 2015 Set 3, Q.44 (CS Q.34)

    For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time? Process Arrival Time Processing Time A 0...

    CPU Scheduling

  102. GATE CS 2015 Set 3MCQ2 marksEasy (estimate)

    GATE CS 2015 Set 3, Q.62 (CS Q.52)

    Consider the following policies for preventing deadlock in a system with mutually exclusive resources: I. Processes should acquire all their resources at the beginning of execut...

    Deadlock Prevention, Avoidance and Detection

  103. GATE CS 2014 Set 1NAT1 markEasy (estimate)

    GATE CS 2014 Set 1, Q.29 (CS Q.19)

    Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 10...

    File Systems, I/O and Disk Scheduling

  104. GATE CS 2014 Set 1MCQ1 markEasy (estimate)

    GATE CS 2014 Set 1, Q.30 (CS Q.20)

    Which one of the following is FALSE?

    Processes, Threads and System Calls

  105. GATE CS 2014 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2014 Set 1, Q.41 (CS Q.31)

    An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The ta...

    Deadlock Prevention, Avoidance and Detection

  106. GATE CS 2014 Set 1NAT2 marksMedium (estimate)

    GATE CS 2014 Set 1, Q.42 (CS Q.32)

    Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds. Process Name Arrival Time Execution Time A 0 6 B 3 2...

    CPU Scheduling

  107. GATE CS 2014 Set 1NAT2 marksEasy (estimate)

    GATE CS 2014 Set 1, Q.43 (CS Q.33)

    Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal repla...

    Memory Management and Virtual Memory

  108. GATE CS 2014 Set 2NAT1 markMedium (estimate)

    GATE CS 2014 Set 2, Q.30 (CS Q.20)

    A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a bytes disk on which t...

    File Systems, I/O and Disk Scheduling

  109. GATE CS 2014 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2014 Set 2, Q.41 (CS Q.31)

    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...

    Process Synchronization and Concurrency

  110. GATE CS 2014 Set 2NAT2 marksHard (estimate)

    GATE CS 2014 Set 2, Q.42 (CS Q.32)

    Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires CPU milliseconds and...

    CPU Scheduling

  111. GATE CS 2014 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2014 Set 2, Q.43 (CS Q.33)

    A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, ..., 100 in that order, and repeats the...

    Memory Management and Virtual Memory

  112. GATE CS 2014 Set 3NAT1 markEasy (estimate)

    GATE CS 2014 Set 3, Q.30 (CS Q.20)

    A system uses 3 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 initiall...

    Memory Management and Virtual Memory

  113. GATE CS 2014 Set 3NAT2 marksEasy (estimate)

    GATE CS 2014 Set 3, Q.41 (CS Q.31)

    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 aris...

    Deadlock Prevention, Avoidance and Detection

  114. GATE CS 2014 Set 3NAT2 marksMedium (estimate)

    GATE CS 2014 Set 3, Q.42 (CS Q.32)

    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 t...

    CPU Scheduling

  115. GATE CS 2014 Set 3NAT2 marksEasy (estimate)

    GATE CS 2014 Set 3, Q.43 (CS Q.33)

    Consider a paging hardware with a TLB. Assume that the entire page table and all the pages are in the physical memory. It takes 10 milliseconds to search the TLB and 80 millisec...

    Memory Management and Virtual Memory

  116. GATE CS 2013MCQ1 markMedium (estimate)

    GATE CS 2013, Q.10 (CS Q.10)

    A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (the lowest priority). The scheduler re-evaluates...

    CPU Scheduling

  117. GATE CS 2013MCQ1 markMedium (estimate)

    GATE CS 2013, Q.16 (CS Q.16)

    Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on...

    Process Synchronization and Concurrency

  118. GATE CS 2013MCQ2 marksMedium (estimate)

    GATE CS 2013, Q.29 (CS Q.29)

    Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512...

    File Systems, I/O and Disk Scheduling

  119. GATE CS 2013MCQ2 marksMedium (estimate)

    GATE CS 2013, Q.34 (CS Q.34)

    A shared variable , initialized to zero, is operated on by four concurrent processes as follows. Each of the processes and reads from memory, increme...

    Process Synchronization and Concurrency

  120. GATE CS 2013MCQ2 marksMedium (estimate)

    GATE CS 2013, Q.39 (CS Q.39)

    A certain computation generates two arrays and such that for and for . Suppose this computation is decomposed int...

    Process Synchronization and Concurrency

  121. GATE CS 2013MCQ2 marksMedium (estimate)

    GATE CS 2013, Q.52 (CS Q.52)

    What is the size of a page in KB in this computer?

    Memory Management and Virtual Memory

  122. GATE CS 2012MCQ1 markEasy (estimate)

    GATE CS 2012, Q.8 (CS Q.8)

    A process executes the code fork(); fork(); fork(); The total number of child processes created is

    Processes, Threads and System Calls

  123. GATE CS 2012MCQ2 marksMedium (estimate)

    GATE CS 2012, Q.31 (CS Q.31)

    Consider the 3 processes, , and shown in the table. | Process | Arrival time | Time Units Required | | :--- | :--- | :--- | | | 0 | 5 | | | 1 | 7 |...

    CPU Scheduling

  124. GATE CS 2012MCQ2 marksMedium (estimate)

    GATE CS 2012, Q.32 (CS Q.32)

    Fetch_And_Add(X, i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is use...

    Process Synchronization and Concurrency

  125. GATE CS 2012MCQ2 marksEasy (estimate)

    GATE CS 2012, Q.41 (CS Q.41)

    A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block...

    File Systems, I/O and Disk Scheduling

  126. GATE CS 2012MCQ2 marksMedium (estimate)

    GATE CS 2012, Q.42 (CS Q.42)

    Consider the virtual page reference string on a demand paged virtual memory system running on a computer system that has main memory size of 3 p...

    Memory Management and Virtual Memory

  127. GATE CS 2011MCQ1 markEasy (estimate)

    GATE CS 2011, Q.6 (CS Q.6)

    Let the time taken to switch between user and kernel modes of execution be while the time taken to switch between two processes be . Which of the following is TRUE?

    Processes, Threads and System Calls

  128. GATE CS 2011MCQ1 markEasy (estimate)

    GATE CS 2011, Q.16 (CS Q.16)

    A thread is usually defined as a "light weight process" because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this,...

    CPU Scheduling

  129. GATE CS 2011MCQ1 markEasy (estimate)

    GATE CS 2011, Q.20 (CS Q.20)

    Let the page fault service time be 10 ms in a computer with average memory access time being 20 ns. If one page fault is generated for every memory accesses, what is the...

    Memory Management and Virtual Memory

  130. GATE CS 2011MCQ2 marksMedium (estimate)

    GATE CS 2011, Q.35 (CS Q.35)

    Consider the following table of arrival time and burst time for three processes P0, P1 and P2. Process Arrival time Burst Time P0 0 ms 9 ms P1 1 ms 4 ms P2 2 ms 9 ms The pre-emp...

    Process Synchronization and Concurrency

  131. GATE CS 2011MCQ2 marksEasy (estimate)

    GATE CS 2011, Q.44 (CS Q.44)

    An application loads 100 libraries at startup. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10 ms. Rotationa...

    File Systems, I/O and Disk Scheduling