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
Consider a GB hard disk with storage surfaces. There are sectors per track and each sector holds bytes of data. The number of cylinders in the hard disk is _________.
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 without any errors. int x=3; while (x>0){ fork (); printf("hello"); wait (NULL) ; X-- ; } The total number of times the printf statement is executed is __________.
Consider a memory management system that uses a page size of . Assume that both the physical and virtual addresses start from . Assume that the pages , and are stored in the page frames , and , respectively. The physical address (in decimal format) corresponding to the virtual address (in decimal …
Which of the following tasks is/are the responsibility/responsibilities of the memory management unit in a system with paging-based memory management?
Consider a process running on a . Which one or more of the following events will always trigger a context switch by the that results in process moving to a non-running state (e.g., ready, blocked)?
Consider a single processor system with four processes and , represented as given below, where for each process the first value is its arrival time, and the second value is its burst time. , and . Which one of the following options …
Consider a multi-threaded program with two threads and . The threads share two semaphores: (initialized to ) and (initialized to ). The threads also share a global variable (initialized to ). The threads execute the code shown below. //code of T 1 wait (s1); x = x+1; print (x); …
Consider a disk with the following specifications: rotation speed of RPM, average seek time of milliseconds, sectors/track, -byte sectors. A file has content stored in sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to decimal places) to read the …
Consider a -bit system with page size and page table entries of size bytes each. Assume bytes. The OS uses a -level page table for memory management, with the page table containing an outer page directory and an inner page table. The allocates a page for the outer page directory upon …
Which one or more of the following need to be saved on a context switch from one thread of a process to another thread of the same process?
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
Which one or more of the following scheduling algorithms can potentially cause starvation?
Consider the two functions and shown below. incr(){ decr(){ wait(s); wait(s); X = X+1; X = X-1; signal(s); signal(s); } } There are threads each invoking once, and threads each invoking once, on the same shared variable . The initial value of is …
Consider a computer system with -bit virtual addressing using multi-level tree-structured page tables with levels for virtual to physical address translation. The page size is and a page table entry at any of the levels occupies bytes. The value of is …
Consider the following two-dimensional array in the programming language, which is stored in row-major order: int D[128][128]; Demand paging is used for allocating memory and each physical page frame holds elements of the array The Least Recently Used page-replacement policy is used by the …
Consider the following threads, and executing on a single processor, synchronized using three binary semaphore variables, and operated upon using standard and The threads can be context switched in any order and at any …
Which of the following statements is/are with respect to deadlocks?
Which one of the following statements is
Consider four processes and scheduled on a as per round robin algorithm with a time quantum of The processes arrive in the order all at time There is exactly one context switch from to exactly one context switch from …
Consider two files systems and , that use contiguous allocation and linked allocation, respectively. A file of size blocks is already stored in and also in . Now, consider inserting a new block in the middle of the file (between and block), whose data is already available in …
