Os 2022
Os 2022
Os 2022
TCS-502
B. TECH. (CSE/IT) (FIFTH SEMESTER)
END SEMESTER EXAMINATION, Dec., 2022
OPERATING SYSTEMS
Time : Three Hours
Maximum Marks: 100
Note : (i) AH questions are compulsory. "
(ii) Answer any two sub-questions among (a), (b) and (c) in each main
question.
(iii) Total marks in each main question are twenty.
(iv) Each sub-question carries 10 marks.
Process 1 : Process 2 :
while (true) { while (true) {
while (p2_in_crit_secr=true) while (pl_in_crit_sect=true)
;/* do nothing */ ;/* do nothing */
pl _in_crit_sect = true; p2Jn_crit_sect = true;
...critical section... ...critical section...
pl„in_crit_sect = false; p2Jn_crit__sect = false;
} }
Does this code always enforce mutual exclusion ? Justify your answer.
p. r. a
(2) TCS-502
Allocation Request
R1 B2 R3 R4 R1 R2 R3 R4 .
Pl 1 1 0 0 5 1 3 2
P2 2 ; 1 1 1 2 1 0 2
P3 0 0 2 1 2 0 0 1
P4 1 1 0 0 5 2 3 3
----- -—
Run the deadlock detection algorithm and test whether the system is
deadlocked or not. If it is, identify the processes that are deadlocked.
section avoids this condition. Explain all conditions that satisfy the
solution to critical problem.
(3)
TCS-502
(b) The GEU memory architecture design team has a dilemma. The team is
considering several different memory configuration variations for an
upcoming machine design. Consider the following designs (All memory
accesses are in terms of bytes, and all are using paging techniques) :
p--------- -----------
Characteristic Design 1 Design 2
Physical Memory Address Width 10 bits 24 bits
Logical Address Width 16 bits 24 bits
Page/Frame size in bytes 8 bytes 16 bytes
Page Table Type Singe Double
• For each design, list the maximum number of pages each process
can access in logical address space.
Process i
Arrival Time Burst Time Priority
1 01 10 3
2 03 07 2
3 04 04 4
4 02 09 , 1
P. T, O.
TCS-502
(4)
(c)
Max
Allocation
Process
A B c D A B c D
0 0 1 2
0 0 1 2
P0
1 7 5 0
1 0 0 0
Pl
2 3 5 6
1 3 5 4
P2
0 6 5 2
0 6 3 2
P3
4 6 5
P4 0 0 1
4. (a) What is the cause of thrashing ? How does the system detect thrashing ?
problem ?
(C) A certain moving arm disk storage, with one head, has the following
specifications:
Find the average latency of this device is P ms and the data transfer rate
is Q bits/sec.
5. (a) Draw and explain seven state diagram of process life cycle. Also list the
(b) Suppose that a disk drive has 6000 cylinders, numbered 0 to 5999. The
86, 1470, 1913, 1774, 948, 1509, 1022, 1750,130, 92,10, 121
P. T. O,
(6) TCS-502
Starting from the current head position, what is the total distance (in
cylinders) that the disk arm moves to satisfy all the pending requests,
for each of the following disk-scheduling algorithms ?
• C-SCAN
• LOOK
(c) Given below the set of reference string, find the number of frames to be
allotted to a process P using working set window algorithm considering
window size and working set is 4.
Ref String : 1, 2, 3, 1, 2, 3, 1, 2, 4, 1, 4, 2, 1, 5, 1, 2, 4, 2, 1, 4, 3, 2, 5, 3,
2,3
TO
TCS-502