Sunday, 19 August 2012

Operating System ( Scheduling & Deadlock)


              Operating system question (scheduling & deadlock)

1) The scheduling in which CPU is allocated to the process with least CPU-burst time
   is called
             (A) Priority Scheduling (B) Shortest job first Scheduling
             (C) Round Robin Scheduling (D) Multilevel Queue Scheduling

2) Which of the following approaches do not require knowledge of the system state?
   (A) Deadlock detection. (B) Deadlock prevention.
   (C) Deadlock avoidance. (D) None of the above.

3) Poor response time is usually caused by
    (A) Process busy
    (B) High I/O rates
    (C) High paging rates
    (D) Any of the above

4) Which scheduling policy is most suitable for a time-shared operating system
    (A) Shortest-job First. (B) Elevator.
    (C) Round-Robin. (D) First-Come-First-Serve.

5) Which amongst the following is not a valid page replacement policy?
    (A) LRU policy (Least Recently Used)
    (B) FIFO policy (First in first out)
    (C) RU policy (Recurrently used)
    (D) Optimal page replacement policy

6) Jobs which are admitted to the system for processing is called
   (A) long-term scheduling (B) short-term scheduling
   (C) medium-term scheduling (D) queuing

7) Before proceeding with its execution, each process must acquire all the resources
    it needs is called
   (A) hold and wait (B) No pre-emption
   (C) circular wait (D) starvation

8) In which of the following page replacement policies Balady’s anomaly occurs?
   (A) FIFO (B) LRU
   (C) LFU (D) NRU

9) ___________ is a technique of temporarily removing inactive programs from the
   memory of computer system
  (A) Swapping (B) Spooling
  (C) Semaphore (D) Scheduler

10) CPU burst time indicates the time, the process needs the CPU. The following are
    the set of processes with their respective CPU burst time (in milliseconds).
    Processes                   CPU-burst time
    P1                                       10
    P2                                         5
    P3                                         5
   Calculate the average waiting time if the process arrived in the following
   order:
(i)           P1, P2 & P3 (ii) P2, P3 & P1
   What are the four necessary conditions of deadlock prevention?

17) List and explain the three events concerning resource allocation. Define the
    following:
   (i) Deadlock.
   (ii) Resource request and allocation graph (RRAG)
   (iii)Wait for graph (WFG)

18) Consider the following set of jobs with their arrival times, execution time (in
      Minutes) , and deadlines.
     Job Ids       Arrival Time                  Execution time            Deadline
         1                     0                                        5                                     5
         2                     1                                        15                                   25
         3                     3                                        12                                   10
         4                     7                                        25                                   50
         5                    10                                       5                                     12
        Calculate the mean turn-around time, the mean weighted turn-around time and
        the throughput for FCFS, SJN and deadline scheduling
        algorithms.

19)Define deadlock? Explain 

No comments:

Post a Comment