0% found this document useful (0 votes)
36 views

q3

Uploaded by

Sagar Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

q3

Uploaded by

Sagar Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Ex/TIU/ESA/Sem-V//2023 Ex/TIU/ESA/Sem-V//2023

CSE DEPARTMENT, 3RD YR. END SEMESTER (AUTUMN) EXAMINATIONS, 2023 vi)​ Define Process mix. Justify with a suitable example that good process mix would help in
higher throughput.
Subject Name:OPERATING SYSTEM
OR
Subject Code: TIU-UCS-T317 Describe the Process State Transitions using an appropriate schematic diagram.
vii)​ Discuss with a suitable example that paging technique also suffers from internal
Full Marks: 70​ ​ Time Allotted: 3 hours fragmentation.
The figures in the right margin indicate full marks.
Candidates are required to give their answer in their own words as far as applicable. OR
Unless otherwise specified, the notations / symbols have their usual meanings.
Use of non-programmable calculator is allowed.
Briefly explain the term “Copy-on-Write” (COW) for Virtual Memory management.
Group-A
viii)​ Illustrate with an example that classical semaphore technique of synchronization wastes the
1.​ (Answer all of the following questions)​ 2 x10 = 20 CPU clock cycles.
i)​ For the RR scheduling algorithm, Burst time of five processes (p0,p1,p2,p3,p4) are as
follows (2ms, 3ms, 15ms, 1ms, 2ms) and time quantum=5ms, all arrived at 0th ms, calculate OR
the number of context switching to schedule the five processes.
OR Describe the classical Dining Philosopher problem. State the solution strategy of Dining
Philosophers Problem using Monitor.
Point out the major problems of the FCFS CPU scheduling algorithm. Which CPU
scheduling algorithm can be used to address this issue? ix)​ Consider a disk scheduler that implements SSFT scheduling having a sequence of cylinders
ii)​ Justify with proper example that — ​ as follows: 51,56,44,89,34,23,5,98,77. Calculate the total amount of cylinder head seek.
“Segmentation is a memory management scheme which supports the user view of memory.” Consider the starting head at 54 and the total number of cylinders is 120.

OR OR

For the Shortest-Remaining Time First (SRTF) CPU scheduling algorithm, Burst time and Consider a system where, Process={p0,p1,p2,p3}, Arrival time={0,1,2,0} burst
arrival time of four processes (p11,p21,p33,p14) are (3ms, 1ms, 5ms, 2ms) and (0, 1ms, time={4,2,3,2}, In SJF method CPU scheduling of uni-processor system, which process is
2ms, 3ms) respectively. Calculate the number of context switching. executed after p3?
iii)​ State Belady anomaly in the context of page fault and also give an example for the same. x)​ Consider two systems:

OR System 1: Hard disk transfer rate = 20 MB/ Sec and Average process size= 40MB and hard
drive latency=10 ms.
Differentiate between Deadlock prevention and Deadlock avoidance strategies.
System 2: Hard disk transfer rate = 75 MB/ Sec and Average process size= 120 MB and
iv)​ Consider a 32bit system, where the number of lines in the address bus is 16, estimate the hard drive latency=10ms. Which system has faster context switching?
amount of physical memory space and logical address space.
OR
OR
Consider the following code snippet
Differentiate between logical address space and physical address space.
int main()
v)​ Consider a system whose Hard disk transfer rate = 128MB/ Sec and process size(in Primary
Memory) =56 MB, process size (in Secondary Memory) = 40MB and hard drive {
latency=10ms. Can these two processes be swapped? If yes then calculate the context
if (fork() | | fork())
switching time.
fork();
OR
printf(“Hello ”);
Briefly explain the term “Thrashing” in case of virtual memory management.
Page 1 of 7 Page 2 of 7
Ex/TIU/ESA/Sem-V//2023 Ex/TIU/ESA/Sem-V//2023

}
P1 P2 P3 P4 P5 P6 P7 P8 P9 P10
Using parent-child relationship evaluates the count of “Hello” statements.

Group- B 22MB 28MB 36MB 8MB 40MB 10MB 11MB 15MB 52MB 3MB

(Answer all the following questions) 5x4 = 20


Use Best fit and Worst fit Algorithm to allocate the processes. Identify the type of fragmentation
2.​ Draw the Resource Allocation Graph of the given following information and check if it is a and calculate the total fragmented memory.
deadlock or not. If there is any deadlock, terminate all the processes involved in deadlock all at
a time and redraw the RAG again. OR

Process={p0,p1,p2,p3,p4}, Resource={r0,r1,r4,r5,r2},edge list={p0→r5,r5→p1,r2→p4, Consider the following snapshot of a system:


p4→r0,p4→r5,r1→p4,p2→r2} Allocation ,request vectors of the processes as follows for the resources {A,B,C}
Po <010> <000> Available vector=<0 0 0>
OR pl <200 > <202>
p2 <303> < 001>
Consider the following segment table: p3 < 211> < 100>
p4 < 002> < 002>
Length Check whether the system is deadlocked? If so, list the processes which are now under deadlock
Segment Base state.
4.​ Consider a system consisting of m resources of the same type being shared by n processes. A
process can request or release only one resource at a time. Show that the system is deadlock free
if the following two conditions hold:
0 219 600
a. The maximum need of each process is between one resource and m resources.

b. The sum of all maximum needs is less than m + n.


1 2300 14
OR

Define virtual memory? Explain paging technique to implement virtual memory. Consider the
2 90 100
virtual page reference string: 1,2,3,2,4,1,3,2,4,1 on a demand paged virtual memory system
running on a computer system that has a main memory size of 3 frames which are initially
empty. Now find out the number of page faults in FIFO and LRU page replacement algorithm.
3 1327 580
5.​ Consider a paging system with the page table stored in memory. a) If a memory reference takes
200 nanoseconds, how long does a paged memory reference take? b) If we add TLBs, and 75
4 1952 96 percent of all page-table references are found in the TLBs, what is the effective memory
reference time? (Assume that finding a page-table entry in the TLBs takes zero time, if the entry
is there.)

OR
Compute the physical address for the following logical addresses(i)0,430 (ii) 1,12 (iii) 2,500
Define internal fragmentation. Suppose that we have free segments with sizes: 6KB, 15KB,
(iv)3,400 (v) 4, 167
25KB, 12KB, and 19 KB respectively. Place a program with size 10KB in the free segment
3.​ Consider a Primary Memory having a space total 256 MB, where OS resident area is 30MB using first-fit, best-fit and worst-fit methods.
and consider the dynamic partitioning is implemented to allocate the processes in primary
2.​
memory. We have the following sequence of processes to accommodate.
3.​
Page 3 of 7 Page 4 of 7
Ex/TIU/ESA/Sem-V//2023 Ex/TIU/ESA/Sem-V//2023

4.​ ()()
5.​ (()
and Q-
Group C

(Answer all the following questions) 10x3 = 30

6.​ Consider the following allocations, request and claim of the multiple resources( all are of
single instance) by multiple processes in a system are represented as matrix as follows:

Allocation R0 R1 R2

P0 1 0 0

P1 0 0 0
Draw the possible RAG for the given Wait-for graph. Consider all the resources having a single
P2 0 1 0 instance. Also find the deadlock(if any). To recover it from the deadlock, we terminate the
processes one after another based on their maturity level and on each termination again draw the
P3 0 0 1
wait-for graph till the deadlock is removed. Consider the processes have the maturity level can
be defined as follows:
p0>p2, p1>p2 and p1>p3. greater than symbol implies higher maturity.
Request R0 R1 R2

P0 0 1 1
8.​ Consider a Multi-level feedback queue scheduling system, where there are three
P1 1 1 0 queues(q0,q1,q2). q0 implements SJF scheduling where each process is given a time quantum
of 3ms. q1 uses RR scheduling scheme where each process is given a time quantum of 5ms and
P2 0 0 0
q2 implements FCFS. Draw the Gantt chart of the scheduling and calculate the average wait
P3 1 0 0 time of the system.

Process Burst Time


Claim R0 R1 R2
p11 14
P0 0 0 0
p01 5
P1 0 0 0
p12 2
P2 1 0 0
p13 10
P3 0 1 0
p10 7
Draw the RAG and check the state of the system is Unsafe / Safe. Identify the particular Consider all the processes arriving at the system at the same time.
claim/s which might cause the system to be unsafe. Give your justification that a safe state
never leads to deadlock. OR
7.​ Consider the following Wait-for graph of a system where you have 5 resources {r0,r1,r2,r3,r4}.
For the processes listed in below table (i) draw the Gantt chart illustrating their execution (ii)
find the average turnaround time, (iii) find the wait time using (a) First- Come First- Served (b)
Shortest Job First (c) Shortest Remaining Time (d) Round Robin(quantum=2)

Page 5 of 7 Page 6 of 7

You might also like