Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Chapter 8 – Operating System Concepts

*Please do NOT write a book for each question. 1-3 Sentences or short and to the point answers
are adequate for all lab questions. Feel free to free draw, use shapes, SmartArt, or other Word
tools to answer “Illustrate” questions.

1. List three examples of deadlocks that are not related to a computer system environment.

Two people trying to go through the same doorway at the same time. Two people going up and down
the same set of narrow stairs. Two cars going down the same small path through the forest from
opposite ends.

2. What are the four conditions that hold simultaneously in a system that make a deadlock
situation happen? Give an example or define each.

Mutual Exclusion, no preemption, hold and wait, and circular set.


Mutual Exclusion ensures only one program can access a resource at a time, so if two programs believe
the other has exclusive access to a resource they might be stuck into a deadlock until it’s fixed. No
preemption, if a program has a resource, it won’t be taken away until it gives it up, if a program for
some reason never gives it up, no other program can access it, even if that program isn’t doing anything.
Hold and wait is something like a program currently possessing resources but unable to take something
due to needing other resources that are currently unavailable.
Circular set is something perhaps like two programs gained access to a resource the other needs to
proceed but they can’t access it as they need the previous resource until the next one is unlocked.

3. Given the one of the methods for handling a deadlock and a situation of your choosing or
creation. Explain in 1-3 sentences how you would deal with a deadlock and why?

If we know what resources a program needs to start up, like say a game needing access to certain areas
of ram, we can simply wait until all those areas are available perhaps even stop the programs ahead if
needed to allow the program to run and stop other programs from taking control of them. This
prevention would stop multiple types of deadlocks from happening, however if that game program
failed it would cause errors, so it would need a force shut down command to free up those resources
later. This would allow us to stop hold and wait procedures from occurring.

You might also like