OS Questions and Answers Set 3


Operating System (OS)

Questions 21 to 30

21.
Which of the following can be said about a segmentation fault caused when a process is active?
(a)   It will recover from the fault transparently to the user, by moving the required page from the secondary memory
(b)   The fault’s cause may most likely be an error in programming
(c)   It will not  abruptly terminate the process and a core image of the process will be saved for further observations
(d)   It will cause the process to go into the ‘blocked’ state
(e)   It will most likely be caused by a hardware fault.
22.
A common programming construct for implementing mutual exclusion which uses condition variables is called
(a)  Semaphore                                      (b)  Deadlock                                         (c)  Monitor
(d)  Locking interrupts                             (e)  Threads.
23.
Suppose requests have recently arrived for data on cylinders 25, 46, 12, and 3, in that order, and that the read-write head is currently at cylinder 20.  If the disk scheduling policy is SSTF, the outstanding requests will be serviced in the order
(a)  25, 46, 12, 3                                     (b)  25, 46, 3, 12                            (c)  3, 12, 25, 46
(d)  25, 12, 3, 46                                     (e)  12,3,25,46.
24.
DMA stands for
(a)  Direct Management access               (b)  Direct memory access
(c)  Dual memory access                        (d)  Data memory access
(e)  Dual memory array.
25.
Which of the following disk-scheduling methods is most likely to lead to starvation for requests on inner or outer cylinders?
(a)  FCFS                (b)  SSTF                (c)  SCAN                (d)  C-SCAN            (e)  b-SCAN.
26.
Which of the following is in correct order of size, smallest first?
(a)  Cylinder, track, sector                       (b)  Cylinder, sector, track                      
(c)  Sector, track, cylinder                       (d)  Sector, cylinder, track                      
(e)  Track, cylinder, sector.
27.
A process that executes a READ instruction for a data record currently on disk will undergo a process state transition from
(a)  Ready to blocked                                                            (b)  Running to blocked        (c)  Blocked to ready
(d)  Blocked to running                            (e)  Terminated.
28.
In a certain system, process A has just arrived at time 0, process B at time 3, and process C at time 6.  A needs 5 seconds in the CPU, B 3 seconds, and C 1 second.  All processes are totally CPU-bound and process-switching time is negligible, so that after 9 seconds all processes have completed.  At what time does process B complete if the process-scheduling algorithm is preemptive SJF and the quantum is 1 second?
(a)  6                       (b)  7                       (c)  8                       (d)  9                       (e)  10.
29.
If the value of a binary semaphore S is 0, and a process executes a WAIT instruction on S, then
(a)   S will remain zero and the process will proceed
(b)   S will remain zero and the process will be placed on a queue
(c)   S will become one and the process will proceed
(d)   S will become one and the process will be placed on a queue
(e)   S will become -1 and the process will not be placed on a queue.
30.
The process of collecting fragments of available memory space into contiguous blocks by moving programs and data in a computer's memory or disk is known as 
(a)  Compaction       (b)  Coalescing         (c)  Segmentation     (d)  Fragmentation    (e)  Paging.

Answers


21.
Answer : (b)
Reason:  It will  abruptly terminate the process and a core image of the process will be saved for further observations.
22.
Answer : (c)
Reason:  Monitor uses a condition variable for implementing mutual exclusion.
23.
Answer : (d)
Reason:  Remaining all donot satisfy the SSTF policy.
24.
Answer : (b)
Reason:  DMA stands for direct memory Acess.
25.
Answer : (b)
Reason:  SSTF disk scheduling method is most likely to lead to starvation for requests on inner or outer cylinders.
26.
Answer : (c)
Reason:  Sector track and cylinder is the correct order of size.
27.
Answer : (b)
Reason:  Running to blocked is the correct process state transition.
28.
Answer : (d)
Reason:  In Preemptive SJF the process B complete in 9 seconds.
29.
Answer : (b)
Reason:  According to the condition of semaphore s will remain zero and the process will be placed on a quesue.
30.
Answer : (a)
Reason:  Compaction is the process of collecting fragments of available memory space into contiguous blocks by moving programs and data in a computer's memory or disk.



1 comment :

  1. Did you know that that you can generate dollars by locking premium pages of your blog / website?
    Simply open an account with AdWorkMedia and implement their content locking plug-in.

    ReplyDelete