Objective Question of Operating - System
Objective Question of Operating - System
1. Process Management
2. CPU Scheduling
4. Dead Locks
5. Memory Management
6. Disk Scheduling
7. Program Evolution
Process management
A process has been allocated 3 page frames. Assume that none of the pages of the process are available in the memory initially.
The process makes the following sequence of page references (reference string); 1,2,1,3,7,4,5,6,3,1
1) If optimal page replacement policy is used, how many page faults occur for the above reference string ?
2 Marks GATE-CSE/IT-2007( )
[A] 7 [B] 8
[C]9 [D]10
Common Data for Q2 and Q3 is given below
Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in
the set arrives at the barrier and waits for all others to arrive and then all processes leave the barrier. Let
the number of processes in the set be three and S be a binary semaphore with the usual P and V
functions. Consider the following C implementation of a barrier with line numbers shown on the left.
Void barrier (void) {
1 : P(S)
2 : process _ arrived ++ ;
3 : V(S);
4 : while(process _ arrived ! = 3);
5 : P(S);
6 : process_ left ++;
7 : if (process _ left = =3)
8 : process _ arrived = 0;
9 : process _ left = 0;
10 : }
11 : V(S);
}
The variables process _ arrived and process _ left are shared among all processes and are initialized to
zero. In a concurrent program all the three processes call the barrier function when they need to
synchronize globally.
2) 24. The above implementation of barrier is incorrect. Which one of the following is true ?
2 Marks GATE-CSE/IT-2006( )
1 Marks GATE-CSE/IT-2013( )
[A] -2 [B] -1
[C]1 [D]2
8) Which combination of the following features will suffice to characterize an OS as a multi-programmed OS?
(A) 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.
2 Marks GATE-CSE/IT-2002( )
[A] 3 [B] 5
[C]4 [D]6
20) Each process Pi,i=1……9 is coded as follows
repeat P(mutex)
{critical section}
v(mutex)
forever
The code foe P10 is identical except that it uses v(mutex) in place of P(mutex).
What is the largest number of processes that can be inside the critical section at any moment?
2 Marks GATE-CSE/IT-1997( )
[A] 1 [B] 2
[C]3 [D]None of the above
21) The process state transition diagram in Fig.1.8 is representative of
1 Marks GATE-CSE/IT-1996( )
[A] a batch operating system [B] an operating system with a preemptive scheduler
[C]an operating system with a non-preemptive
[D]a uni-programmed operating system.
scheduler
22) For the daisy chain scheme of connecting I/O devices, which of the following statements is true?
1 Marks GATE-CSE/IT-1996( )
[A] It gives non-uniform priority to various devices. [B] It gives uniform priority to all devices.
[C] It is only useful for connecting slow devices to a [D] It requires a separate interrupt pin on the
processor device. processor for each device.
Process management
23) Consider a system having m resources of the same type. These resources are shared by 3 processes A ,
B and C , Which have peak demands of 3 , 4 and 6 respectively . For what value of m deadlock will not
occur?
2 Marks GATE-CSE/IT-1993( )
[A] 7 [B] 9
[C]10 [D]13
[E] 15
24) Consider three CPU-intensive processes, whichrequire 10,20 and 30 time units and arrive at times 0,2,
and 6,respectively. How many context switchesare needed if the operating system implements a shortest
remaining time firstscheduling algorithm ? Do not count the context switches at time zero and atthe end.
1 Marks GATE-CSE/IT-2006( )
[A] 1 [B] 2
[C]3 [D]4
25) The atomic feth-and-set x,y instruction unconditionallysets the memory location x to 1 and fetches the old
value of x in y without allowing any intervening access to the memory location X. Consider the following
implementation of P and Vfunctions on a binary semaphore S.
void p (binary_ semaphore *S) {
unsignedy;
unsigned *x = &(S-> value);}
do {
fetch– and – set x,y;
} while(y);
}
void V(binary_semphore *S) {
{S-> value = 0 ;
}
Which one of the following is true ?
2 Marks GATE-CSE/IT-2006( )
[A] The implementation may not work if context [B] Instead of using fetch-and-set, a pair of normal
switching is disabled in P load/store can be used
[C] [D]The code does not implement a binary
The implementation of V is wrong semaphore
26) A process executes the following code for (i=0’ I <n ; i++) fork (); The total number of child processes
created is
2 Marks GATE-CSE/IT-2008( )
[A] n [B]
[C] [D]
Process management
Key Paper
1. A 2. B 3. B 4. C 5. C
6. B 7. D 8. D 9. B 10. B
26. B
CPU Scheduling
1)Consider n processes sharing the CPU in a round-robin fashion. Assuming that each process switch takes
s seconds, what must be the quantum size q such that the overhead resulting from process switching is
minimized but at the same time each process is guaranteed to get its turn at the CPU at least every t
seconds?
2 Marks GATE-CSE/IT-1998( )
[A] [B]
[C] [D]
2) The correct matching for the following pairs is:
(A) Disk scheduling (1) Round robin
(B) Batch processing (2) SCAN
(C) Time sharing (3) LIFO
(D) Interrupt processing (4) FIFO
1 Marks GATE-CSE/IT-1997( )
[A] A – 3 B – 4 C – 2 D - 1 [B] A – 4 B – 3 C – 2 D - 1
[C]A – 2 B – 4 C – 1 D - 3 [D]A – 3 B – 4 C – 3 D - 2
3) When an interrupt occurs, an operating system
1 Marks GATE-CSE/IT-1997( )
[A] ignores the interrupt [B] always changes state of interrupted process after
processing the interrupt
[C] always resumes execution of interrupted [D] may change state of interrupted
process after processing the interrupt process to ‘blocked’ and schedule
another process
4) Four jobs to be executed on a single processor system arrive at time 0+ in the order A, B, C, D. their burst
CPU time requirements are 4, 1, 8, 1 time units respectively. The completion time of A under round robin
scheduling with time slice of one time unit is
2 Marks GATE-CSE/IT-1996( )
[A] 10 [B] 4
[C]8 [D]9
5) Which scheduling policy is most suitable for a time shared operating system?
1 Marks GATE-CSE/IT-1995( )
2 Marks GATE-CSE/IT-1995( )
The jobs are assumed to have arrived at time 0_+ and in the order p, q, r, s, t. calculate the departure time
(completion time) for job p if scheduling is round robin with time slice 1.
CPU Scheduling
2 Marks GATE-CSE/IT-1993( )
[A] 4 [B] 10
[C]11 [D]12
[E] none of the above
8) Consider the following statements with respect touser- level threads and kernel-supported thread
(i) Context switch is faster with kernel-supported threads
(ii) For user-level threads, a system call can block the entire process
(c) Kernel-supported threads can be scheduled in dependently
(iv) User-level threads are transparent to the kernel
Which of the above statements are true ?
1 Marks GATE-CSE/IT-2004( )
[A] (ii), (iii) and (iv) only [B] (ii) and (iii) only
[C](i) and (iii) only [D](i) and (ii) only
9) Consider the following set of processes, with the arrival times and the CPU-burst times given in
milliseconds
Process Arrivaltime Burst time
P1 0 5
P2 1 3
P3 2 3
P4 4 1
What is the average turnaround time for these processes with the preemptive shortest remaining
processing time first (SRPT) algorithm ?
2 Marks GATE-CSE/IT-2004( )
[A] 5 [B] 15
[C]40 [D]55
CPU Scheduling
13) A virtual memory system uses first In first Out (FIFO) page replacement policyand allocates a fixed
number of frames to a process. Consider the following statements :
P: Increasing the number of page frames allocated to a process sometimes increases the page faultrate.
Q: Some program do not exhibit locality of reference.
Which one of the following is TRUE ?
1 Marks GATE-CSE/IT-2007( )
[B] Both P and Q are true, but Q is not the reason for
[A] Both P and Q are true, and Q is the reason for P P
[C]P is false, but Q is true [D]Both P and Q are false
14) A single processor system has three resource typesX,Y, and Z, which are shared by three processes.
There are 5 units of each resource type allocated to each process, and the columnrequest denotes the
number of units of each resource type requestedby a process in order to complete execution. Which of
these processes will finishLAST ?
alloc request
XXX X YZ
P0 121 103
P1 201 012
P2 221 120
2 Marks GATE-CSE/IT-2007( )
[A] P0 [B] P1
[C]P2 [D]None of the above, since the system is in a
deadlock
15) Two processes,P1 and P2, need to access a criticalsection of code. Consider the following
synchronization construct used by theprocesses :
/* P1 * / /*P2 */
while (true) while (true)
{ {
wants1 =true ; wants2 = true;
while(wants2= =true); while (wants1 = = true);
/*Critical /*Critical
Section * / Section*/
Wants 1 = false; wants2 = false ;
} }
/* Re mainder section * / /* Re mainder sec tion */
Here, wants 1 and wants 2 are shared variables,Which are intitilized to false. Whichone of the following
statements is TRUE about the above construct ?
2 Marks GATE-CSE/IT-2007( )
[A] It does not ensure mutual exclusion. [B] It does not ensure bounded waiting
[C] It requires that processes enter the critical [D] It does not prevent deadlocks, but ensures
section in strict alternation mutual exclusion.
16) In which one of the following page replacement policies, Belady’s anomaly may occur ?
1 Marks GATE-CSE/IT-2008( )
18) Consider three processes, all arriving at time zero, with total execution time of 10,20 and 30 units,
respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing
computation, and the last 10% of time doing I/O again. The operating system uses a shortest remaining
compute time first scheduling algorithm and schedules a new process either when the running process
get blocked on I/O or when the running process finishes its compute burst. Assume that all I/O operations
can be overlapped as much as possible. For what percentage of time does the CPU remain idle ?
2 Marks GATE-CSE/IT-2006( )
[A] 0 [B] 1
[C]2 [D]3
20) 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 the process priorities every T 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?
1 Marks GATE-CSE/IT-2013( )
[A] This algorithm is equivalent to the first-come-first- [B] This algorithm is equivalent to the round-robin
serve algorithm. algorithm.
[C]This algorithm is equivalent to the shortest-job- [D]This algorithm is equivalent to the shortest-
first algorithm. remaining-time-first algorithm
21) Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a
global parameter
MultiDequeue (Q) {
m=k
while (Q is not empty) and (m >0) {
Dequeue (Q)
m=m−1
}
}
What is the worst case time complexity of a sequence of n queue operations on an initially empty queue?
2 Marks GATE-CSE/IT-2013( )
[A] [B]
[C] [D]
22) Consider the following statements with respect to user-level threads and kernel-supported threads
(i) Context switch is faster with kernel-supported threads
(ii) For user-level threads, a system call can block the entire process
(c) Kernel-supported threads can be scheduled independently
(iv) User-level threads are transparent to the kernel
Which of the above statements are true ?
1 Marks GATE-CSE/IT-2004( )
[A] (ii), (iii) and (iv) only [B] (ii) and (iii) only
[C] (i) and (iii) only [D] (i) and (ii) only
CPU Scheduling
23) Consider the following set of processes, with the arrival times and the CPU-burst times given in
milliseconds
What is the average turnaround time for these processes with the preemptive shortest remaining
processing time first (SRPT) algorithm ?
2 Marks GATE-CSE/IT-2004( )
[A] 1 [B] 2
[C]3 [D]4
26) Let W(n) and A(n) denote respectively, the worst case and average case running time of an algorithm
executed on an input of size n. Which of the following is ALWAYS TRUE?
1 Marks GATE-CSE/IT-2012( )
[A] On per-thread basis, the OS maintains only CPU [B] The OS does not maintain a separate stack for
register state each thread
[C]On per-thread basis, the OS does not maintain [D]On per thread basis, the OS maintains only
virtual memory state scheduling and accounting information
28) 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 4ms
P2 2 ms 9ms
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or
completion of processes. What is the average waiting time for the three processes?
CPU Scheduling
2 Marks GATE-CSE/IT-2011( )
Which one of the schedules below is the correct serialization of the above?
2 Marks GATE-CSE/IT-2010( )
[A] T1 T3 T2 [B] T2 T1 T3
[C]T2 T3 T1 [D]T3 T1 T2
CPU Scheduling
Key Paper
1. D 2. C 3. D 4. D 5. B
6. A 7. C 8. A 9. A 10. A
[A] as an alternative to register allocation at compile [B] for efficient access to function parameters and
time local variables
[C] to handle certain kinds of hazards [D]as part of address translation
6) A computer handles several interrupt sources of which the following are relevant for this question.
Interrupt from CPU temperature sensor
Interrupt from Mouse
Interrupt from Keyboard
Interrupt from Hard Disk
1 Marks GATE-CSE/IT-2011( )
Key Paper
1. D 2. D 3. D 4. A 5. C
6. D
Deadlocks
[A] 6 [B] 5
[C]4 [D]3
4) A solution to the Dining Philosophers Problem which avoids deadlock is
2 Marks GATE-CSE/IT-1996( )
[A] ensure that all philosophers pick up the left fork [B] ensure that all philosophers pick up the right fork
before the right fork before the left fork
[C]ensure that one particular philosopher picks up
the left fork before the right fork, and that all other
[D]None of the above
philosophers pick up the right fork before the left
fork
5) Consider two processes P1 and P2 accessing theshared variables X and Y protected by two binary
semaphores Sx and Syrespectively , both initialized to 1. P and V denote the usual semaphoreoperators,
where P decrements the semaphore value, and V increments the
P1: P2:
whiletrue do{ whiletrue do {
L1:………… L3:…………..
L2:………… L4:…………..
X =X + 1; Y=Y + 1;
Y =Y – 1; X= Y -1,
V(SX); V(SY);
V(SY); } V(SX); }
In order toavoid deadlock, the correct operators at L1,L2, L3 and L4 are respectively
2 Marks GATE-CSE/IT-2004( )
[A] [B]
[C] [D]
7) Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes ?
2 Marks GATE-CSE/IT-2008( )
[A] In deadlock prevention, the request for resources [B] In deadlock avoidance, the request for resources
is always granted if the resulting state is safe is always granted if the resulting state is safe
[C]Deadlock avoidance is less restrictive than [D]Deadlock avoidance requires knowledge of
deadlock prevention resource requirements a priori
Deadlocks
8) Consider the following snapshot of a system running n processes. Process I is holding xi instances of a
resource R, for 1 I n. Currently, all instances of R are occupied. Further, for all I, process I has placed a
request for an additional yi instances while holding the xi instances it already has. There are exactly two
processes p and q such that yp= yq= 0. Which one of the following can serve as a necessary condition to
guarantee that the system is not approaching a deadlock ?
2 Marks GATE-CSE/IT-2006( )
[A] [B]
[C] [D]
9) Suppose n processes,P1,…, Pnshare m identical resource units, which can be reserved and released
one at a time. The maximum resource requirement of process pi is sp where si >0. Which one of the
following is a sufficient condition for ensuring that deadlock does not occur ?
2 Marks GATE-CSE/IT-2005( )
[A] [B]
[C] [D]
10) Which of the following concurrency control protocols ensure both conflict serializability and freedom
from deadlock?
I. 2-phase locking
II. Time-stamp ordering
1 Marks GATE-CSE/IT-2010( )
Key Paper
1. B 2. A 3. A 4. C 5. D
6. C 7. A 8. B 9. C 10. B
Memory Management
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S and T.
The code for the processes P and Q is shown below.
Process P: Process Q:
while (1) { while (1) {
W: Y:
print’0’; print ‘1’;
print ‘0’ print ‘1’;
X: Z:
} }
Synchronization statements can be inserted only at points W,X,Y and Z.
1) Which of the following will always lead to an output starting with ‘001100110011’?
2 Marks GATE-CSE/IT-2003( )
[A] P(S) at W, V(S) at X, P(T) at Y, V(T) at Z, S and [B] P(S) at W,V (T) at X,P(T) at Y,V(S) Z, S initially
T initially 1 1, and T initially 0
[C]P(S) at W,V )(T) at X,P (T) at Y,V(S) at Z, S and [D]P(S) at W, V(T) at X,P(T) at Y,V(T) at Z,S initially
T initially 1 1, and T initially 0
2) Which of the following will ensure that the output string never contains a substring of the form 01n0 or
10n1 where n is odd ?
2 Marks GATE-CSE/IT-2003( )
[A] P(S) at W,V(S) at X,P(T) at Y,V(T) at Z,S and T [B] P(S) at W,V(T) at X,P(T) at Y,V(S) at Z,S and T
initially 1 initially 1
[C]P(S) at W,V(S) at X,P(S) at Y,V(S) at Z, S initially [D]V(S) at W,V(T) at X,P(S) at Y,P (T) at Z,S and T
1 initially 1
Common Data for Q3 and Q4 is given below
A processor uses 2-level page tables for virtual to physical address translation. Page tables for both
levels are stored in the main memory. Virtual and physical addresses are both 32 bits wide. The memory
is byte addressable. For virtual to physical address translation, the 10 most significant bits of the virtual
address are used as index into the first level page table while the next 10 bits are used as index into the
second level page table. The 12 least significant bits of the virtual address are used as offset within the
page. Assume that the page table entries in both levels of page tables are 4 bytes wide. Further, the
processor has a translation look-aside buffer (TLB), with a hit rate of 96%. The TLB caches recently used
virtual page numbers and the corresponding physical page numbers. The processor also has a physically
addressed cache with a hit ratio of 90%. Main memory access time is 10ns, cache access time is 1 ns,
and TLB access time is also 1ns.
3) Assuming that no page faults occur, the average time taken to access a virtual address is approximately
(to the nearest 0.5 ns)
2 Marks GATE-CSE/IT-2003( )
[A] 8 KB [B] 12 KB
[C]16 KB [D]20KB
5) The essential content(s) in each entry of a page table is/are
1 Marks GATE-CSE/IT-2009( )
2 Marks GATE-CSE/IT-2009( )
[A] 4 [B] 5
[C]6 [D]7
8) In a system with 32 bit virtual addresses and 1 KB page size, use of one-level page tables for virtual to
physical address translation is not practical because of
1 Marks GATE-CSE/IT-2003( )
[A] the large amount of internal fragmentation [B] the large amount of external fragmentation
[C] the large memory overhead in maintaining page [D] the large computation overhead in the translation
tables process
9) The minimum number of page frames that must be allocated to a running process in a virtual memory
environment is determined by
1 Marks GATE-CSE/IT-2004( )
[A] The implementation may not work if context [B] Instead of using fetch-and-set, a pair of normal
switching is disabled in P load/store can be used
[C] [D]The code does not implement a binary
The implementation of V is wrong semaphore
11) A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-
aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The
minimum size of the TLB tag is
2 Marks GATE-CSE/IT-2006( )
[A] Efficient implementation of multi-user support is [B] The processor cache organization can be made
no longer possible more efficient now
[C] Hardware support for memory management is no
[D]CPU scheduling can be made more efficient now
longer needed
Memory Management
13) 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 used in the pseudocode shown below to
implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0
corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
AcquireLock(L){
While (Fetch And Add(L,1))
L = 1;
}
RLe=le0a;se Lock(L){
}
This i mplementation
2 Marks GATE-CSE/IT-2012( )
[A] fails as L can overflow [B] fails as L can take on a non-zero value when the
lock is actually available
[C] works correctly but may starve some processes [D] works correctly without starvation
14) Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If
one page fault is generated for every memory accesses, what is the effective access time for the
memory?
1 Marks GATE-CSE/IT-2011( )
[A] Has not been used for the longest time in the
[B] Will not be used for the longest time in the future.
past.
[C] Has been used least number of times. [D]Has been used most number of times.
20) In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on
2 Marks GATE-CSE/IT-2002( )
[A] the size of the blocks, and the size of the address [B] the number of blocks used for the index, and the
of the blocks. size of the blocks.
Memory Management
[A] exploit the temporal locality of reference in a [B] exploit the spatial locality of reference in a
program program
[C] reduce the miss penalty [D]none of the above
22) Which of the following statements is false?
1 Marks GATE-CSE/IT-2001( )
[A] always decrease the number of page faults [B] always increase the number of page faults
[C]sometimes increase the number of page faults [D]never affect the number of page faults
26) A graphics card has on board memory of 1 MB. Which of the following modes can the card not support?
2 Marks GATE-CSE/IT-2000( )
[A] 1600 × 400 resolution with 256 colours on a 17 [B] 1600 × 400 resolution with 16 million colours on a
inch monitor 14 inch monitor
[C]800 × 400 resolution with 16 million colours on a [D]800 × 800 resolution with 256 colours on a 14
17 inch monitor inch monitor
27) Suppose the time to service a page fault is on the average 10 milliseconds, while a memory access takes
1 microsecond. Then a 99.99% hit ratio results in average memory access time of
2 Marks GATE-CSE/IT-2000( )
1 Marks GATE-CSE/IT-1997( )
[A] A compiler using static memory allocation can be A compiler cannot be written for L; an interpreter
[B]
written for L must be used.
[C]A compiler using dynamic memory allocation can
[D] None of the above
be written for L
31) Thrashing
1 Marks GATE-CSE/IT-1997( )
The sequence of requests for blocks of size 300, 25, 125, 50 can be satisfied if we use
1 Marks GATE-CSE/IT-1994( )
39) 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 ?
2 Marks GATE-CSE/IT-2004( )
24 [B] 232 bytes
[A] 2 bytes
[C]234 bytes [D]248 bytes
40) A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-
aside buffer(TLB) which can hold a total of 128 page table entries and is 4-way setassociative. The
minimum size of the TLB tag is
2 Marks GATE-CSE/IT-2006( )
[A] Efficient implementation of multi-user support is [B] The processor cache organization can be made
no longer possible more efficient now
[C]Hardware support for memory management is no
[D]CPU scheduling can be made more efficient now
longer needed
42) The data block of a very large file in the Unix file system are allocated using
1 Marks GATE-CSE/IT-2008( )
44) A computer uses 46–bit virtual address, 32–bit physical address, and a three–level paged page table
organization. The page table base register stores the base address of the first–level table (T1 )
,which occupies exactly one page. Each entry of T1 stores the base address of a page of the
second–level table (T2 ). Each entry of T2 stores the base address of a page of the third–level table (T3 )
Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the
computer has a 1 MB 16 way set associative virtually indexed physically tagged cache. The cache block
size is 64 bytes.
[A] 2 [B] 4
[C]8 [D]16
45) What is the minimum number of page colours needed to guarantee that no two synonyms map to different
sets in the processor cache of this computer?
Memory Management
2 Marks GATE-CSE/IT-2013( )
[A] 2 [B] 4
[C]8 [D]16
Memory Management
Key Paper
1. B 2. C 3. D 4. C 5. B
6. B 7. B 8. C 9. A 10. A
1) Which of the following disk scheduling strategies is likely to give the best through put?
1 Marks GATE-CSE/IT-1999( )
[A] at a fixed address in main memory [B] at a fixed location on the disk
[C]anywhere on the disk [D]at a fixed location on the system disk
[E] anywhere on the system disk
3) Consider an operating system capable of loading andexecuting a single sequential user process at a time.
The disk head scheduling algorithm usedis First Served (FCFS). If FCFS is replaced by
ShortestSeekTimeFirst (SSTF), claimed by the vendor to given 50% better benchmark results, whatis
theexpected improvement in the I/Operformance of user programs?
1 Marks GATE-CSE/IT-2004( )
[A] Better disk throughput but poorer disk space [B] Better disk throughput and better disk space
utilization utilization
[C]Poorer disk throughput but better disk space [D] Poorer disk throughput and poorer disk space
utilization utilization.
7) 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 Served (FCFS). If FCFS is replaced by Shortest
Seek Time First (SSTF), claimed by the vendor to given 50% better benchmark results, what is the
expected improvement in the I/O performance of user programs?
1 Marks GATE-CSE/IT-2004( )
[C]25% [D] 0%
8) 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 bytes. Data are
organized cylinder–wise and the addressing format is . A file of size 42797 KB is stored in the disk and the
starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if
it is stored in a contiguous manner?
2 Marks GATE-CSE/IT-2013( )
Key Paper
1. C 2. A 3. D 4. B 5. A
6. A 7. D 8. D 9. C 10. B
11. B
Program Evaluation
What will be the size of the partition (in physical memory) required to load (and run) this program?
2 Marks GATE-CSE/IT-1998( )
[A] 12 KB [B] 14 KB
[C]10 KB [D]8 KB
2) A critical section is a program segment
1 Marks GATE-CSE/IT-1996( )
[A] 13 [B] 8
[C]7 [D]10
4) Which one of the following statements is true?
1 Marks GATE-CSE/IT-1994( )
[A] Macro definitions cannot appear within other [B] Overlaying is used to run a program which is
macro definitions in assembly language programs longer than the address space of computer
[C]Virtual memory can be used to accommodate a
[D]It is not possible to write interrupt service routines
program which is longer than the address space
in a high level language
of a computer
5) A part of the system software, which under all circumstances must reside in the main memory, is
2 Marks GATE-CSE/IT-1993( )
10) On a non-pipelined sequential processor, a program segment, which is a part of the interrupt service
routine, is given to transfer 500 bytes from an I/O device to memory.
Initialize the address register
Initialize the count to 500
LOOP: Load a byte from device
Store in memory at address given by address register
Increment the address register
Decrement the count
If count != 0 go to LOOP
Assume that each statement in this program is equivalent to a machine instruction which takes one clock
cycle to execute if it is a non-load/store instruction. The load-store instructions take two clock cycles to
execute.
The designer of the system also has an alternate approach of using the DMA controller to implement the
same transfer. The DMA controller requires 20 clock cycles for initialization and other overheads. Each
DMA transfer cycle takes two clock cycles to transfer one byte of data from the device to the memory.
What is the approximate speedup when the DMA controller based design is used in place of the interrupt
driven program based input-output?
2 Marks GATE-CSE/IT-2011( )
Key Paper
1. B 2. C 3. C 4. B 5. A
6. C 7. C 8. C 9. D 10. A