OS 5th ETC M 14
OS 5th ETC M 14
Fifth Semester
Fundamentals of Operating Systems
Note: Attempt for 14 marks within each Unit. Assume suitable data wherever deemed necessary.
Unit – I
A List the resources of a computer system and explain why operating system is called a resource 7
manager. Define giving example, Kernel and shell (command interpreter).
B i. Differentiate on at least three points, (giving suitable diagram, if needed) among Batch 7
OS and Time-shared OS.
ii. Explain what is ‘degree of multiprogramming’ and how it affects the performance of a
system? List one scenario which supports high degree of multiprogramming and another
where it is needed to reduce it.
C “Creation of job pool helps in overlapping I/O of jobs with execution of another one/s, which 7
increases the throughput of the system.” State, whether you agree with the foregoing statement.
Explain giving a neat sketch the “SPOOLing” and multiprogramming.
Unit – II
A i. Define a process. How a process is identified within a system by the OS and what 7
essential data are normally kept by OS for each process.
ii. Draw the three state “process state diagram” and explain each state clearly.
B Consider the precedence graph of the figure (2.1) below. Suppose that we add the edge (S 2, S4) 7
to the graph.
(i) How can resulting precedence graph be expressed if P and V semaphore are used?
(ii) Give ‘fork’ and ‘join’ construct for the resulting precedence graph.
S1
S2 S3 S4
S5
S6
(Fig. (2.1))
Page # 1 of 3 EC514
(Fig. (2.2))
Unit – III
A Following is the construct of producer and consumer processes which are running concurrently 7
in a system. If the value of counter = 5, show how updating counter variable can be wrong due
to critical section. Give your explanation stepwise. What are the three conditions which must
meet for a perfect solution to critical section? List and explain briefly.
#define BUFSZ 10
typedef struct { . . . } item;
item buffer[BUFSZ];
int in = 0;
int out = 0;
int counter = 0;
Producer
Consumer
item nextProduced;
item nextConsumed;
while while
(TRUE)(TRUE)
{ {
while while
(counter == BUFSZ);
(counter == 0) ;
buffer[in] = nextProduced;
nextConsumed = buffer[out];
in = (in
out += 1) % BUFSZ;
(out + 1) % BUFSZ;
counter++;
counter--;
} }
B Given that a system is working under the following process load and arrival times, determine the 7
average turn around time and average waiting time for FCFS and SJF (non-preemptive) giving
suitable Gantt charts
C At a given moment the following table shows the ‘snap shot’ of a system:- 7
Page # 2 of 3 EC514
Process Allocation Maximum Need Available
A B C D A B C D A B C D
P0 1 0 2 0 3 2 4 2 3 4 0 1
P1 0 3 1 2 3 5 1 2
P2 2 4 5 1 2 7 7 5
P3 3 0 0 6 5 5 0 8
P4 4 2 1 3 6 2 1 4
Unit - IV
A i. List the three strategies (algorithms) to select a free hole from the available free holes in MVT. 7
Explain the best fit strategy.
ii. In a system if page size (hence the frame size) is 1KB, find the physical addresses corresponding
to following logical addresses:-
(3, 588)
(2, 1011)
(5, 56). Given that the page and frame numbering starts from 0 onwards.
C The number of frames available in the memory is given to be 5 and following is the page 7
reference string:
1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4
Find out the number of Page Faults for Optimal Page replacement Algorithm.
D i. For a computer system the frequent page table entries are maintained in a ‘Cache’ with a hit ratio 7
of 75%. If the RAM access time is 1 microsecond and that of Cache is 0.20 microsecond,
determine the Average memory Access Time.
ii. Explain what is ‘Thrashing’ and how it can be reduced if the number of the frames in the
Memory are fixed.
Unit – V
A Explain the Tree structured Directory system giving suitable diagrams. Explain what absolute 7
and relative path names are.
B Explain the Indexed allocation of disk blocks for file storage giving suitable sketch and explain 7
why it is more reliable and economical then the Linked allocation.
C Following is the block request string for disc I/O, when the head is currently at location 120 th 7
track and moving towards track 0.
53, 78, 54, 39, 128, 139, 140, 66, 170, 18
Given that total number of tracks on the disk is 200. Calculate the average head movements
required to serve the above requests for :-
i) FIFO disk Scheduling algorithm, and
ii) SSTF disk Scheduling algorithm.
-oOo-
Page # 3 of 3 EC514