0% found this document useful (0 votes)
16 views7 pages

Os QP Esa 2023 S2

The document outlines the examination structure for the Operating System course for third-year CSE students, detailing the subject code, marks distribution, and time allotted. It includes various groups of questions covering topics such as process synchronization, CPU scheduling algorithms, memory management, and resource allocation. Candidates are instructed to answer in their own words and use non-programmable calculators.

Uploaded by

gopogo56
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)
16 views7 pages

Os QP Esa 2023 S2

The document outlines the examination structure for the Operating System course for third-year CSE students, detailing the subject code, marks distribution, and time allotted. It includes various groups of questions covering topics such as process synchronization, CPU scheduling algorithms, memory management, and resource allocation. Candidates are instructed to answer in their own words and use non-programmable calculators.

Uploaded by

gopogo56
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/ 7

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

CSE DEPARTMENT, 3RD YR. END SEMESTER (AUTUMN) EXAMINATIONS, 2023

Subject Name:OPERATING SYSTEM


Subject Code: TIU-UCS-T317

Full Marks: 70​ ​ Time Allotted: 3 hours


The figures in the right margin indicate full marks.
Candidates are required to give their answer in their own words as far as applicable.
Unless otherwise specified, the notations / symbols have their usual meanings.
Use of non-programmable calculators is allowed.

Group-A

1.​ (Answer all of the following questions)​ 2 x10 = 20


i)​ Describe a system which can justify the following statement—The “circular wait” among
the processes in a system may arise if the “Hold and Wait” condition is allowed.

OR

Explain the Race Condition in the context of process synchronization using an example.

ii)​ Distinguish between Multi-level feedback queue scheduling and multi-level queue
scheduling. Give an example to illustrate the differences.
OR
In multilevel feedback queue scheduling scheme, large burst size processes are penalized—
Justify the statement.
iii)​ Justify the statement with a suitable example — “ Fixed partitioning will limit the upper
bound of degree of multiprogramming of the system.”
OR

Distinguish between the starvation and deadlock.

iv)​ 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
the number of context switching to schedule the five processes.
OR

Point out the major problems of the FCFS CPU scheduling algorithm. Which CPU
scheduling algorithm can be used to address this issue?
v)​ Justify with proper example that — ​
“Segmentation is a memory management scheme which supports the user view of memory.”

OR

For the Shortest-Remaining Time First (SRTF) CPU scheduling algorithm, Burst time and
arrival time of four processes (p11,p21,p33,p14) are (3ms, 1ms, 5ms, 2ms) and (0, 1ms,
2ms, 3ms) respectively. Calculate the number of context switching.
vi)​ In a system, the processes are [p0, p1, p2], the max vector of the single resource ( consisting
multiple instances) is [10,4,9] and Allocation vector is [5,2,2], whereas the total number of
instances is 12. Find the safe sequence(if any).

Page 1 of 7
Ex/TIU/ESA/Sem-V//2023

OR

Explain the term “busy waiting” in case of use of Mutex Lock for process synchronization.

vii)​ State Belady anomaly in the context of page fault and also give an example for the same.

OR

Differentiate between Deadlock prevention and Deadlock avoidance strategies.

viii)​ Consider the following code snippet and answer the following questions:

main()

printf(“\n Hi..”);

fork();

printf(“ Hello..”);

fork();

printf(“ My dear students…”);

Count the number of processes created and discuss the parent-child relationship among
them.

OR

Explain the term “lazy swapper” in case on Demand Paging.

ix)​ Consider a 32bit system, where the number of lines in the address bus is 16, estimate the
amount of physical memory space and logical address space.

OR

Differentiate between logical address space and physical address space.

x)​ 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
switching time.

OR

Briefly explain the term “Thrashing” in case of virtual memory management.

Page 2 of 7
Ex/TIU/ESA/Sem-V//2023

Group- B

(Answer all the following questions) 5x4 = 20

1.​ Consider there are two processes P0 and P1 having two statements s0 and s1 respectively.
Implement a semaphore to synchronize the processes in such a way that P0 will be executed on
completion of P1.
​ OR

On a disk with 1000 cylinders, numbers 0 to 999, compute the number of tracks the disk arm
must move to satisfy all the requests in the disk queue. Assume the last request serviced was at
track 345 and the head is moving toward track 0. The queue in FIFO order contains requests for
the following tracks: 123,874,692,475,105,376. Perform the computation for the following
scheduling algorithms: (i) FIFO (ii) SSTF

2.​ Draw the Resource Allocation Graph of the given following information and check if it is a
deadlock or not. If there is any deadlock, terminate all the processes involved in deadlock all at
a time and redraw the RAG again.

Process={p0,p1,p2,p3,p4}, Resource={r0,r1,r4,r5,r2},edge list={p0→r5,r5→p1,r2→p4,


p4→r0,p4→r5,r1→p4,p2→r2}

OR

Consider the following segment table:

Length
Segment Base

0 219 600

1 2300 14

2 90 100

3 1327 580

4 1952 96

Page 3 of 7
Ex/TIU/ESA/Sem-V//2023

3.​

Compute the physical address for the following logical addresses(i)0,430 (ii) 1,12 (iii) 2,500
(iv)3,400 (v) 4, 167

4.​ Consider a Primary Memory having a space total 256 MB, where OS resident area is 30MB
and consider the dynamic partitioning is implemented to allocate the processes in primary
memory. We have the following sequence of processes to accommodate.

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10

22MB 28MB 36MB 8MB 40MB 10MB 11MB 15MB 52MB 3MB

Use Best fit and Worst fit Algorithm to allocate the processes. Identify the type of fragmentation
and calculate the total fragmented memory.

OR

Consider the following snapshot of a system:


Allocation ,request vectors of the processes as follows for the resources {A,B,C}
Po <010> <000> Available vector=<0 0 0>
pl <200 > <202>
p2 <303> < 001>
p3 < 211> < 100>
p4 < 002> < 002>
Check whether the system is deadlocked? If so, list the processes which are now under deadlock
state.
5.​ 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:

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.

OR

Define virtual memory? Explain paging technique to implement virtual memory. Consider the
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.

2.​
3.​
4.​ ()()
5.​ (()
and Q-
Page 4 of 7
Ex/TIU/ESA/Sem-V//2023

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

P2 0 1 0

P3 0 0 1

Request R0 R1 R2

P0 0 1 1

P1 1 1 0

P2 0 0 0

P3 1 0 0

Claim R0 R1 R2

P0 0 0 0

P1 0 0 0

P2 1 0 0

P3 0 1 0
Draw the RAG and check the state of the system is Unsafe / Safe. Identify the particular
claim/s which might cause the system to be unsafe. Give your justification that a safe state
never leads to deadlock.
7.​ Consider the following code snippet and answer the following questions:

main()

s0:printf(“\n Hi..”);

s1:printf(“ Hi..”);

Page 5 of 7
Ex/TIU/ESA/Sem-V//2023

s2:fork();

s3:printf(“ Hello..”);

s4:printf(“ \nHello..”);

s5:fork();

s6:printf(“ My dear student…\n”);

s7:printf(“ My dear students…”);

Estimate the number of times s7 will be executed. Write a possible output of the code and
justify your answer. Can we justify that For each of the processes, statement s6 will always
execute before s7?

OR

State Producer-Consumer problem. What are the semaphores used in Producer-Consumer


problems? Write a solution to the Producer-Consumer problem using semaphore.
8.​ Consider a Multi-level feedback queue scheduling system, where there are three
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
q2 implements FCFS. Draw the Gantt chart of the scheduling and calculate the average wait
time of the system.

Process Burst Time

p11 14

p01 5

p12 2

p13 10

p10 7
Consider all the processes arriving at the system at the same time.

OR

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 6 of 7
Ex/TIU/ESA/Sem-V//2023

Process Arrival Processing


Time Time

A 0.000 3

B 1.001 6

C 4.001 4

D 6.001 2

Page 7 of 7

You might also like