Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

MANIPAL INSTITUTE OF TECHNOLOGY

MANIPAL
(A constituent unit of MAHE, Manipal)

B.Tech Vth Semester End Semester Examinations December 2023


DSE 3153 OPERATING SYSTEMS

Duration: 3 hrs Date: 29-11-2023 Max. Marks: 50

M CO PO BL

Consider a computer system running 4 processes: DocumentEditor (DE), 5 2 1, 3


Q1
MusicPlayer (MP), PDFViewer (PV), and BackupUtility (BU). The total execution 2,
PV 3,
times for these processes are 30, 20, 10, and 10 units, respectively. DE, MP, and
start simultaneously, whereas BU starts 15 units of time after DE.
as
The breakdown of each process's activity in terms of computation and i/O is
follows:
DocumentEditor (DE):Spends the first 10% of its executiontime processing user
saving documents
edits (computation), then it spends 20% of execution time on
finalizing
to disk (Disk i/0), and the remaining time in computation, probably
formatting and other editing tasks.
MusicPlayer (MP): Spends the first 5% of its execution time processing user
on reading
commands (computation), then it spends 60% of execution time
computation for
music files from the disk (Disk I/0), and the remaining time in
tasks such as sound equalization or adjustments.
PDFViewer (PV): Spends the first 30% of its executiontime rendering PDF pages
disk
(computation), the next 10% saving or reading PDF annotations from the
layout
(Disk i/O), and the remaining time in computation, likely for PDF page
recalculations and other tasks.
for backup
BackupUtility (BU): Spends the first 70% of its time copying files
(computation), then it spends 20% of execution time on compressing backup
backup
files (Disk i/0), and the remaining 10% in computation, likely finalizing
logs and updating internal statuses.

first scheduling
Assuming that the operating system uses a preemptive shortest job
algorithm for CPUscheduling, answer the following questions:
a) Construct the Gantt chart for this scenario.
time.
b) Compute the average waiting time and average turnaround
c) Compute the percentage of time the CPUremains idle?
d) Compute the total number of context switches for this scenario.

Provide a detailed explanation of the various states a process goes through in an 3 1 2, 2


N

Q2
Include
operating system and illustrate these states with a comprehensive diagram.
descriptions of transitions between states and the events that trigger these
transitions
real- 2
latency times must be bounded in a hard 2,
Q3 Explain why interrupt and dispatch
time system.
functions: 5 3
maintains an account balance with two
1
Q4 Consider abanking system that the 2
(amount). These two functions are passed
deposit (amount) and withdraw balance. 3
withdrawn from the bank account
amount that is to be deposited or the husband
share a bank account. Concurrently,
Assume that a husband and wife race
wife calls deposit(). Analyse how a
calls the withdraw() function and the
done to prevent the race condition from
condition is possible and what might be
oCcurring.
3 2
among the three multithreading models: 2, :
Outline the differences and similarities
Highlight how each model handles
Many-to-One, One-to-One, and Many-to-Many.
kernel-level threads and the implications of
the mapping of user-level threads to
utilization.
these approaches on performance and resource
2 3 1,
Q6 Consider the Resource Allocation Graph (RAG) given in Figure Q6. 2
3.
a) Interpret the status of the Processes P1 and P2 in the graph. 8
potential
b) Analyse the RAG and list out the scenarios which could lead to a
deadlock.
R

R
Figure Q6
1
3
Q7 Consider an operating system running five processes: Chrome, Photoshop, Spotity, 3 2
Word, and System Update. The system has three types of resources: File Handles, 3
Network Bandwidth, and Disk i/0 Bandwidth. The total available units for these 8
resources are 10 units of File Handles, 5 units of Network Bandwidth, and7 units of
Disk i/0 Bandwidth, respectively. The maximum resources
required by each process
and the currently allocated resources are as follows:

Process Max Max Max


File Network
Allocated Allocated Allocated
Disk File Network Disk \/0
Handles Bandwidth /0 Handles
Chrome 7 5
Bandwidth
3
1
Photoshop 3 2 2 2
Spotify 9 0 2 3
0 2
Word 2 2 2
2
System 3 0 1 1
Update

ASsume Photoshop requests an additional allocation of 1 unit of File Handles, 0


units of Network Bandwidth, and 1 unit of Disk I/O Bandwidth. Determine this
reguest should be granted based on the current state of the system and the
Banker's algorithm. Using the given initial allocation and maximum resources for
provide the
each process, compute whether the system is in a safe state and
execution,
sequence inwhich the processes can complete their
3 1, 4
instruction, but does 3
Consider a procesSor does not have a TSL (Test and Set lock) 2,
content of a register (REG) and
have an instruction "SWAP REG MEM" to swap the 3,
indivisible (atomic) action. Prove that you can
a memoryword (MEM) in a single
Propose the entry section and
utilize SWAP to ensure mutual exclusion.
exit_section code modules.
3 2, 3
involving only one single-threaded process? Justify 2
Is it possible to have a deadlock
your anSwer. 3
5 4 1,
system with a 4 KB page size and 16 KB of physical memory.
Q10 Consider a computer in that order. The
2,
system's memory contains four pages: A, B, C, and D, 3
Initially, the requests: A, B, E, C, D, F,
sequence of memory access
system receives the following system can only hold four
Each memory access is for one page, and the
B, C, A, D.
time.
pages in memory at a
pages in
replacements, the final configuration of
Determine the seguence of page following page replacement
number of page faults for the
the memory and the total
algorithms:
a) Second Chance,
b)Optimal, implementation).
c) Least Recently Used (stack
number of page faults.
Identify which algorithm results in the minimum
4 2, 2
the address translation mechanism in a 3
Q11 With the help of a neat diagram, explain
to the user programs.
system which uses segmentation to allocate physical memory
Also explain a solution 2 4 2, 2
012 Differentiate between internal and external fragmentation. 8
to external fragmentation.
Q13 Consider a disk with 200 tracks and the queue has random requests from different 5
5 1, 3
processes in the order: 5S, 58, 39, 18, 90, 160, 150, 38, 184. Initially disk arm is at 2,
3,
100. Find the Average Seek length using FIFO, SSTF, SCAN C-SCAN and LOOK
algorithm. For SCAN, C-SCAN and LOOK assume that the disk arm is supposed to
travel "towards the larger number".

4 1, 3
Q14 Explain Belady's anomaly in the context of page replacement algorithms. llustrate 3
your answer by considering the following sequence of memory access requests: 2,
3,
0, 1, 5, 3, 0, 1, 4, 0, 1, 5,3, 4, in that order,where each number indicates a request 8
for a page number. Consider two scenarios where physical memory is divided into
3-frames and 4-frames, respectively.

Q15 Consider a logical address space of 64 pages of 1,024 words each, mapped onto a 2 4 1, 3
physical memory of 32 frames. 2,
a) How many bits are there inthe logical address? 3,
b) Howmany bits are there in the physical address?
Q5 Q4 Q3 02 Q1

turn;
int
boolean The contextConsider bound Why For
Withcalculate reside, PID: scheduling.
priority c)
shortest b) 2
than
scheduling. Answer
a)
CPU programs? uses
Consider Consider Consider Duration:hrs 3
two time, is a above Process queue
of itsuitable Priority: first the
processes,
flag[2]: a important average scheduling.
firstjob
thiswhile
scenario questions come Q_no
ID, all 2. following
all the MANIPAL (A
setup. diagram, the Queue MANIPAL
/* Process Lower AT: the constituent
waiting first denotes Table B.
initially PO with for five five Tech
(a), Arrival based
and the number Q_no BT ATPID serve uses 1
P2two explain Priority|3 processes processes Q1 vth tunit
false P1, requires scheduler time. (b), time,
m o on
processes and schedulinground thewhich Semester of
share have queue the MAHE,
*/ Process 1 6 P1 DSE
(c) BT: robin
only are are given INSTITUTE
3153
the to
illustrate the Burst shows
of Manipal)
indistinguish in algorithm.
in 04-01-2024
Date: Makeup
following Control highest 4 1 TableQ1:
3 P2 with the
scenarios:
10 a
time, same same OPERATING
system:
units. process,
time five
with
Block priorityQ_no: 5 1 5 queue queue Examinations
P3
variables: Explain
Process i/0-bound help quantum process
and 5
priority SYSTEMS
of Queue 2 2 P4 and and
the its a under OF
P1 it it of
Convoy components. Gantt no twO of
requires programs 1 1 2 2 P5 folloWS follows December
in queue
multilevel TECHNOLOGY
chart which units
effect 50 from preemptive preemptive and 1
and is 2023
units process
in CPU- queue
greaterqueue Marks:
Max. 50
the of
3 S 3
2 M

3 2 2 1 2 CO

3, 2, 1, 8 3, 8 2, 3
2 1 2, 2 1, PO

3 3 2 3 BL
codesnippet,where
below
isdefinedbythe
or 1)
processP (i==0
structure of or0).
Ine processis Pi(j== 1
the other

do { = true:
flag[iJ
(flag[j) {
while (turn {
== j)false;
if =
[i]
flag == j)
while (turnnothing +/
/* do
true;
flag (i] =

section */
critical
/*

turn = ];
false;
flag [i] =
*/
remainder seCtion
/*
} while (true);

satisfies all three requirements


defined2-Process algorithm
Prove that the above
critical-section problem.
for the 2 2
Highlight how it 2
multithreading in programming.
of using computing
Q6 Discuss the advantages resource utilization in various
efficiency, and
enhances performance,
environments.
5 1
drive is 5
5,000 cylinders, numbered 0 to 4,999. The 2
Suppose that a disk drive has request was at 3
request at cylinder 2,150, and the previous
currently serving a is: 2,069, 1,212, 8
1805. The queue of pending requests, in FIFO order,
cylinder
1,523, 4,965,3681.
2,296,2,800, 544, 1,618, 356, cylinders) that
what is the total distance (in
Starting from the current head position, following disk
pending requests for each of the
thedisk arm moves to satisfy all the
scheduling algorithms?
a) FCES
b) SSTF
c) SCAN
d) LOOK
3 1,
by
Consider a system consisting of four resources of the same type that are shared
3
Q8 2,
.brae nrocesses,each of which needs at most two resources. Show that the system 3,
is deadlock free.

2
4
Q9 Fxolain the concept of thrashing in the context of operating system memory 2
management. Describe the conditions that lead to thrashing, its impact on system
performance, and the mechanisms that can be employed to mitigate or prevent it.
snapshot of asystem in Table Q10: 5 3 1, 3

Coonsiderthe following 2
Q10 3
Table Q10:
Max Available
Allocation
ABC D AB C D
A B C D
6 1 5 2
2 3 2
PO 1 2
2 1 4
0 1 1 2
P1
3 6 5 1
P2 2

1 2 6 2
P3 1

3 1 1 3
1 2
P4

using the banker'salgorithm:


Answer the following questions
state by demonstrating an order in which
system is in a safe
a) Illustrate that the
complete.
the processes may
request be granted
process P1 arrives for (1, 1, 0, 1), can the
b) If a request from
immediately?
3 1, 2
the 3
and suitable code snippets, explain the solution to 2,
Q11 With the help of an example 3,
Producer Consumer using Semaphores.
2 1
concept of Dynamic Relocation.
help of an example explain the
2,
Q12 with the 3,

4 1, 3
KB, 750 KB, and 125 KB
5
300 KB, 600 KB, 350 KB, 200 2
Q13 Given six memory partitions of worst-fit algorithms place processes
best-fit, and 3.
(in order), how would the first-fit, Rank the algorithms
200 KB, and 375 KB (in order)?
8
ofsize 115 KB, 500 KB, 358 KB,
memory.
in terms of how efficiently they use

3 4 2, 2
With the help of a neat block diagram,
explain the different steps involved in
Q14
Demand Paging.
handling a Page Fault in an operating system that uses

2 4 2 2
Q15 Briefly explain the drawbacks of the contiguous memory allocation technique.
MANIPAL INSTITUTEOF TECHNOLOGY
MANIPAL
(A constituent unit of MAHE, Manipal)

B. Tech yth Semester Mid-Term Examination September 2023


DSE 3153 OPERATING SYSTEMS

Date: 26-09-2023 Max. Marks: 30


Duration: 2 hr
M CO PO BL

Section A: MCQ
2 3
then each process 0.5 2
Q1 If there are N processes in the ready queue and the time quantum is Q,
In this case, no
gets 1/N of the CPU time in chunks of at most Q time units at once.
procesS waits more than time units.

1. Q-N

2. (N-1)*Q
3. N*(Q-N)
4. N*Q
2
for a system using 0.5 2
Q2 Consider the following statements about process state transitions
preemptive scheduling.
S1: A running process can move to a ready state.
S2: A ready prOcess can move to a ready state.
S3: Ablocked process can move to a running state
S4: A
blocked process can move to a ready state
Which of the above statements is TRUE?

1. S1, S2 and S3 only


2. S1, S2 and S4 only
3. S1, S2, S3 and S4
4. S2 and $3 only
occurs 0.5 1 2 2
Q3 Select the correct sequence of steps taken by the procesSor when an interrupt
(i) Switch from user mode to kernel mode.

(ii) Set the program counter to the first instruction of the interrupt handling routine.
(üi) Save the current context.

1. (i), (ü), (ii)


2. (i), (ii), (ii)
3. (ii), (0), (ii)
4. (ii), (ii), (i)
Choose from below, advantages of kernel-level threads: 0.5 2 2 2
Q4
) Kernel can simultaneously schedule multiple threads from the same process on multiple
procesSors.
multithreaded.
routines can be another thread from
(i) Kernel can schedule
blocked then kernel
of a process is
(m) If one thread
the same process.

1. (i) only

2. (), (ii) only


3. (i), (ii), (ii)
0.5 1 2 2
4. (0), (üii)only
appropriate four-state model for a process?
an
Which of the following is
Running End)
(New)
Block Unblock

Blocked
1.

Open End)
(New) Ready
Block Unblock
Block
Running
2.
Ready
Abort

(New) +(Running End)


Block Unblock

3
Blocked
Abort

(New) Open Ready End)


Block Unblock

Retry
4
(Running)
thread 0.5 2 2
the entire process gets blocked if a
In which of the following Multithreading model,
06 cal.
makes a blocking system

1. One-to-one

2. Many-to-one
3. Many-to-Many
4. Two-level
0.5 1 2 2
between processes?
on a context switch
Which of the following need not be saved

purpose registers
1. General
2. Program counter
look aside buffer
3. Translation
information
4. Process state 2 2
0.5 1
process?
following is/are reason(s) for blocking a running of OS code.
Which of the procedure that is a part
A from
call the running program to a
(i) operation.
may initiate an I/0
(ii) Arunning process running process.
(ii) Auser may block a

1. (), (i) only


2. (i), (iü) only
3. (0), (üi) only
4. (üi) only
following 0.5 1 2 2
fork () operation, which of the
a new process using the
09 When aprocess creates and the child
process?
the parent process
states is shared between

1. Stack
Segments
2. Shared memory
3. Heap
4. CPU registers
system with 0.5 2 1,2 3
computer
can be in Ready state for a
Q10 The maximum number of prOcesses that
n CPUs is:

1 n

2. n'
3. 2^
4. Independent of n
Section B: DESCRIPTIVE

Q11 a.Consider the below table of four process under multilevel queue scheduling. Q_no 4 2
1,2
denotes the queue of the process, priority of queue lis greater than queue 2. Queue 1 uses
round robin with time quantum of two units and queue 2 uses first come first serve
scheduling algorithm.
b. Consider allthe five processes are in same queue and it follows preemptive shortest job
first scheduling.
C. Consider all the five processes are in same queue and it follows preemptive priority
scheduling.
For above questions a, b, and c, draw Gantt chart and calculate average
turnaround time.
PID P1 P2 P3 P4 P5
AT 1 1.5 0 2
BT 6 4 2 5
Q no 1 2 2
Priority 3 4 2 1

PID: Process ID, AT: Arrival time, BT:


Burst time, Q no: Queue no in which
Priority: Lower number have the highest priority process reside,
Q12 State with clear justifications
(No marks will be whether the following statements are true or
awarded the justification is not correct).
if false 4 2 1,2 3
a) Operation of a time
sharing system is identical to
multiprogramming system executing the same programsoperation of a traditional
if the time slice
the CPUburst of every exceeds
b) The program.
instruction change the processor from user
to
privileged instruction. mode to supervisor mode is a
c) For
multithreaded programming, we need to create shared
through which the threads
d)
can access common data. memory segments
Pre-emptive CPU scheduling
time as compared to non algorithms can result in shorter
pre-emptive scheduling algorithms average waiting
Q13 What are the
threads? Underdifferences
what
between user-level threads and
circumstances
Switching among threads in the same
is one type kernel-supported
"better'" than the other? Is
3 2 2 2

among processes? Justify. process more efficient than switching


Q14 Cancider a system with 100
algorithm is used with a processes in theReady Queue. If round
nba am to
ensure that scheduling overhead of 5 robin scheduling 3 2 1,2 4

second?
each process is microseconds, what must be the time
guaranteed to get its turn at the CPU after 1
n15 Describe the typical return values of the fork() system call and what each value sieniftes, 3 1 1,2 3
How many times does the following Cprogram print "Hello"? Explain.
main ()
for (int i=0; i<8; i++)
{
3 if (1%2 == 0) break;
fork ();

printf ("Hello\n");

2 2
Short-term, Medium-term 3
1

diagram, explain the roles of


With the help of a process state system. Also explain how the Long-term
Q16 schedulers in an operating
and Long-term of multi-programming.
scheduler controls the degree
2 2 2
3
Communication:
following in the context of Inter Process
Q17 Differentiate between the
and Message Passing
a. SharedMemory Communication
Indirect Passing
b. Direct and Asynchronous Message 2 2
and 2
c. Synchronous lengths at different
levels of a 2
quantum
advantage of having different time
Q18 What is thequeue scheduling system?
multi-level
Reg. No.

MANIPAL INSTITUTE OFTECHNOLOGY


MANIPAL
(A constituent unit of/ MAHE, Maia)

V SEMESTER MCA
MARE wO SEMESTER EXAMINATIONS
DECEMBER 2022
SUBJECT: OPERATING SYSTEM (DSE3153)
REVISED CREDIT SYSTEM
( /12 /2022)
Time: 3 Hours MAX. MARKS: 50

Instructions to Candidates:
Answer ALL FIVE questions.
3 Missing data may be suitably assumed.

1A. Consider the traffic deadlock depicted in Fig. 1A. 5


a. Show that the four necessary conditions for deadlock hold in this example.
b. State a simple rule for avoiding deadlocks in this system.

Fig. 1A: Traffic deadlock


1B. What are the three major activities of an operating system with regard to secondary-storage 3
managenment?
2
1C. Describe the differences among short-term, and long-term scheduler.
Suppose that the following processes arrive for execution at the times indicated. Each process will 5
2A.
run for the amount of time listed. In answering the questions, use nonpreemptive scheduling, and
base all decisions on the information you have at the time the decision must be made.

MCA 4153 Page 2 of 2


Process Arrival Time Burst Time
P, 0,0 8
0.4 4
P 1.0 1
scheduling
1 What is the average turnaround time for these processes with the FCFS
algorith?
ii. What is the average turnaround time for these processes with the SJF scheduling
algorithm?
iii. Draw the respective Gantt charts.
3
2B. Describe three general methods for passing parameters to the operating system.
2
2C.Write any four file operations.
3A. Suppose that a disk drive has 200 cylinders, numbered 0 to 199. The drive is currently serving a 5
request at cylinder 60, and the previous request was at cylinder 45. The queue of pending
requests, in FIFO order, is: 98, 183, 37, 122, 14, 124, 65, 67 and head start at 53.
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?
a. FCFS
b. SSTF
c. SCAN
d. LOOK

3B. Explain Belady's anomaly with the given reference string using 3 and 4 frames. 3

Reference string :- 1234 12512345


3C. With a suitable example, discuss the convoy effect. 2

4A. Describe how the Test and Set() instruction can be used to provide mutual exclusion. Also discuss 5
the limitation of this solution.
4B. Discuss the three queue implementation methods used in message passing. 3

4C. What are two differences between user-level threads and kernel-level threads? Under what 2
circumstances is one type better than the other?
5A. What is TLB? Explain its role in memory management with suitable diagram.
SB. Give the queuing diagram representing process scheduling and show the action point for the 3
different types of CPU schedulers.
5C. What is the difference between logical and physical addresses? 2

MCA 4153
Page 2 of 2
Reg. No.

MANIPAL INSTITUTE OF TECHNOLOGY


MANDAL

V SEMESTERB.Tech.
END SEMESTER EXAMINATIONS
NOVEMBER 2022
SUBJECT: OPERATING SYSTEM (DSE3153)
REVISEDCREDIT SYSTEM
(11/2022)
Time: 3 Hours MAX. MARKS: 50

Instructions to Candidates:
Answer ALL FIVE questions.
3 Missing data may be suitably assumed.

Consider the following page reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5. 5


1A.
for the FIFO,
Assuming demand paging with hrce frames, how many page faults would occur
LRU (stack implementation), OPTIMAL, SECOND CHANCE page replacement algorithms?
Identify which algorithm has minimum number of page faults with three frames.

1B. Discuss the advantage of having different time quantum sizes on different
levels of a multi-level 3
queueing system?
1C. Differentiate between multiprogramming and multitasking operating systems. 2

Answer the following based on given scenarios: 5


2A.
a. Consider the below table of five process under multilevel queue scheduling. Q no
denotes the queue of the process, priority of queue l is greater than queue 2. Queue 1
uses round robin with time quantum of two units and queue 2 uses first come first serve
scheduling algorithm.
b. Consider all the five processes are in same queue and it follows preemptive shortest job
first scheduling.
C. Consider all the five processes are in same queue and it follows preemptive priority
scheduling.
PID Pl P2 P3 P4 PS
AT 2
BT 6 4 2
Qno 1
Priority3 4 2

DSE3153 Page 1of 3


PID: Process ID, AT: Arrival time, BT: Burst time, Q no: Queue no in which process reside.
Priority: Lower number have the highest priority
For above questions (a), (b), and (c) illustrate with help of a Gantt chart and calculate
average waiting time.

2B. Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB
order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 kD,
500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of now
efficiently they use memory.
mapped onto a physteal 2
ZC. Consider a logical address space of 64 pages of 1.024 words each.
memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there the physical address?

3A. Consider the following snapshot of a system


MAX Available
Process Allocation
ABC D ABC D A BCD

PO 00 1 2 001 2 15 2 0
P 10 0 0 175 0
P2 1 3 5 4 2 3 56
P3 06 3 2 0 65 2
P4 00 1 4 065 6

Answer the following questions using the Banker's algorithm( Resource request algorithm,
Safety Algorithm)
a) Calculate the resource Need for each process.
b) Is the system in a safe state?
c) If a request from a process Pl arrives for (0, 4, 2, 0), can the request be granted
immediately?
d) What is the total number of instances for each resource in the above given
system?
3B. Discuss critical section problem with its structure. Also describe the criteria to be satisfied by
any efficient solution for the same problem.
3
3C. What the copy-on-write feature, and under what
circumstances is its use beneficial?

4A. Describe how the compare and swap() instruction can be used to
Also discuss the limitation of this
solution.
provide mutual exclusion.
4B. What are the benefits and the
a. disadvantages of each of the
Synchronous and asynchronous communication following? 3
Fixed-sized and variable-sized messages
4C. What is the cause of
thrashing? How does the system detect thrashing? If
logical address is 20-bit, What is the number of entries in the page size is 2 KB and Z
page table?
5A. Suppose that a disk drive has
5,000 cylinders, numbered 0 to
serving a request at cylinder 2,150,
pending and the previous request was at 4.999, The drive is currently
3681. requests, in FIFO order, is: 2,069, cylinder 1,805. The queue of
1,212, 2,296, 2,800, 544, 1,618, 356,
Starting from the current head 1,523, 4,965, 5
moves to satisfy all the pendingposition, what is the
requests for each oftotal
the
distance (in cylinders) that the disk arm
following disk-scheduling algorithms?
DSE3153

Page 2 of 3
à. FCFS
b. SSTF
c. SCAN
d. LOOK
3
5B. Explain the purpose of the open) and close) file operations.
ms. If the average page fault 2
5C. Let an instruction take 10 ms and page fault takes an additional 5
time.
Occurs after 20 instructions, Calculate the effective access
Setms CoE3I53j

iBtlVSeend Sestoro 2o22


Type: MCQ

Q1. Suppose that the OS uses variable length partitions for memory management. At some
particular time, the running process occupies a partition between physical addresses 20,000
and 40,000. The values of base and limit register are respectively (0.5)
1. **20,000, 20,000
2. 0, 40,000
3. 20, 000, 40,000
4. 0, 10,000
memory management. At some
Q2. Suppose that the OS uses variable length partitions for addresses 20,000
particular time, the running process occupies a partition between physical (0.5)
and 40,000. What physical address corresponds to a virtual address of 13,000?
1. **33,000
2. 13,000
3. 43,000
4. 23,000

Q3. The value ofa counting semaphore is 7. Then 15 wait operations and
10signal
operations were completed on this semaphore. The resulting value of semaphore is (0.5)

1. 5
2. **2
3. 7
4. 0

7 after (0.5)
Q4. At a particular time, the value of a counting semaphore is 10. It will become
1. 3 signal operations
2. 2 wait operations
3 ** 3wait operations
4. 5 signal operations and 2 wait operations
Q5. A process executes the following segment of code
for (i =1;i<10; i ++) fork( );
The number of new processes created is (0.5)
1 1024
2. 1023
3. ** 511
4. 512
Q6. For each thread in a multithreaded process, there is a separate (0.5)
1. ** User and kernel stack
2. Process control block

3. User address space


4. Kernel space only
07. When high priority task is indirectly
preempted by medium priority task effectively
inverting the relative priority of the two tasks, the scenario is called
(0.5)
1. priority modification
2. ** priority inversion
3. priority removal
4. priority exchange
Q8. Asemaphore is a shared integer
1. that can not drop below variable (0.5)
one
2. that can not be
more than zero
3. that can not be
more than one
4. ** that can not drop
below zero

Q9. If a process is executing in its


their critical section. What is this critical section, then no other processes can be executing in
1, criticalexclusion condition called? (0.5)
2. **
mutual exclusion
3. synchronous exclusion
4. asynchronous exclusion
Q10. Three processes share four resource units that
can be reserved and released onlyone at a
time. Each process needs a maximum of two units.
Then (0.5)
1. there is a possibility of deadlock
2. ** no deadlock will occur
3. there will be a circular wait
4. nothing can be predicted about dead lock
Type: DES
Ql1. Question 1. (2)
Discuss the conditions that lead to a deadlock with an example.

Q12. Question 2. (2)


Differentiate between compile time and load time address binding with example.
(3)
Q13. Question 3. progress and bounded wait.
true for mutual exclusion,
Prove that Peterson's Solution holds

Q14. Question 4. (3) RI, R2, R3 and R4. A total of 16 instances


-
computer system contains 4 types of resources instances of R4 are present in the system.
A instances of R3 and 9
of R1, 12 instances of R2, 13
P6 are active in the system. The current
P2, P3, P4, P5 and a safe sequence (ifone
Currently, 6 processes, P1, below. Determine
the system is shown in the table shown algorithm. Clearly show all the steps by
snapshot of
given system state using Banker's data structure at each step, the
exists) for the structure and the
Available
requests of processes can
be
calculating the Need data which resource
in
that are satisfied and the sequence
conditions
satisfied. Max
Allocation
Process
R4 RI R2 R3 R4
RI R2 R3
3
Pl 2
3 3 5
4
0 1
P2 4
1
1 4
1 1
P3 2 6
6 4
6
4 3
P4 4 3
5
PS 3
4
2 6
3 3
P6
DSE 3153 about:srcdoc

Exam Date &Time: 03-Sep-2022 (02:00 PM -03:00 PM)

MANIPAL ACADEMY OFHIGHER EDUCATION


B.Tech Vth Semester First Sessional Examination September 2022
OPERATING SYSTEMS [DSE 3153]
Marks: 15 Duration: 60 mins.
MCQ
Answer allthe questions. Section Duration: 20 mins
1) The number of processes completed per unit time is known as
(0.5)
1) Throughput 2) Turnaround 3) Execution 4) Response

2) A Process Control Block (PCB) does not contain which of the following?
(0.5)
1) Timer 2) Code 3)Stack 4) Data

3) Ina timesharing operating system, when the time slot assigned to a process is
completed, the process switches from the current state to?
(0.5)
Suspended Ready Terminated Blocked
1 state 2) state 3) 4)
state state

4) Message passing system allows processes to

name communicate
the communicate communicate
with each
recipient with one other without by (0.5)
1) or 2) another by 3
sharing the
4)establishing
sender the shared
resorting to same address
of the shared data region
space
message

To access the services of the operating systerm, the interface is provided by the
5)

(0.5)
System System Assembly
1 2) IPC 3) 4)
calls Instructions
Library
6) Which of the following two operations are provided by the IPC facility?
receive & write & delete & send & (0.5)
I) send 2) delete 3) receive 4) delete
message message message message

7) In the non blocking send (0.5)

1of 3 30-08-2022, 14:1C


DSE 3153

the sending
the sending the sending the sending
process process process
process sends the
keeps sends the keeps 4) message
1) sending 2) message and 3) sending
untilit and reciving
until the resumes process is
receives a
message is
operation blocked
received message

8) In the Zerocapacity qucue


the sender the sender
the queue
thequeue keeps sending can store
blocks until
can store
and the 4) the receiver
2 3) any receives the
1)at least messages number of
one don't wvait in message
message
message the queue

9) The Mach is example of which OS?


monolithic
(0.3
monolithic
hybrid 4) kernel with
2) microkernel 3) kernel modules
1)
kernel

10) Ina multiprogramming environment


a single user
the
more than can execute
the programs processor
one
(0.5)
are executes many
4
process 2) developed 3) more than programs at
1) resides in by more than the same
one process
the one person at atime time
memory

DESCRIPTIVE
Section Duration: 40 mins
Answer all the questions.
Question 1.
11) (2)
Operating system.
Discuss the methods used to pass parameters to the

Question 2.
12)
to an API (2)
Why would an application programmer prefer programming according
rather than invoking actual system calls?

13) Question 3.
With suitable diagram describe the following operating system structure:
(3)
a. Simple structure
b. Layered structure
c. Microkernel
30-08-202241C
about:srcdc

Question 4.
a. Consider the below table of five process under multilevel queue scheduling.
Qnodenotes the queue of the process, priority of queue lis greater than
queue 2. Queue Iuses round robin with timequantum of two units and queue
2 uses first come first serve scheduling algorithm.
b. Consider allthe five processes are in same queue and it follows preemptive
shortest job first scheduling.
priority
c. Consider all the five processes are in same queue and it follows
scheduling.
calculate average waiting time.
For above questions a, b, and c, draw Gantt chart and

PID PI P2|P3\ P4 PS (3)

AT 03 S 0 2

BT 64 2 5 8

Q no 1 12 1 2

Priority|34 52
no: Queue no in which process
PID: Process ID, AT: Arrival time, BT: Burst time, Q
reside, Priority: Lower number have the highest priority

--..-End---.

You might also like