Flowchart: Alternate Process: AUGUST 2009Code: CS31                                                                              Subject: OPERATING SYSTEMS

Time: 3 Hours                                                                                                     Max. Marks: 100



·      Question 1 is compulsory and carries 28 marks. Answer any FOUR questions from the rest.  Marks are indicated against each question.

·      Parts of a question should be answered at the same place.



Q.1      a.  How do system calls differ from ordinary library routines, though both are supplied by the language?


             b.  Explain the difference between starvation and blocking.


             c.  What two events can cause a process to loose control of the processor?


             d.  A system is in an unsafe state. Is it possible for the processes to complete their execution without entering deadlock? If yes, show how?


             e.  How are critical section and the principle of mutual exclusion related to each other?


             f.   Explain the user authentication process governed by an operating system.


             g. What is multiprocessor system and how the operating system for multiprocessor is designed?            (7  4)


Q.2       a.  Assuming a cluster size of 512 bytes, calculate the percentage in file space due to incomplete filling of last clusters, for the file sizes (i) 1200 bytes (ii) 20,000 bytes.


             b.  A CPU scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled on one processor, how many different possible schedules are there? Give a formula in terms of n.                                                                                                           (9 + 9)


  Q.3     a.  What is the concept of virtual memory system with an example? Is it possible to implement it with segmentation? Explain how?


             b.  At some point in time, the following holes (in the order) are created by a variable partition memory. 20K, 15K, 40K, 60K, 10K, 25K. For a new process of 25 K, which hole would be filled using best fit, first fit, and worst fit?                                                                                                                          (9 + 9)


  Q.4     a.  What is Semaphore? Write the code for Producer-Consumer problem using Semaphore.  


             b.  Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and released by processes only one at a time. Show that the system is deadlock-free if the following two conditions hold:

                  (i)  The maximum need of each process is between 1 and m resources

                  (ii) The sum of all maximum needs is less than m + n                                                (9 + 9)


  Q.5     a.  Assume that we have a paging system with page table stored in memory. If a memory reference takes 200 ns, how long does a paged memory reference take? If we add associative registers and 75% of all page table references are found in the associative registers, what is the effective memory reference time? Assume that finding a page table entry in the associative registers takes zero time if the entry is there.


             b.  For the given snapshot of a system:

Allocation         Max          Available

A B C D          A B C D    A B C D

P1        0  0 1  2           0 0 1 2      1  5  2 0

P2        1 0 0 0             1 7 5 0        

P3        1 3 5 4             2 3 5 6

P4        0 6 3 2             0 6 5 2

P5        0 0 1 4             0 6 5 6

                  Answer the following using Banker’s Algorithm:

(i)                                                                                                                                                                                                                                                                    What is the content of the matrix Need?

(ii)                                                                                                                                                                                                                                                                  Is the system in a safe state?

(iii)                                                                                                                                                                                                                                                                If a request from process P2 arrives for (0, 4 2, 0), will it be granted?                                            

                                                                                                                  (9 + 9)


  Q.6     a.  What is the “Locality of Reference” concept and why it is important? What is the need to have a logical to physical map? Is it by design or incidental that the page sizes are chosen to be power of two?


             b.  To provide a single image of the OS, distributed OS has to address number of transparency issues. Briefly discuss few important transparency issues in distributed OS.                                    (9 + 9)


  Q.7          Write Short notes on the following


(i)                                                                                                                                                                                                                                                                    Directing Implementation.

(ii)                                                                                                                                                                                                                                                                   Network OS, Multiprocessor OS, and Distributed OS.

(iii)                                                                                                                                                                                                                                                                        Bernstein’s Condition for concurrency.                                                                       (6+6+6)