Operating System Class Test



OPERATING SYSTEM EXAMINATION


TOTAL MARKS:100                                                                                                                                 TIME: 3 Hours


Note:   (i)   Attempt ALL questions.
(ii)     All questions carry equal marks.
(iii)    Be precise in your answer.

Q1. Attempt all  parts of the following:                                                                                        (5*4=20)
(a) Define operating system and prove the statement ,”operating system works as a resource manager”.
    (b) Discuss different types of operating system in brief.
 (c)Write down short notes on the following-
    (i) Spooling                (ii) System call                      (iii) System program
     (e) What are the advantages of the layered approach to system design?

Q2. Attempt any four parts of the following, (e) part is compulsory:                                   (5*4=20)
(a) What are the five major activities of an operating system in regard to process management?
(b) What is the purpose of the command interpreter? Why is it usually separate from kernel?
(c)Write down short notes on the following-
    (i) Context switch    (ii) Scheduler
(d) What are the benefits and the detriments of each of the following?
    (i) Direct and indirect communication
    (ii) Symmetric and asymmetric communication
(e) Consider the interprocess-communication scheme where mailboxes are used.
(i) Suppose a process P wants to wait for two messages, one from mailbox A and one from mailbox B. What sequence of send and receive should it execute?
    (ii) What sequence of send and receive should P execute if P wants to wait for one message from mailbox A or from mailbox B (or from both)?

Q3. Attempt all  parts of the following:                                                                                        (15*2=30)
(a) Using preemptive  Priority, Round Robin (quantum=5)   ,shortest remaining time first ,calculate average waiting time and average turnaround time  with the following  data—(assume 1 means highest priority)
Process                  Arrival time          Priority             CPU burst time(ms)
p1                               0                          4                       8
p2                               1                          3                      4
p3                               2                          2                      12
    p4                                 3                          1                       5
.(b) Solve following question using earliest deadline first method and also show is there any process would incur deadline overrun?




Q4. Attempt any two parts of the following, part ( b) is compulsory:                                   (15*2=30)
(a) (i)A binary semaphore is a semaphore with an integer value that can range only between 0 and 1. Show how a general semaphore can be implemented using binary semaphores.
    (ii) Write down producer consumer problem using semaphores.
(b)    Consider the following snapshot  of a system
                        Allocation                      Max                              Available
                                A     B      C                  A      B       C                    A     B      C
P0          0      1       0                  7       5        3                    3      3       2

P1          2       0       0                  3       2       2

P2           3       0       2                 9       0       2

P3           2       1       1                2        2       2

P4           0       0       2                4        3       3
(i)                   calculate NEED  matrix
(ii)                 Is this system in safe state?
(iii)             If a request (1,0,2) for process  p1 can be granted  immediately.
(c) (i) Explain and solve Readers – Writers problem using Semaphores.
     (ii) Explain necessary and sufficient condition for occurring deadlock.