- Type
- Subjective
- Course
- CS604 Operating Systems
- Size
- PDF 466 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 5. Download the file for all 5 pages.
FREE GUIDANCE
ASSIGNMENTS QUIZ GDB CISCO ASSIGNMENTS WITH 90 -100 PERCENT GUARANTEED MARKS
CS604 - Operating Systems (Lectures 19 to 45) - Full Concepts with Diagrams
1. Critical Section Problem
A critical section is part of a program where shared resources are accessed. If multiple processes enter their critical sections simultaneously, it may result in data inconsistency.
Requirements for Correct Synchronization:
- Mutual Exclusion: No two processes are in the critical section at the same time.
- Progress: If no process is in the critical section, the decision of which process enters next must not be delayed.
- Bounded Waiting: A limit must exist on the number of times a process is bypassed before entering.
Software Solutions:
Peterson's Algorithm (uses turn and flag variables)
Hardware Solutions:
Test-and-Set Compare-and-Swap
Diagram: Critical Section Cycle
| Entry Section |
v
| Critical Section |
v
| Exit Section |
v
| Remainder Section|
2. Deadlocks
A deadlock is a situation where a group of processes are blocked, each waiting for resources held by others.
4 Necessary Conditions for Deadlock:
- Mutual Exclusion – At least one resource is held in a non-shareable mode.
- Hold and Wait – Processes hold some resources and wait for others.
- No Preemption – Resources can't be forcibly taken.
- Circular Wait – A closed chain of processes exists.
Handling Methods:
Prevention: Eliminate one of the conditions. Avoidance: Use Banker's Algorithm. Detection & Recovery: Check resource allocation graph for cycles.
Diagram: Circular Wait
P1 ---> R1 | v R2 <--- P2
3. Semaphores & Classical Problems
A Semaphore is a synchronization tool to control access to critical sections.
Types:
Binary Semaphore (mutex): values 0 or 1 Counting Semaphore: range over an unrestricted domain
Operations:
wait(S): Decrements S. If S < 0, process waits. signal(S): Increments S. If S <= 0, a waiting process is resumed.
Classical Problems Solved with Semaphores:
- Producer-Consumer: Synchronize buffer usage
- Readers-Writers: Multiple readers or one writer
- Dining Philosophers: Avoid deadlock while eating
4. Memory Management
Responsible for keeping track of memory usage and managing allocation/deallocation.
Contiguous Memory Allocation:
Single Partition: One process in memory Multiple Fixed Partition: Fixed size blocks Multiple Variable Partition: Allocate based on process size
Paging:
Divide memory into fixed-size blocks Logical address = page number + offset Uses page table to map pages to frames
Diagram: Paging
Logical Address: Page # + Offset Page Table -> Frame #
Related CS604 files
All CS604 files →- CS604 Highlighted Handouts by Masters Highlighted PDF 7.8 MB
- CS604 Final Term Past Paper Spring 2005 Final term PDF 56 KB
- CS604 Quiz 3 June 2025 by Lucky Quiz PDF 1.8 MB
- CS604 Final Term Quiz 4 Quiz PDF 4 MB
- CS604 Slides Lectures 1-45 Quiz RAR 30.7 MB
- CS604 Final Term Quiz 3 File 2 July 2023 by Miss Mehwish Quiz PDF 540 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.