Docsity

Operating systems exam, Exercises of Operating Systems

Toggle sidebar
bg1
-
---
· - ·· -., v
2
uestions
forF~h~
•
~.;::---~--=---=--
-
--
-
Number
of
Qu
eS
ti
ons:
.
__
xam~
.
:.:::::m:.:::ati~o~n
___
N~
um~b~e:!...r
~of~
a
~e~s:~2:_
_
Answer
the
following
two
questions:
r
.
ti'
.
Answer
three
onlY
of
the
fo
il
owing
question
s
Firs
t
Oues on.
(30
Marks
10
marks
each)
I
.th
a. Consider
the
following set
of
processes,
w1
the
length
of
the
CPU-burst
time given
in
milliseconds:
Process
Burst
Time
Priority
Po
10
5
P1
7
1
P2
3 3
p3
6 4
P4
5 • 2
j •
The processes are assumed to have arnved m the order
Po,
P1,
P2,
P3,
P4 all
. I
at time
0.
1. Draw four Gantt charts illustrating the execution
of
these processes
using FCFS, SJF, priority ( a smaller priority number implies a higher
priority), and
RR
(quantum= 2) scheduling.
2. What is the waiting time
of
each process for all
of
the previous
scheduling algorithms?
3.
Which
o£th.e
schedules
is
the
m i
nim
al
average
-waiting
time?
b.
Given
four
memory
partitions
of
150
KB,
500 KB, 300
KB,
and
600
KB
(in order), how would each
of
the first-fit, best-fit, and worst-fit algorithms
place processes
of
230 KB, 420
KB,
130 KB, and 450 KB (in .order)?
Which algorithm makes the most efficient use
of
memory?
~
l
Operating
Systems
1 Page 1-2
pf2

Partial preview of the text

Download Operating systems exam and more Exercises Operating Systems in PDF only on Docsity!

  • ---· - · · -., v

2 uestions forF~h~

  • ~.;::---~--=---=--

Number - of QueS

t

ions: . __ xam~. :.:::::m:.:::ati~o~n


N~um~b~e:!...r ~of~ a~e~s:~2:__

Answer

the following

twoquestions:

r

ti'. Answer

three

onlY ofthe

foilowing

questions

Firs t Oues on.

(30 Marks

10 marks

each)

I .th

a. Consider the following set ofprocesses, w1 the lengthof the CPU-burst

time given in milliseconds:

Process Burst Time Priority

Po 10

5

P 7 1

P

3 3

p 6

4

P

5 • 2

j •

The processes are assumed to have arnved m the order

Po, P1, P2, P3, P all . I

at time 0.

  1. Draw four Gantt charts illustrating the execution

ofthese processes

using FCFS, SJF, priority (a smaller priority number implies a higher

priority), and RR (quantum= 2) scheduling.

  1. What is the waiting time ofeach process for all of the previous

scheduling algorithms?

3. Which o£th.e schedules isthe m inim al average -waiting time?

b. Given four memory partitions of 150 KB, 500 KB, 300 KB,and 600 KB

(in order), how would each ofthe first-fit, best-fit, and worst-fit algorithms

place processes of230 KB, 420 KB, 130 KB, and 450 KB (in .order)?

Which algorithm makes the most efficient use

of memory?

~

l

Operating Systems

1 Page 1-

-f the -followU1S

1 cexn-ent

o

. g·

th

age-rep

a

6 5 8 6

usin

faults

occur

for

e p

3 2 6

2,8,

, , ,

c. J-foW

ui.anY

p~g~

5 ~ 6 2,8,3,~,~,2,

,, ,3,8,

, , ,

reference

str~gi•

:U:ciLRU

algori~s

. e)

FIFO,

Optuna

,

be ~ memory

at a um

3 frames

( pages

can

~~

.

d

t ro·

c -

12, an

. snapshot

of a sys e ·.

_

B

= 14,

d. Consider

the followm~

of resources

is: A-

Where

the number

of instances have

5 processes.

A v,ailable

~ou

' Allo~tion

, >

ax

C

A

B

C

ABC

AB

1

1

5

o

1

0

0

Po

~

0

0

1

~ 7

5

P

5

3

5

2

l

P

1

3

0

6

5

p

O

6

p

3

O

O

1

0

,

5

1

What

4

is the content

of the ma trix\f

eed?

2·. Prove

that the system

is in a safe

. tate or not. Second Question:

Answer

Five

only

J the following

questions l} ,

J Mai:}s.s

marks

ea~b.)

--

    • -- - -- - - -~-

=-r-

a. What

is the Operating

System

Definition?

b. Describe

the differences

among

short-term,

medium-term,

and

long-term

scheduling.

1

c. D~fferent~ate

between

Pre-~mptive

T Non-~re-emptive

Scheduling.

d. Differentiate

between

Paging

and Se pn entat1on.

e. What

are the four

Necessary

Conditi

\lns for Deadlock?

and

how

to -prevent

it'?

f. Describe

the file Allocation

Metho

dr

g. What

are the

v~ious

kinds

of p erformance

overheads

associated

with

servicing

an

interrupt?

'Witfi

my

Gest

-wi.sfies

Operating

Svst

ems

1 Page