Docsity

COP4600 Operating Systems Module 8 Deadlocks.pdf, Exams of Computer Science

Toggle sidebar
bg1
COP4600,;.Operating,;.Systems,;.Module,;.8,;.Deadlocks,;.,;.questions,;.with,;
.correct,;.answers
FINITE,;.NUMBER,;.of,;.Resources,;.must,;._______,;.-
,;.correct,;.answer,;.โœ” โœ”
be,;.shared,;.among,;.all,;.concurrently,;.executing,;.processes.
Serially,;.Re-usable,;.resources,;.-,;.correct,;.answer,;.โœ” โœ” -
,;.A,;.file,;.that,;.a,;.process,;.opens,;.and,;.closes,;.
-,;.A,;.printer,;.printing,;.a,;.file,;.for,;.a,;.process,;.
-
,;.The,;.disk,;.swap,;.space,;.presently,;.occupied,;.by,;.a,;.blocked,;.proc
ess
-,;.A,;.slot,;.in,;.the,;.O.S.,;.process,;.table,;.
-,;.A,;.semaphore
Deadlocks,;.develop,;.due,;.to,;.______,;.-,;.correct,;.answer,;.โœ” โœ”
contention,;.for,;.non-preemptive,;.serially,;.reusable,;.resources
A,;.set,;.of,;.processes,;.is,;.deadlocked,;.if,;.______,;.-
,;.correct,;.answer,;.โœ” โœ”
each,;.process,;.in,;.the,;.set,;.is,;.waiting,;.for,;.an,;.event,;.that,;.only,;
.another,;.process,;.in,;.the,;.set,;.can,;.cause
pf3
pf4

Partial preview of the text

Download COP4600 Operating Systems Module 8 Deadlocks.pdf and more Exams Computer Science in PDF only on Docsity!

COP4600,;.Operating,;.Systems,;.Module,;. 8 ,;.Deadlocks,;.,;.questions,;.with,; .correct,;.answers

FINITE,;.NUMBER,;.of,;.Resources,;.must,;._______,;.-

,;.correct,;.answer,;.โœ” โœ” be,;.shared,;.among,;.all,;.concurrently,;.executing,;.processes.

Serially,;.Re-usable,;.resources,;.-,;.correct,;.answer,;.โœ” โœ” - ,;.A,;.file,;.that,;.a,;.process,;.opens,;.and,;.closes,;.

-,;.A,;.printer,;.printing,;.a,;.file,;.for,;.a,;.process,;.

,;.The,;.disk,;.swap,;.space,;.presently,;.occupied,;.by,;.a,;.blocked,;.proc ess

-,;.A,;.slot,;.in,;.the,;.O.S.,;.process,;.table,;.

-,;.A,;.semaphore

Deadlocks,;.develop,;.due,;.to,;.______,;.-,;.correct,;.answer,;.โœ” โœ” contention,;.for,;.non-preemptive,;.serially,;.reusable,;.resources

A,;.set,;.of,;.processes,;.is,;.deadlocked,;.if,;.______,;.- ,;.correct,;.answer,;.โœ” โœ”

each,;.process,;.in,;.the,;.set,;.is,;.waiting,;.for,;.an,;.event,;.that,;.only,; .another,;.process,;.in,;.the,;.set,;.can,;.cause

Necessary,;.conditions,;.for,;.deadlock,;.-,;.correct,;.answer,;.โœ” โœ” All,;.four,;.of,;.the,;.following,;.conditions,;.must,;.be,;.true,;.for,;.dead lock,;.to,;.be,;.possible.

1.,;.Mutual,;.Exclusion:,;.At,;.least,;.two,;.resources,;.in,;.the,;.system,;. must,;.be,;.the,;.type,;.that,;.only,;.one,;.process,;.at,;.a,;.time,;.can,;.use,; .it,;.

2.,;.Hold,;.and,;.Wait:,;.A,;.process,;.using,;.one,;.resource,;.(,;.at,;.least,; .),;.is,;.waiting,;.to,;.use,;.another,;.resource,;.(,;.at,;.least,;.),;.which,;.is,;. being,;.used,;.by,;.another,;.process,;.

3.,;.No,;.Preemption:,;.A,;.resource,;.can,;.only,;.be,;.released,;.voluntaril y,;.by,;.the,;.process,;.using,;.it,;.

4.,;.Circular,;.Wait:,;.There,;.is,;.a,;.set,;.of,;.waiting,;.processes,;.{,;.P0,, ;.P1,,;....,;.Pn,;.},;.such,;.that,;.P0,;.is,;.waiting,;.for,;.a,;.resource,;.being, ;.used,;.by,;.P1,,;.P1,;.for,;.P2,,;....,;.Pn,;.for,;.P

Strategies,;.for,;.Dealing,;.with,;.Deadlock,;.-,;.correct,;.answer,;.โœ” โœ” 1.,;.Ignore,;.it:,;.Ostrich,;.Algorithm,;.- ,;.may,;.be,;.a,;.good,;.solution,;.when,;.deadlock,;.happens,;.infrequentl y

Problem,;.-,;.low,;.utilization,;.of,;.system,;.resources

b.,;.A,;.process,;.can,;.request,;.a,;.resource,;.only,;.when,;.it,;.has,;.none, ;.Problem,;.- ,;.Some,;.processes,;.will,;.need,;.more,;.than,;.one,;.resource,;.at,;.a,;.tim e

3.,;.Eliminate,;.non-preemption

-- >Allow,;.preemption.,;.If,;.P1,;.request,;.a,;.resource,;.and,;.this,;.resourc e,;.is,;.being,;.used,;.by,;.P2,;.and,;.P2,;.is,;.waiting,;.for,;.other,;.resourc es,,;.preempt,;.P2,;.and,;.allocate,;.the,;.resource,;.to,;.P

Problem:,;.the,;.state,;.of,;.some,;.resources,;.cannot,;.be,;.easily,;.saved,; .and,;.restored,;.later

4.,;.Circular,;.Wait:,;.

Order,;.the,;.resources,;.and,;.then,;.require,;.that,;.each,;.process,;.reque sts,;.resources,;.in,;.an,;.increasing,;.order,;.

Problem:,;.too,;.restrictive