Introduction to Information Technology · Unit 9
Operating System Management
Exam-focused notes for Operating System Management (Introduction to Information Technology, BIT101): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.
Operating System Management in short
The operating system must decide which task gets the CPU, handle problems when tasks wait on each other, and manage memory addresses. This unit covers those core ideas.
What this unit covers
- Process scheduling concepts
- Non-preemptive scheduling
- Preemptive scheduling
- Deadlock definition and reasons
- Physical and logical address concepts
Deadlock definition and reasons
2080 · 5 marks
What is Deadlock? What are the reasons for deadlock? [5]
Show solved answerHide answer
Deadlock
Definition
A deadlock is a situation in which a set of processes are blocked permanently because each process in the set is waiting for a resource that is held by another process in the same set. As a result, none of the processes can proceed, and they remain in a waiting state indefinitely.
Example: Process P1 holds Resource R1 and waits for R2, while Process P2 holds R2 and waits for R1. Neither can proceed.
Reasons for Deadlock (Necessary Conditions)
Deadlock can occur if and only if all four of the following conditions hold simultaneously (Coffman Conditions, 1971):
1. Mutual Exclusion
- At least one resource must be held in a non-shareable mode.
- Only one process can use the resource at a time.
- If another process requests that resource, it must wait.
2. Hold and Wait
- A process is holding at least one resource and is waiting to acquire additional resources that are currently held by other processes.
3. No Preemption
- Resources cannot be forcibly taken away from a process holding them.
- A resource can only be released voluntarily by the process holding it after it has completed its task.
4. Circular Wait
- A set of processes {P0, P1, P2, ..., Pn} exists such that:
- P0 is waiting for a resource held by P1
- P1 is waiting for a resource held by P2
- ...
- Pn is waiting for a resource held by P0
- This forms a circular chain of waiting processes.
Summary Table
| Condition | Description |
|---|---|
| Mutual Exclusion | Resource held by only one process at a time |
| Hold and Wait | Process holds resource while waiting for more |
| No Preemption | Resource cannot be forcibly taken away |
| Circular Wait | Circular chain of processes waiting for each other |
Key Point: All four conditions must hold simultaneously for a deadlock to occur. Preventing even one of these conditions is sufficient to prevent deadlock.
Physical and logical address concepts
2080 · 5 marks
Explain about Physical address and Logical address. [5]
Process scheduling concepts
2078 · 5 marks
What is scheduling? Explain Non Pre.-emptive scheduling and Pre-emptive scheduling. [5]
Make Unit 9 stick
Practice BIT101 with flashcards & quizzes