ALCCS

 

 

Code: CS31††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††† Subject: OPERATING SYSTEMS

Flowchart: Alternate Process: SEPTEMBER 2010Time: 3 Hours††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† †††††††† Max. Marks: 100

 

NOTE:

      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.Differentiate between multiprogramming, multitasking, timesharing and multiprocessing systems.

†††††† b.Briefly explain Process Control Block (PCB).

††††† c. What is a semaphore? What is its use?

          ††

††††† d. What is a system call? How it is different from a Library Call?

                     

†††††† e. Differentiate between physical address and logical address.

f. What is the meaning of the term busy waiting? What other kinds of waiting are there? Can     busy waiting be avoided altogether?

g. What is the difference between logical clock and physical clock? Briefly explain with an      example.†††††† ††††††† ††† †††††††††††††††† ††††††††††††††††††††††††††††††††††† ††††††††††† ††††††††††††††††††††††† (74)

Q.2 a. Explain how short term, medium term, and long term scheduler work giving suitable            example.†††††† ††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† (9)

††††† b. Explain Synchronous and Asynchronous RPC (Remote Procedure Call) mechanism with            an example.††††† ††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† ††††††††††††††††††††††††††††††††††† (9)

Q.3 a. What are the benefits of a distributed file system when compared with a file in a

††††††††††† centralized system?†††††† ††††††††††† ††††††††††††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† (9)

†††††††

       b. What aspects of a distributed system would you select for a system running on a totally reliable network?††††††††††††††††††††††††††††† ††††††††††† †††††† ††† †††††††††††††††††††††††† ††††††††††††††††††††††† ††††††††††† (9)

 

Q.4 a.Write Bankerís safety algorithm and prove that the Bankerís safety algorithm requires an order of M N2 operations.††††††††††† †††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† ††††††††††††††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† (9)

b. What do you mean by critical section? Using semaphores, write a solution to the readers ††††††††††† and writers problem that gives priority to readers.

 

 

 

 

 

(The readers and writers problem: any number of readers may simultaneously be reading from a file, and no reader can be reading while a writer is writing).††††††††††††††††††††††††††††††††††† (9)

 

Q.5 a. Consider the following snapshot of a system:

††††††††††††††††††††††† Allocation†††††††† Max†††††††††††††††† Available

††††††††††††††††††††††† ABCD†††††††††††† ABCD†††††††††††† ABCD

††††††††††† P0††††††† 0012††††††††††††††† 0012††††††††††††††† 1520

††††††††††† P1††††††† 1000††††††††††††††† 1750†††††††††††††††††††††††††††††††††††††††

††††††††††† P2††††††† 1354††††††††††††††† 2356

††††††††††† P3††††††† 0632††††††††††††††† 0652

††††††††††† P4††††††† 0014††††††††††††††† 0656

Answer the following questions using Bankerís algorithm:

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

ii) Is the system in a safe state?

††††††††††† iii) If a request from P1 arrives for (0,4,2,0), can the request be granted ††††††††††††††††††††††††††††††††††† ††††††††††† ††††††immediately? Apply bankerís safety algorithm to test this.††††††††††††††††††††††††††††††††† (9)

††††††

†††††† b. How many types of multiprocessor Operating Systems are there? Explain its functions and requirements.††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††(9)

 

Q.6 a. When do page faults occur? Describe the actions taken by the operating system when a††††††††††† page fault occurs.

†††††††††††††††††† †††††††††††††††††††††††††††††††††††††††††††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††† ††††††††††† (6)

b. What is the cause of thrashing? How does the system detect thrashing? What are the models       used to avoid thrashing.††† †††††† †††††††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† (6)

 

c.Explain Direct Memory Access? How does DMA increase system concurrency? How does it complicate hardware design?†††††††††††††††††††††††††††††††††††††††††††††††††††††† ††††† †††††††††††††††††††(6)

 

Q.7 †††† Write the short notes on:††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††

 

(a)Interrupt Handlers

(b) Election Algorithms in Distributed OS.

(c) Starvation & Aging†††††††††††††††††††††††††††††††††† ††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† (6+6+6)