Test 2 - Operating System | Computer Science (CS)
Description: GATE Previous year Topic Wise Solution | Operating System | |
Number of Questions: 19 | |
Created by: Aliensbrain Bot | |
Tags: Operating System GATE CS |
Which of the following statements is false?
Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page access pattern, increasing the number of page frames in main memory will
Where does the swap space reside?
Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4 KB, what is the approximate size of the page table?
Which of the following scheduling algorithms is non-preemptive?
Consider a set of n tasks with known runtimes, r1, r2, ........r3 to be run on a uniprocessor machine. Which of the following processor scheduling algorithms will result in the maximum throughput?
The optimal page replacement algorithm will select the page that
Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and j . The program executed by process is shown below.
For the program to guarantee mutual exclusion, the predicate P in the while loop should be
In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS ? More than one program may be loaded into main memory at the same time for execution. (B) If a program waits for certain events such as I/O, another program is immediately scheduled for execution. (C) If the execution of a program terminates, another program is immediately scheduled for execution.
Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is First Come First Served (FCFS). If FCFS is replaced by shortest seek Time Fist (SSTF), claimed by the vendor to given 50% better benchmark results, what is the expected improvement in the I/O performance of user programs?
A Unix-style I-node has 10 direct pointers and one single, one double and one triple indirect pointers. Disk block size is 1 Kbyte, disk block address is 32 bits and 48-bit integers are used. What is the maximum possible file size?
Consider a system with a two-level paging scheme in which a regular memory access takes 150 nanoseconds, and servicing a page fault takes 8 milliseconds. An average instruction takes 100 nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 99%, and the page fault rate is one in every 10,000 instructions. What is the effective average instruction execution time?
Consider the following statements with respect to user-level threads and kernel-supported threads (i) Context which is faster with kernel-supported threads (ii) For user-level threads. a system call can block the entire process (iii) Kernel-supported threads can be scheduled independently (iv) User-level threads are transparent to the kernel
Which of the above statements are true?
Consider the following set of processes, with the arrival time and the CPU-burst time given in milliseconds.
What is the average turnaround time for these processes using the algorithm shortest remaining processing time first (SRPT)?
Consider the following code fragment: if (fork()==0 {a = a + 5; print f (%d,%/na, and a);} else {a − 5; print f (%d,%d/n,a,&a);} Let u, v be the values printed by the parent process, and x,y be the values printed by the child process. Which one of the following is TRUE?
Suppose $n$ processes, $P_1, \dots P_n$ share $m$ identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process $P_i$ is $s_i$, where $s_i > 0$. Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
Consider two processes P1 and P2 accessing the shared variables X and Y protected by two binary semaphores Sx and Sy respectively, both initialized to 1. P and V denote the usual semaphore operators, where P decrements the semaphore value and V increments the semaphore value. The pseudo-codes of P1 and P2 are as follows:
In order to avoid deadlock, the correct operators at L1,L2,L3 and L4 are respectively