You are on page 1of 4

1313

No of Pages : 4 Course Code : 12I503

Roll No:
(To be filled in by the candidate)

PSG COLLEGE OF TECHNOLOGY, COIMBATORE - 641 004

SEMESTER EXAMINATIONS, NOVEMBER - 2016

BTech – INFORMATION TECHNOLOGY Semester : 5

12I503 OPERATING SYSTEMS

Time : 3 Hours Maximum Marks : 100

INSTRUCTIONS:
1. Answer ALL questions from GROUP – I.
2. Answer any FIVE questions from GROUP – II.
3. Answer any ONE question from GROUP – III.
4. Ignore the box titled as “Answers for Group III” in the Main Answer Book.
GROUP - I Marks : 10 x 3 = 30

1. An application program for an automobile is required to perform the following


a) Monitor and display the speed of the automobile.
b) Monitor the fuel level and raise an alarm if necessary.
c) Monitor the engine condition and raise an alarm in unusual condition.
What type of OS would better support this application? Why?
2. Classify the users of operating system and indicate what aspects of OS each class of users
are interested in.
3. A process is in the blocked state. Give a sequence of state transitions through which it
would have reached this state and through which it could reach the ready state. Is more
than one sequence of state transitions possible in each of these cases?
4. An airline reservation system using a centralized database services users concurrently. Is it
preferable to use threads rather than processes in this system? Give reasons.
5. A free list contains three memory areas of sizes 6KB, 15KB and 12 KB. The next four
memory requests are for 10KB, 2 KB, 5KB and 14KB of memory. Which of the following
placement strategies First-fit, Best-fit, Worst-fit and Nest-fit would be able to accommodate
all four processes?
6. The size of the page table grows for large processes. Suggest alternate structures to
overcome the problem.
7. An index sequential access file contains 10,000 records. Its index contains 100 entries.
Each index entry describes an area of the file that contains 100 records. If all records in the
file have the same probability of being accessed, calculate the average number of disk
operations involved in accessing a record. Compare this with the number of disk operations
required if the same records were stored in a sequential file.
8. Suggest alternative protection structures to overcome the larger size of access control
matrix.
9. State the need for buffering in performing I/O operations.
10. Compare the performance of write operations achieved by a RAID level 5 organization with
that achieved by a RAID level 1 organization.
Page No: 1
1313

No of Pages : 4 Course Code : 12I503

GROUP - II Marks : 5 x 10 = 50

11. Define the essential properties of the following types of operating systems
(i) Batch (ii) Multiprogramming (iii) Timesharing (iv) Real time (v) Distributed
12. What is a Semaphore? Explain how semaphore can be used as a synchronization tool.
Consider a coke machine that has 10 slots. The producer is the delivery person and the
consumer is the student using the machine. We use the following three semaphores:
semaphore mutex
semaphore fullBuffer /* Number of filled slots */
semaphore emptyBuffer /* Number of empty slots */
What will be the initial values of the semaphores?
Write a solution that guarantees mutual exclusion and no deadlocks.
13. Consider the execution of two processes P1 and P2 with the following CPU and I/O burst
times.
P1 P2
CPU – 3 CPU – 4
Net – 4 Disk – 3
CPU – 2 CPU – 3
Disk - 3 Net - 3

Each row shows the required resource for the process and the time that the process needs
that resource. For example “Net 3” in fourth row says that P2 needs network card for 3 time
units.
i) If P2 arrives 2 time units after P1 and the scheduling policy is non-preemptive SJF then
calculate the finish time for each process and the CPU idle time in that duration.
ii) If P2 arrives 2 time units before P1 and the scheduling policy is preemptive SJF then
calculate the finish time for each process and the CPU idle time in that duration.
14. When do page faults occur? List the actions taken by the operating system when a page
fault occurs. Consider the following sequence of memory references from a 460 bytes size
program:
10,11,104,170,73,309,185,245,246,435,458,364.
(i) Give the reference string, assuming a page size of 100 bytes.
(ii) Find the page fault rate for the reference string obtained in (i), assuming 200 bytes (2
frames) of main memory is available to the program if the page replacement is LRU.
(iii) If the system has the memory access time of 1000 nanosecond and a page fault service
time if 30 milliseconds and the probability of a page fault is 0.3, what is the effective
access time?
15. Discuss on the different ways of organizing directories. A file named data is frequently
accessed by users in a system. The following alternatives are proposed to simplify access to
data.
a. Set up links from every user’s home directory to data
b. Copy data into every user’s home directory.
Compare the advantages and drawbacks of these approaches.
Page No: 2
1313

No of Pages : 4 Course Code : 12I503

16. Consider a disk with the following specifications:


 Using five platters
 One platter consist of two surfaces(0 and 1)
 One surface capacity 5 GB
 Total tracks on one surface : 2500 (0 to 2499)
 Speed of rotation: 6000 rpm
 Total sectors in one track:500(0 to 499)
 Time needed to move from one track to adjacent track : 1 ms
 Assume only one head active. Time needed to move from surface 0 to surface 1 is 0 ms
 At T=0, the head position is above cylinder 0, sector 0
Answer the following
(a) Determine the capacity of one cylinder and disk size.
(b) How long does it take to read/write one sector?
(c) Determine the time (in ms) to move from surface 0, track 0, sector 0 to surface 0,
track4,sector 399 ([0,0,00,4,399])
(d) Some processes request to read/write some cylinders in surface 0. System pools the
entire request on the following queue as 200, 1500, 900, 2000, 340, 500, 1100, and
1800. If the current reading is at cylinder 1000, determine the cylinder access sequence
and its total movement if SSTF and SCAN disk scheduling algorithms are used.

GROUP - III Marks : 1 x 20 = 20


17. State the necessary conditions for deadlock to occur in a system. A restaurant would like to
serve four dinner parties, P1 through P4. The restaurant has a total of 8 plates and 12
bowls. Assume that each group of diners will stop eating and wait for the waiter to bring a
requested item(plate or bowl) to the table when it is required. Assume that the diners don’t
mind waiting. The maximum request and current allocation tables are as follows:

Maximum Plates Bowls Current Plates Bowls


Request Allocation
P1 7 7 P1 2 3
P2 6 10 P2 3 5
P3 1 2 P3 0 1
P4 2 4 P4 1 2

a) Determine the Need for Plates and Bowls.


b) Will the restaurant be able to feed all four parties successfully? Clearly explain the
answer giving a safe serving order if possible.
c) Assume a new dinner party P5 comes to the restaurant now. Their maximum needs
are 5 plates and 3 bowls. Initially the waiter bring 2 plates to them. Determine the
new Need for Plates and Bowls. In order to be able to feed all five parties
successfully, the restaurant needs more plates. Atleast how many plates would the
restaurant need to add?
d) Show a safe serving sequence.

Page No: 3
1313

No of Pages : 4 Course Code : 12I503

18. Describe the various file allocation strategies. Suppose we have files F1, F2, F3 and F4 in
sizes 7178, 572, 499 and 1195 bytes. The capacity of the disk is 50 KB with fixed physical
block size of 512 bytes for allocation.
i) How many physical blocks would be needed to store these four files? Assume that in
case of linked allocation strategy, 5 bytes are needed to store the next block in the link.
ii) Using a diagram, show how allocation for these files is done in contiguous, linked and
indexed allocation.
iii) What is the type of fragmentation associated with each of file allocation policies. For each
file, find the internal fragmentation measured as percentage of the file size.
iv) Write the bit vector for the disk and calculate the size of the bit-vector.
v) Now, the size of the file F3 is increased to 600 bytes. How many more physical block sare
required? How many disk IO is to be performed to add the new block(s) at the end in
each allocation policy? Assume that the new block(s) are in memory and other structures
are in disk.

/END/
FD/RL

Page No: 4

You might also like