📘 SET ONE — 2 MARKS
Process Synchronization & Deadlocks

I’ll keep each answer short enough for 2 marks, but with enough key information to score full marks. I’ve also added a 🧠 Easy Memory line for quick revision.

1. Process Synchronization and Its Importance in Operating System
Answer:

Process synchronization is the coordination of multiple processes so that they can safely access shared data and resources.

Importance:

  • Prevents data inconsistency and race conditions.
  • Ensures proper and orderly execution of processes.
🧠 Easy Memory:

> Synchronization = Coordinate processes + Protect shared data
2. Define Critical Section Problem and Mention Any One Requirement
Answer:

The Critical Section Problem is the problem of ensuring that when multiple processes access shared data, only one process enters its critical section at a time.

One requirement:

Mutual Exclusion – Only one process can execute inside the critical section at a time.

🧠 Easy Memory:

> Critical Section = Shared data → One process at a time
3. State Any 2 Requirements That Must Be Satisfied by a Solution to the Critical Section Problem

A correct solution must satisfy:

  1. Mutual Exclusion
    Only one process can be inside the critical section at a time.
  2. Progress
    If the critical section is free, a process that wants to enter should not be unnecessarily delayed.

Another requirement: Bounded Waiting – A process should not wait forever.

🧠 Easy Memory:

Mutual Exclusion = One
Progress = Go when free
4. Differentiate Between Busy Waiting and Blocking with Respect to Process Synchronization
Busy Waiting Blocking
Process continuously checks for a resource while waiting. Process is put into a waiting/sleep state until the resource becomes available.
CPU time is wasted while waiting. CPU can be given to another process.

Example:

Busy Waiting:

> “Is it free? Is it free? Is it free?” 🔄

Blocking:

> “Wake me when it becomes free.” 😴
🧠 Easy Memory:

> Busy Waiting = Keep checking
Blocking = Sleep and wait
5. Define Semaphores and Mention Its 2 Basic Operations
Answer:

A semaphore is a synchronization variable used to control access to shared resources and coordinate processes.

Its two basic operations are:

  1. wait() – Requests/acquires a resource; the process may have to wait if the resource is unavailable.
  2. signal() – Releases a resource and can wake a waiting process.
🧠 Easy Memory:

> wait() = Acquire / Wait
signal() = Release / Notify
6. Define Deadlock and State Its Effect on System Performance
Answer:

A deadlock is a situation where two or more processes are permanently waiting for resources held by each other, so none can continue.

Effect on system performance:

Deadlock causes processes to stop progressing, wastes system resources, and reduces CPU utilization and throughput.

🧠 Easy Memory:

> Deadlock = Everyone waits → Nobody moves → Performance falls
7. List the Four Necessary Conditions for the Occurrence of Deadlock

The four necessary conditions are:

  1. Mutual Exclusion – Resource can be used by only one process at a time.
  2. Hold and Wait – Process holds one resource while waiting for another.
  3. No Preemption – Resources cannot be forcibly taken from a process.
  4. Circular Wait – Processes wait for resources held by one another in a circular chain.
🧠 SUPER EASY MEMORY:

> M → H → N → C

Mutual Exclusion
Hold and Wait
No Preemption
Circular Wait

Memory sentence:

> “My Hands Never Cross.”
8. Distinguish Between Deadlock Prevention and Deadlock Avoidance
Deadlock Prevention Deadlock Avoidance
Prevents deadlock by eliminating at least one necessary condition. Avoids deadlock by checking whether resource allocation keeps the system safe.
Uses fixed rules or restrictions. Makes allocation decisions dynamically.
Example: Resource ordering. Example: Banker's Algorithm.
🧠 Easy Memory:

> Prevention = Break the condition
Avoidance = Check before giving resources
9. Resource Allocation Graph and Its Purpose in Deadlock Analysis
Answer:

A Resource Allocation Graph (RAG) is a graph used to represent the relationship between processes and resources.

It shows:

  • Which resources are allocated to processes.
  • Which resources are requested by processes.

Purpose:

It is used to analyze and identify possible deadlocks, especially by checking for cycles in the graph.

🧠 Easy Memory:

> RAG = Who has what + Who wants what

Basic symbols:

○ = Process
□ = Resource
Process → Resource
   = Resource is requested

Resource → Process
   = Resource is allocated