Friday, December 3, 2010

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA-II Semester Regular Examinations July 2010 OPERATING SYSTEMS

Code No: 22

Time: 3hours
Max.Marks:60

Answer any Five questions
All questions carry equal Marks

1. a) Differentiate between system call and Library function. What are the steps involved in executing system calls?
b) List the essential properties of the following types of operating systems:
i) Real Time
ii) Handheld

2. a) What is the difference between user level threads and kernel level threads? List out the advantages and disadvantages of each.
b) Consider the following set of processes with their arrival times and burst times Process Arrival time Burst time

A 0 10
B 2 6
C 10 4
D 12 8
E 15 5

The system uses dual core processor and at most two processes can be in running state at any time. Draw Gantt chart using FCFS scheduling. What is the CPU utilization and average turnaround time.

3. a) What is thrashing? What are its causes and effects? How do you reduce thrashing?
b) A process contain six virtual pages on disk and is assigned a fixed allocation of
4 frames in main memory. The following page trace occurs:
4,5,1,0,2,2,1,6,5,6,0,3,2,4,0,3,1,5,5,4,6,0,2,6,1 Show the successive pages residing in the four frames using LRU replacement strategy. Compute hit ratio in the main memory. Assume the frames are initially empty.

4. a) Discuss various strategies for free space management on disk along with their merits and demerits.
b) Give an example of an application in which data in a file should be accessed in the following order:
i) Sequentially
ii) Randomly

5. A barbershop consists of a waiting room with n chairs and the barber room containing the barber chair. If there are no customers to be served, the barber goes to sleep. If customer enters the barber shop and all chairs are occupied, then the customer leaves the shop. If the barber is busy but chairs are available, then the customer sits in one of free chairs. If barber is asleep, the customer wakes up the barber. Write a program to coordinate the barber and customer.



6. a) List out the necessary conditions for deadlock.
b) A system has 6 devices D1,D2,D3,D4,D5 and D6 and four processes P1,P2, P3 and P4. P1 is holding D1 and D2 and waiting for D3. P2 is holding D4 and waiting for D5. P3 is holding D6 and D3 and waiting for D5. P4 is holding D5 and waiting for D1. Draw resource allocation graph and wait-for graph. Is the system in deadlock state or not?

7. a) What is an i-node in UNIX operating system? Explain its structure.
b) Explain interprocess communication primitives in UNIX.

8. How threads are organized in Windows operating system? List various thread synchronization primitives provided in Windows.

No comments:

Post a Comment