Operating System |Gate-2014| Previous year question|Set-7

Set-15 Operating System Questions

Operating System |Gate-2014|

1. 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, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests. [GATE – 2014]

a. 3
b. 4
c. 5
d. 6

Answer :   a)


2. Which one of the following is FALSE? [GATE – 2014]

a. User level threads are not scheduled by the kernel.
b. Context switching between user level threads is faster than context switching between kernel level threads.
c. When a user level thread is blocked, all other threads of its process are blocked.
d. Kernel level threads cannot share the code segment.

Answer : d)


3. The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds for a read operation with a miss in cache, 2 nanoseconds for a write operation with a hit in cache and 10 nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves 100 instruction fetch operations, 60 memory operand read operations and 40 memory operand write operations. The cache hit-ratio is 0.9.  The average memory access time (in nanoseconds) in executing the sequence of instructions is   __________. [GATE – 2014]

a. 1.68
b. 1.69
c. 1.70
d. 1.71

Answer : a)


4. 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 milliseconds to access the physical memory. If the TLB hit ratio is 0.6, the effective memory access time (in milliseconds) is  _________. [GATE – 2014]

a. 122
b. 123
c. 124
d. 125

Answer : a)


5. 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 time (in milliseconds):

ProcessArrival TimeBurst Time
P1012
P224
P336
P485

The average waiting time (in milliseconds) of the processes 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):

ProcessArrival TimeBurst Time
P1012
P224
P336
P485

The average waiting time (in milliseconds) of the processes is ______. [GATE – 2014]

a. 5.8
b. 5.7
c. 5.6
d. 5.5

Answer :d)


6. Consider the basic block given below. a = b + c c = a + d d = b + c e = d – b a = e + b The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are  : [GATE – 2014]

a. 8 and 10
b. 6 and 6
c. 9 and 12
d. 4 and 4

Answer : b)


7. 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 _________. [GATE – 2014]

a. 7
b. 8
c. 9
d. 10

Answer : a)


8. 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 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 this program? [GATE – 2014]

a. Least-recently-used
b. First-in-first-out
c. Most-recently-used
d. Last-in-first-out

Answer : c)


9. 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 tc CPU milliseconds and then initiates a single I/O operation that lasts for tio milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics:

 Process id      tc      tio

     A        100 ms    500 ms
     B        350 ms    500 ms
     C        200 ms    500 ms

The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ___________.[GATE – 2014]

a. 1000
b. 1001
c. 1002
d. 1003

Answer : a)


10. 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 100 × 106 bytes disk on which the file system is stored and data block size is 103 bytes, the maximum size of a file that can be stored on this disk in units of 106 bytes is ____________. [GATE – 2014]

  1. 99.61
  2. 99.60
  3. 99.62
  4. 99.63

Answer : b)


11. 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 replacement policy is__________. [GATE – 2014]

a. 7
b. 8
c. 9
d. 10

Answer:  a)
Operating System |Gate-2014|


12. Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.

Process NameArrival timeExecution Time
A06
B32
C54
D76
E103

Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________. [GATE – 2014]

a. 7.2
b. 7.3
c. 7.4
d. 7.5

Answer:  a)
Operating System |Gate-2014|


Back to GATE-HOME


Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *