Computer Science
Cape – Unit 2 – Module 3: Operating Systems & Computer Networks
Specific objective: Describe the function of the operating system
Objective
• At the end of the lesson you should be able to:
• Discuss the concept of Deadblock in relation to operating systems
What is a Deadlock?
• Deadlock refers to the blocking of all processes that utilize system resources
or communicate with each other.
• This deadlock also occurs when there is no efficient solution to a resource
deficiency or a conflict between two or more processes.
Resources
• Processor resources are split in three categories;
• Consumable
• Sharable
• Serially reusable
Sharable Resources
• Sharable resources can be used by more than one process at a time
Consumable Resources
• Consumable resources can only be used by one process, and the resource
gets “used up”.
Serially Reusable Resources
• These are used by one process at a time and not depleted by that use.
• In the OS, processes are initially allocated resources that they occupy and
release for other processes to utilize.
• As is expected, where a process holds its pre allocated resource and requests
another a Deadlock is bound to take occur.
Conditions for Deadlock
• Mutual exclusion
• The resource is available to only process at a time.
• Hold and wait
• Allocated resources being in a suspended or held state by a process while awaiting other resource
assignments.
• No preemption
• It is not possible to pre plan when a resource is going to be available
• Circular wait
• This exists in a closed chain of processes where the current process holds the resource needed for the
next process and so on.
Methods for Handling Deadlocks
• Guard against system deadlocks.
• Create and implement a recovery system in the event of a deadlock.

The Functions of the Operating System

  • 1.
    Computer Science Cape –Unit 2 – Module 3: Operating Systems & Computer Networks Specific objective: Describe the function of the operating system
  • 2.
    Objective • At theend of the lesson you should be able to: • Discuss the concept of Deadblock in relation to operating systems
  • 3.
    What is aDeadlock? • Deadlock refers to the blocking of all processes that utilize system resources or communicate with each other. • This deadlock also occurs when there is no efficient solution to a resource deficiency or a conflict between two or more processes.
  • 4.
    Resources • Processor resourcesare split in three categories; • Consumable • Sharable • Serially reusable
  • 5.
    Sharable Resources • Sharableresources can be used by more than one process at a time
  • 6.
    Consumable Resources • Consumableresources can only be used by one process, and the resource gets “used up”.
  • 7.
    Serially Reusable Resources •These are used by one process at a time and not depleted by that use. • In the OS, processes are initially allocated resources that they occupy and release for other processes to utilize. • As is expected, where a process holds its pre allocated resource and requests another a Deadlock is bound to take occur.
  • 8.
    Conditions for Deadlock •Mutual exclusion • The resource is available to only process at a time. • Hold and wait • Allocated resources being in a suspended or held state by a process while awaiting other resource assignments. • No preemption • It is not possible to pre plan when a resource is going to be available • Circular wait • This exists in a closed chain of processes where the current process holds the resource needed for the next process and so on.
  • 9.
    Methods for HandlingDeadlocks • Guard against system deadlocks. • Create and implement a recovery system in the event of a deadlock.