Operating System (Test 2)

Gate Exam : Cs Computer Science And Information Technology

| Home | | Gate Exam | | Cs Computer Science And Information Technology | | Operating System |

Operating System

Operating System
| Operating System |
Q.1
A main memory unit with a capacity of 4 megabytes is built using 1M×1-bit DRAM chips. Each DRAM chip has 1K rows of cells with 1K cells in each row. The time taken for a single refresh operation is 100 nanoseconds. The time required to perform one refresh operation on all the cells in the memory unit is
A. 100 nanoseconds
B. 100*210 nanoseconds
C.  100*220 nanoseconds 
D. 3200*220 nanoseconds 
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.2
Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIX socket APL
A. listen, accept, bind recv
B. bind, listen, accept, recv
C. bind, accept, listen, recv
D. accept, listen, bind recv
Answer : Option B
Explaination / Solution:

The correct order in which a server process must invoke the function calls is bind, listen, accept and recv. First three are used in connection establishment phase and recv is used in data transfer phase.

Workspace
Report
Q.3
Which one of the following statements is NOT correct about HTTP cookies?
A. A cookie is a piece of code that has the potential to compromise the security of an internet user
B. A cookie gains entry to the user‟s work area through an HTTP header
C. A cookie has an expiry date and time
D. Cookies can be used to track the browsing pattern of a user at a particular site
Answer : Option B
Explaination / Solution:

(A) is correct 
(B) Option B is false 
(C) Option C is correct 
(D) Option D is correct


Workspace
Report
Q.4
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, which of the followings is TRUE?
A. On per-thread basis, the OS maintains only CPU register state
B. The OS does not maintain a separate stack for each thread
C. On per-thread basis, the OS does not maintain virtual memory state
D. On per thread basis, the OS maintains only scheduling and accounting information
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.5
 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 106 memory accesses, what is the effective access time for the memory?
A. 21ns
B. 30ns
C. 23ns
D. 35ns
Answer : Option B
Explaination / Solution:

 P = page fault rate 
EA = p × page fault service time 
+(1 - p) × Memory access time


Workspace
Report
Q.6
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 sizes 357 KB, 210KB, 468 KB and 491 KB in that order. If the best fit algorithm is used, which partitions are NOT allotted to any process?
A. 200KB and 300 KB
B. 200KB and 250 KB
C. 250KB and 300 KB
D. 300KB and 400 KB
Answer : Option A
Explaination / Solution:



Workspace
Report
Q.7
Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?
A. tt2
B. tt2
C. tt2
D.  Nothing can be said about the relation between tand t2
Answer : Option C
Explaination / Solution:

Process switching also involves mode changing.

Workspace
Report
Q.8
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
A. Interrupt from Hard Disk
B. Interrupt from Mouse
C. Interrupt from Keyboard
D. Interrupt from CPU temp sensor
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.9
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 algorithms would minimize the average waiting time in the ready queue?
A. Shortest remaining time first
B. Round-robin with time quantum less than the shortest CPU burst
C. Uniform random
D. Highest priority first with priority proportional to CPU burst length
Answer : Option A
Explaination / Solution:

SRTF is pre emptive SJF which produces less average waiting time.

Workspace
Report
Q.10
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?
A. 5.0 ms
B. 4.33 ms
C. 6.33 ms
D. 7.33 ms
Answer : Option A
Explaination / Solution:


Average waiting time = (4+11)/3 = 5 ms

Workspace
Report


CS Computer Science and Information Technology