Deadlocks:
Fast answer
A deadlock is a situation in computing where two or more processes (or threads) get
stuck waiting on each other indefinitely, so none of them can proceed.
Simple idea
Imagine two people trying to pass each other in a narrow hallway:
• Person A waits for Person B to move.
• Person B waits for Person A to move.
• Neither moves → they’re stuck forever.
That’s a deadlock.
In operating systems / programming
Deadlocks usually happen when processes compete for shared resources (like files,
memory, locks).
Classic example with locks:
• Process 1 locks Resource A
• Process 2 locks Resource B
• Process 1 tries to lock Resource B → waits
• Process 2 tries to lock Resource A → waits
Now both are waiting forever → deadlock.
4 Necessary Conditions for Deadlock
All four must be true for a deadlock to occur:
1. Mutual Exclusion
A resource can only be used by one process at a time.
2. Hold and Wait
A process holds at least one resource while waiting for others.
3. No Preemption
Resources cannot be forcibly taken away.
4. Circular Wait
A cycle of processes exists where each is waiting for the next.
Ways to Handle Deadlocks
1. Prevention
Break one of the 4 conditions (e.g., require all resources upfront).
2. Avoidance
Use algorithms like Banker’s Algorithm to avoid unsafe states.
3. Detection & Recovery
Let deadlocks happen, then detect and resolve (e.g., kill a process).
4. Ignoring (Ostrich approach)
Do nothing if deadlocks are rare (used in many systems).
In multithreading (common case)
Deadlocks often happen with:
• mutexes
• synchronized blocks
• nested locks
Example in code (conceptual):
Thread 1: lock(A) → lock(B)
Thread 2: lock(B) → lock(A)
If you want, I can show real examples in Java, Python, or C++—or how to fix deadlocks in
practice.
Definition,
Deadlock – Definition (Exam Ready)
A deadlock is a situation in an operating system where two or more processes are
permanently blocked because each process is waiting for a resource held by
another process.
In one line (for 2 marks):
A deadlock is a condition where processes wait indefinitely for resources, and none can
proceed.
Deadlock Characterization,
Deadlock Characterization (Exam Ready Answer)
Deadlock characterization describes the conditions under which a deadlock can
occur in a system.
Four Necessary Conditions (Must ALL hold true)
1. Mutual Exclusion
At least one resource must be non-shareable (only one process can use it at a
time).
2. Hold and Wait
A process is holding one or more resources and is waiting to acquire additional
resources.
3. No Preemption
Resources cannot be forcibly taken from a process; they must be released
voluntarily.
4. Circular Wait
A set of processes exists such that:
P1 waits for P2 → P2 waits for P3 → … → Pn waits for P1
forming a cycle (loop).
Important Point
If all four conditions occur simultaneously, then deadlock will happen.
Diagram (must write in exam for 10 marks)
P1 → R1 → P2 → R2 → P1
(Circular waiting chain)
Conclusion Line
Deadlock can occur only when all four necessary conditions are satisfied
simultaneously in a system.
Deadlock Prevention
Deadlock Prevention (Exam Ready Answer)
Definition:
Deadlock prevention is a technique in operating systems where the system is designed
in such a way that at least one of the four necessary conditions of deadlock is never
allowed to occur.
Idea
If we break any one of the 4 conditions, deadlock cannot happen.
Methods to Prevent Deadlock
1. Eliminate Mutual Exclusion
• Make resources sharable whenever possible.
• Example: Read-only files can be shared by multiple processes.
Limitation: Not possible for all resources (e.g., printer).
2. Eliminate Hold and Wait
• A process must request all required resources at once before execution.
• OR release all resources before requesting new ones.
Disadvantage:
• Low resource utilization
• Possible starvation
3. Eliminate No Preemption
• If a process holding resources requests another unavailable resource:
• Force it to release all held resources
• Resources are reassigned later.
Used in: CPU scheduling, memory management
4. Eliminate Circular Wait
• Assign a fixed order (numbering) to resources
• Processes must request resources in increasing order only
Example:
R1 → R2 → R3 (must follow this order)
Diagram (write in exam)
Breaking conditions:
Mutual Exclusion
Hold & Wait
No Preemption
Circular Wait
→ Deadlock Prevented
Conclusion Line
Deadlock prevention ensures system safety by restricting resource allocation policies
so that at least one necessary condition is always violated, thereby avoiding
deadlocks completely.
Deadlock Avoidance
Deadlock Avoidance (Exam Ready Answer)
Definition:
Deadlock avoidance is a technique in operating systems where the system dynamically
checks resource allocation and ensures that it never enters an unsafe state, thereby
avoiding deadlocks.
Key Idea
Before allocating resources, the system checks:
“Will this allocation lead to a deadlock in future?”
• If YES → do not allocate
• If NO → allocate
Safe State vs Unsafe State
• Safe State:
A state where the system can allocate resources to each process in some
order and still avoid deadlock.
• Unsafe State:
A state that may lead to deadlock (not necessarily deadlock yet, but risky).
Goal: Always remain in a safe state
Banker’s Algorithm (Most Important)
Used for deadlock avoidance.
Concept:
• System acts like a bank
• Processes request resources like customers
• The system ensures it can satisfy all processes without deadlock
Basic Steps:
1. Check if request ≤ need
2. Check if request ≤ available
3. Pretend to allocate resources
4. Check if system remains safe
5. If safe → allocate, else → wait
Example Idea
• Suppose system has limited resources
• If giving resource to one process causes others to wait forever → avoid
allocation
Advantages
• Prevents deadlock before it happens
• Better resource utilization than prevention
Disadvantages
• Requires prior knowledge of maximum resource needs
• Complex to implement
• Not suitable for all systems
Diagram (write in exam)
Request → Check Safe State →
YES → Allocate
NO → Wait
Conclusion Line
Deadlock avoidance ensures that the system always operates in a safe state by
carefully analyzing each resource request before granting it.
Banker's Algorithm
Banker’s Algorithm (Exam Ready Answer – Full Marks)
Definition
Banker’s Algorithm is a deadlock avoidance algorithm that checks whether granting a
resource request will keep the system in a safe state before allocation.
Basic Idea
The system behaves like a bank:
• Processes = customers
• Resources = money
• The system only grants a request if it can still satisfy all processes later
Data Structures Used
1. Available
Number of available resources
2. Max
Maximum demand of each process
3. Allocation
Resources currently allocated
4. Need
Remaining resources required
Need = Max – Allocation
Safety Algorithm (Very Important)
Steps to check safe state:
1. Initialize:
Work = Available
Finish[i] = false
2. Find a process such that:
• Finish[i] = false
• Need[i] ≤ Work
3. If found:
• Work = Work + Allocation[i]
• Finish[i] = true
• Repeat Step 2
4. If all Finish[i] = true → SAFE STATE
Otherwise → UNSAFE STATE
Resource Request Algorithm
When process Pi makes a request:
1. Check: Request ≤ Need
If not → error
2. Check: Request ≤ Available
If not → process waits
3. Pretend allocation:
• Available = Available – Request
• Allocation[i] += Request
• Need[i] -= Request
4. Run Safety Algorithm
• If safe → Grant request
• If unsafe → Rollback & wait
Diagram (Exam Drawing)
Request → Check Need → Check Available →
Pretend Allocate → Safety Check →
Safe → Allocate
Unsafe → Wait
Advantages
• Avoids deadlock completely
• Ensures safe execution
Disadvantages
• Needs prior knowledge of maximum resources
• Complex and slow
• Not practical for large systems
Conclusion Line
Banker’s Algorithm ensures that the system remains in a safe state by granting resource
requests only when it is safe to do so, thereby preventing deadlocks.
Deadlock Detection Algorithm.
Deadlock Detection Algorithm (Exam Ready Answer – Full Marks)
Definition
Deadlock detection is a technique where the system allows deadlocks to occur and
then detects them using an algorithm, so that recovery actions can be taken.
Idea
System does not prevent or avoid deadlock
It periodically checks:
“Is there a deadlock in the system?”
Case 1: Single Instance of Each Resource
• Use Wait-For Graph (WFG)
• Nodes = Processes
• Edge: Pi → Pj means Pi is waiting for Pj
Rule:
If there is a cycle in the graph → Deadlock exists
Case 2: Multiple Instances of Resources (Important Algorithm)
Data Structures
1. Available → Available resources
2. Allocation → Resources allocated to processes
3. Request → Current request of processes
Detection Algorithm Steps
1. Initialize:
Work = Available
Finish[i] = false for all processes
2. Find a process such that:
• Finish[i] = false
• Request[i] ≤ Work
3. If found:
• Work = Work + Allocation[i]
• Finish[i] = true
• Repeat Step 2
4. If no such process exists:
• If any Finish[i] = false → Deadlock exists
• These processes are deadlocked
Diagram (Exam Drawing)
Check Requests → Compare with Available →
Possible → Release Resources
Not Possible → Deadlock Detected
Key Point
Similar to Banker’s Safety Algorithm
Difference: Uses Request instead of Need
Advantages
• No need for prior knowledge of max resources
• Simple concept
Disadvantages
• Deadlock is already occurred before detection
• Needs recovery mechanism
• System performance may degrade
Conclusion Line
Deadlock detection algorithms identify deadlocks by analyzing resource allocation and
waiting conditions, allowing the system to take corrective actions after detection.
Memory Management
Memory Management (Exam Ready Answer – Full Marks)
Definition
Memory Management is the function of an operating system that manages and
controls main memory (RAM) by allocating and deallocating memory to processes
efficiently.
Objectives (Why needed)
• Efficient utilization of memory
• Process isolation & protection
• Support multiprogramming
• Fast execution of programs
Functions of Memory Management
1. Allocation & Deallocation
• Assign memory to processes
• Free memory after use
2. Memory Protection
• Prevent one process from accessing another’s memory
3. Address Mapping (Logical → Physical)
• Convert logical address (CPU) to physical address (RAM)
4. Sharing
• Allow controlled sharing of memory between processes
Types of Memory Allocation
1. Contiguous Allocation
• Each process occupies a single continuous block
Types:
• Fixed Partition
• Variable Partition
Problems:
• Internal Fragmentation
• External Fragmentation
2. Non-Contiguous Allocation
• Process is divided and stored in different memory locations
Types:
• Paging
• Segmentation
Important Concepts
• Fragmentation:
• Internal → Wasted space inside allocated block
• External → Free memory scattered in small pieces
• Swapping:
• Process moved between RAM and disk
• Virtual Memory:
• Allows execution even if process is not fully in RAM
Diagram (Exam Drawing)
CPU → Logical Address → Memory Management Unit (MMU) → Physical Address → RAM
Advantages
• Efficient use of memory
• Better system performance
• Supports multitasking
Disadvantages
• Complexity in implementation
• Overhead in address translation
Conclusion Line
Memory management ensures efficient allocation, protection, and utilization of
memory resources, enabling smooth execution of multiple processes in a system.
Contiguous Memory allocation
Contiguous Memory Allocation (Exam Ready Answer – Full Marks)
Definition
Contiguous Memory Allocation is a memory management technique where each
process is allocated a single continuous (adjacent) block of memory in RAM.
Key Idea
Process must fit into one continuous memory region
Easy to implement but has fragmentation problems
Types of Contiguous Allocation
1. Fixed Partition Allocation
• Memory is divided into fixed-size partitions
• Each partition holds one process
Advantages:
• Simple to implement
Disadvantages:
• Internal Fragmentation (wasted space inside partition)
• Limited number of processes
2. Variable (Dynamic) Partition Allocation
• Memory is divided dynamically based on process size
Techniques:
• First Fit → Allocate first sufficient block
• Best Fit → Allocate smallest suitable block
• Worst Fit → Allocate largest available block
Advantages:
• Better memory utilization
Disadvantages:
• External Fragmentation
• Requires compaction
Diagram (Exam Drawing)
| OS | P1 | Free | P2 | Free | P3 |
(Continuous memory blocks)
Problems in Contiguous Allocation
1. Internal Fragmentation
• Unused space inside allocated block
2. External Fragmentation
• Free memory scattered in small pieces
3. Compaction
• Process of combining small free spaces into one large block
Advantages
• Simple and fast
• Easy address calculation
Disadvantages
• Fragmentation issues
• Inefficient for large systems
• Limited flexibility
Conclusion Line
Contiguous memory allocation is simple and efficient but suffers from fragmentation
problems, making it less suitable for modern systems compared to non-contiguous
techniques like paging.
Memory Protection
Memory Protection (Exam Ready Answer – Full Marks)
Definition
Memory Protection is a mechanism in an operating system that ensures that one
process cannot access or modify the memory of another process without proper
permission.
Purpose
• Prevent unauthorized access
• Ensure process isolation
• Maintain system stability & security
How Memory Protection is Achieved
1. Base Register & Limit Register (Very Important)
• Base Register → starting address of the process
• Limit Register → size (range) of the process
Every memory access is checked:
• If address ≥ Base AND address < Base + Limit → Allowed
• Else → Trap (error)
Diagram (Must Draw in Exam)
Process Address → Check (Base & Limit) →
Valid → Access Memory
Invalid → Trap to OS
Other Protection Techniques
2. Paging Protection
• Each page has protection bits (read, write, execute)
3. Segmentation Protection
• Each segment has access rights
4. Privileged Instructions
• Only OS can change memory control registers
Advantages
• Protects processes from each other
• Prevents data corruption
• Improves system security
Disadvantages
• Adds overhead (extra checking)
• Slightly reduces performance
Conclusion Line
Memory protection ensures safe and secure execution of processes by restricting
unauthorized memory access using hardware and OS mechanisms.
Memory Allocation
Memory Allocation (Exam Ready Answer – Full Marks)
Definition
Memory Allocation is the process by which the operating system assigns memory
space (RAM) to processes for execution and reclaims it after use.
Objectives
• Efficient utilization of memory
• Minimize fragmentation
• Support multiple processes
• Ensure fast allocation & deallocation
Types of Memory Allocation
1. Contiguous Memory Allocation
• Each process gets a single continuous block of memory
Techniques:
• Fixed Partition
• Variable Partition (First Fit, Best Fit, Worst Fit)
Problem:
• Internal & External Fragmentation
2. Non-Contiguous Memory Allocation
• Process is divided and stored in different memory locations
Techniques:
• Paging
• Segmentation
Advantage:
• Reduces fragmentation
• Better memory utilization
Allocation Strategies (Important for Exams)
1. First Fit
• Allocate first available block large enough
2. Best Fit
• Allocate smallest suitable block
3. Worst Fit
• Allocate largest available block
Diagram (Exam Drawing)
Free Blocks → [100KB] [500KB] [200KB] [300KB]
Process (150KB) → Allocated to suitable block
Key Problems
1. Internal Fragmentation
• Wasted space inside allocated block
2. External Fragmentation
• Free memory scattered
Advantages
• Efficient process execution
• Supports multiprogramming
Disadvantages
• Fragmentation issues
• Complex management in large systems
Conclusion Line
Memory allocation is a crucial OS function that ensures efficient distribution of memory
resources among processes while minimizing wastage and maximizing performance.
Fragmentation,
Fragmentation (Exam Ready Answer – Full Marks)
Definition
Fragmentation is a condition in memory management where memory is wasted or not
efficiently utilized due to improper allocation of memory blocks.
Types of Fragmentation
1. Internal Fragmentation
• Occurs when allocated memory block is larger than the required memory
• Extra space inside the block is wasted
Example:
Process needs 18 KB, allocated 20 KB → 2 KB wasted
Where occurs:
• Fixed partition allocation
2. External Fragmentation
• Occurs when free memory is scattered in small non-contiguous blocks
• Total free memory is enough, but not in one continuous block
Example:
Free blocks = 5 KB + 5 KB + 5 KB
Process needs 12 KB → cannot allocate
Where occurs:
• Variable partition allocation
Diagram (Must Draw in Exam)
Internal: | P1 | unused space |
External: | P1 | free | P2 | free | P3 |
Solutions to Fragmentation
For Internal Fragmentation
• Use better allocation strategies
• Reduce partition size
For External Fragmentation
• Compaction → combine small free blocks
• Use Paging or Segmentation
Advantages (if controlled)
• Efficient use of memory
Disadvantages
• Wastes memory
• Reduces system performance
• Allocation becomes difficult
Conclusion Line
Fragmentation reduces memory efficiency by creating unusable memory spaces, and it
can be minimized using proper memory management techniques like paging and
compaction.
Paging-Basic Method,
Paging – Basic Method (Exam Ready Answer – Full Marks)
Definition
Paging is a memory management technique in which physical memory is divided into
fixed-size blocks called frames and logical memory is divided into blocks of the
same size called pages, allowing a process to be stored non-contiguously.
Key Idea
Process is divided into pages
Memory is divided into frames
Pages are loaded into any available frames
Address Translation (Very Important)
Logical Address = Page Number (p) + Offset (d)
• Page Number (p) → used to find frame number from page table
• Offset (d) → position inside frame
Physical Address = Frame Number + Offset
Page Table
• Maintained by OS
• Maps page number → frame number
Diagram (Must Draw in Exam)
Logical Address → [ Page No | Offset ]
↓
Page Table → Frame No
↓
Physical Address → [ Frame No | Offset ]
Steps of Paging
1. CPU generates logical address (p, d)
2. Page number (p) is sent to page table
3. Get corresponding frame number
4. Combine frame number + offset (d)
5. Access physical memory
Advantages
• Eliminates external fragmentation
• Efficient memory utilization
• Supports virtual memory
Disadvantages
• Internal fragmentation still exists
• Extra overhead due to page table
• Address translation takes time
Conclusion Line
Paging is an efficient non-contiguous memory allocation technique that improves
memory utilization and eliminates external fragmentation by dividing memory into fixed-
size pages and frames.
Hardware Support-Translation
Hardware Support for Address Translation (Paging) – Exam Ready Answer
Definition
Hardware support for address translation refers to the use of special hardware
components to convert logical addresses into physical addresses efficiently in
paging.
Key Hardware Components
1. Memory Management Unit (MMU)
• A hardware device that maps logical address → physical address
• Works between CPU and memory
2. Page Table (in Main Memory)
• Stores mapping of Page Number → Frame Number
• Used during address translation
3. Translation Lookaside Buffer (TLB) (Very Important)
• A small, fast cache that stores recent page table entries
Speeds up address translation
Address Translation Process
1. CPU generates logical address → (Page No, Offset)
2. Check TLB:
• If found (TLB hit) → get frame number directly
• If not found (TLB miss) → go to page table
3. Get frame number from page table
4. Combine with offset → form physical address
5. Access memory
Diagram (Must Draw in Exam)
CPU → Logical Address (p, d)
↓
TLB
/ \
Hit Miss
| ↓
Frame Page Table
| ↓
└────→ Physical Address → Memory
Effective Memory Access Time (Concept)
• TLB reduces memory access time
• Without TLB → 2 memory accesses
• With TLB hit → 1 memory access
Advantages
• Faster address translation
• Improves system performance
Disadvantages
• Extra hardware cost (TLB)
• Complexity increases
Conclusion Line
Hardware support like MMU and TLB enables fast and efficient address translation,
significantly improving system performance in paging systems.
Look Aside Buffer,
Translation Lookaside Buffer (TLB) – Exam Ready Answer
Definition
A Translation Lookaside Buffer (TLB) is a small, fast cache memory that
stores recently used page table entries to speed up address translation.
Key Idea
Instead of searching the page table in main memory every time,
the system first checks the TLB for the required mapping.
Working of TLB
1. CPU generates logical address → (Page No, Offset)
2. Check TLB:
• TLB Hit → Frame number found → fast access
• TLB Miss → Search page table in memory
3. If found in page table:
• Update TLB
• Continue execution
Diagram (Must Draw in Exam)
CPU → Logical Address (p, d)
↓
TLB
/ \
Hit Miss
| ↓
Frame Page Table
| ↓
└────→ Physical Address → Memory
Important Terms
• TLB Hit: Page entry found in TLB → faster
• TLB Miss: Not found → slower (needs memory access)
Advantages
• Reduces memory access time
• Improves system performance
• Faster address translation
Disadvantages
• Limited size (small cache)
• Additional hardware cost
• Complexity in management
Conclusion Line
TLB is a high-speed cache that significantly improves paging performance by reducing
the time required for address translation.
Protection
Protection (in Paging) – Exam Ready Answer
Definition
Protection in paging refers to mechanisms that ensure that a process can access
only its own pages and cannot interfere with other processes’ memory.
Key Idea
Each page is given access permissions
Hardware checks permissions before allowing access
How Protection is Achieved
1. Protection Bits (Very Important)
Each page table entry contains protection bits, such as:
• Read (R) → can only read data
• Write (W) → can modify data
• Execute (X) → can execute instructions
If a process violates permissions → Trap (error to OS)
2. Valid / Invalid Bit
• Valid bit = 1 → Page belongs to process
• Valid bit = 0 → Page not accessible
Prevents illegal memory access
3. Privileged Mode
• Only OS can modify page table entries
• Ensures security
Diagram (Must Draw in Exam)
Page Table Entry → [ Frame No | R | W | X | Valid Bit ]
↓
Check Permission
Valid → Access Allowed
Invalid → Trap to OS
Advantages
• Ensures process isolation
• Prevents data corruption
• Improves system security
Disadvantages
• Slight performance overhead
• Additional hardware complexity
Conclusion Line
Protection in paging ensures safe memory access by using hardware-supported
permission checks, preventing unauthorized operations and maintaining system
integrity.
Shared Pages,
Shared Pages (in Paging) – Exam Ready Answer
Definition
Shared Pages are memory pages that are shared among multiple processes, allowing
them to access the same physical memory without duplicating it.
Key Idea
Multiple processes can map their different logical pages to the same physical
frame
How It Works
• Each process has its own page table
• Page tables map their pages → same frame
• Shared page is usually marked as:
• Read-only (for safety) OR
• Controlled read/write
Diagram (Must Draw in Exam)
Process P1 Page Table → Page 2 → Frame 5
Process P2 Page Table → Page 3 → Frame 5
↓
Same Physical Frame (Shared)
Types of Sharing
1. Read-Only Sharing
• Used for code (e.g., libraries)
• No risk of modification
2. Read-Write Sharing
• Used for inter-process communication
• Needs proper synchronization
Advantages
• Saves memory (no duplication)
• Faster communication between processes
• Efficient use of resources
Disadvantages
• Security risks if not controlled
• Requires synchronization for write operations
Conclusion Line
Shared pages improve memory efficiency by allowing multiple processes to access the
same physical memory while maintaining protection through controlled access
permissions.
Structure of the Page Table
Structure of the Page Table (Exam Ready Answer – Full Marks)
Definition
A Page Table is a data structure maintained by the OS that maps each logical page
number to a physical frame number in memory.
Basic Structure
Each entry in the page table is called a Page Table Entry (PTE).
Contents of Page Table Entry (Very Important)
1. Frame Number
• Indicates the location in physical memory
2. Valid / Invalid Bit
• Valid → Page is in memory
• Invalid → Page not present
3. Protection Bits
• Read / Write / Execute permissions
4. Reference Bit (Accessed Bit)
• Set when page is accessed
5. Dirty Bit (Modified Bit)
• Set if page is modified
Diagram (Must Draw in Exam)
Page Table
Page No | Frame No | Valid | R/W | Ref | Dirty
---------------------------------------------
0 | 5 | 1 | R | 1 | 0
1 | 2 | 1 | RW | 0 | 1
2 | - | 0 |- | - | -
Types of Page Table Structures (Short Note)
1. Single-Level Page Table
• Simple but large in size
2. Multi-Level Page Table
• Divides page table into levels
• Saves memory
3. Hashed Page Table
• Uses hash function for mapping
4. Inverted Page Table
• One entry per frame (not per page)
Advantages
• Efficient mapping of logical to physical memory
• Supports virtual memory
• Enables protection and sharing
Disadvantages
• Large size for big processes
• Extra memory access needed
Conclusion Line
The page table is a crucial structure in paging that stores mapping and control
information, enabling efficient and secure memory management.
Swapping.
Swapping (Exam Ready Answer – Full Marks)
Definition
Swapping is a memory management technique in which a process is temporarily
moved from main memory (RAM) to secondary storage (disk) and brought back later
for execution.
Key Idea
When RAM is full, the OS swaps out a process to disk
When needed again, it is swapped in to RAM
Steps of Swapping
1. Process is executing in RAM
2. OS selects a process to remove
3. Process is moved to backing store (disk) → Swap Out
4. Another process is loaded into RAM
5. When required, original process is brought back → Swap In
Diagram (Must Draw in Exam)
RAM (Main Memory) ↔ Disk (Backing Store)
P1, P2 P3 (swapped out)
Swap Out → P3 to Disk
Swap In → P3 to RAM
Important Points
• Backing store = secondary storage (hard disk)
• Managed by medium-term scheduler
• Helps in multiprogramming
Advantages
• Improves memory utilization
• Allows more processes to run
• Increases CPU utilization
Disadvantages
• Slow (disk access is slow)
• High overhead due to frequent swapping
• Can lead to thrashing
Conclusion Line
Swapping enables efficient use of memory by temporarily moving processes between
RAM and disk, allowing more processes to execute in a system.