College of Computer Science & Information Technology King Khalid University · جامعة الملك خالد
Week
Week 6
Topic
Deadlocks
Workload
6–8 Hours
Status
Materials Placeholder
OverviewScheduleObjectivesMaterialsReadingLabAssignmentQuizDownloadsChecklist
Module Overview

Week 6 studies what can go wrong when multiple processes or threads compete for resources. Students learn the four necessary deadlock conditions and practical strategies for handling deadlocks.

Lecture
Deadlock conditions and handling strategies
Reading
OSTEP Chapter 32
Lab
Deadlock examples and lock-ordering fixes
Due
Update date later
Weekly Schedule
TimeActivityWhat Students DoLink
Before LecturePreparation ReadingRead OSTEP Chapter 32 and prepare one example of circular waiting.Book →
Lecture 1Deadlock BasicsMutual exclusion, hold and wait, no preemption, circular wait, and resource-allocation graphs.Slides →
Lecture 2Deadlock HandlingPrevention, avoidance, detection, recovery, lock ordering, and timeout-based approaches.Slides →
Lab SessionDeadlock LabCreate a simple deadlock using pthread mutexes, diagnose it, and fix it using lock ordering.Lab →
After LectureAssignment 6Analyze several resource-allocation scenarios and identify whether deadlock can occur.Assignment →
End of WeekQuiz 6Complete short quiz on deadlock conditions, prevention, avoidance, detection, and lock ordering.Quiz →
Learning Objectives
Outcome
By the end of Week 6, students should be able to:

List the four deadlock conditions, identify deadlock in examples, explain prevention and avoidance, and fix simple deadlocks using lock ordering.

DeadlockResourcesLock OrderingDetection
Module 6
Core
Lecture Materials
Slides
Week 6 Lecture Slides

Slides for deadlocks. Replace this placeholder with your final PDF or Google Slides link.

PDFLectureRequired
Slides
Lecture
Open Slides →
Notes
Week 6 Lecture Notes

Instructor notes and class summary for review after lecture and before assessment.

PDFReviewSummary
PDF
Notes
Download →
Video
Lecture Recording

Placeholder for lecture recording or external video link. Replace this href with YouTube, Blackboard, or local recording URL.

VideoRecordingOptional Review
Video
TBD
Watch →
Code
Starter Code

Starter files, examples, and templates for the Week 6 lab and assignment.

CLinuxStarter
ZIP
Starter
Download →
Reading
Required
OSTEP Chapter 32

Complete the assigned reading before lecture. Focus on definitions, mechanisms, tradeoffs, and examples that connect to the lab.

RequiredReadingPreparation
Required
Book/Notes
Open →
Reference
Linux man-pages Project

Use this reference to look up commands, system calls, library calls, and Linux behavior related to this week.

LinuxManualReference
Reference
man7
Open →
Lab
Lab 6
Deadlock Lab

Create a simple deadlock using pthread mutexes, diagnose it, and fix it using lock ordering.

Hands-onLinuxC
Required
90 min
Open Lab →
Assignment
HW 6
Week 6 Assignment

Analyze several resource-allocation scenarios and identify whether deadlock can occur. Submit source code, screenshots, and a short explanation.

HomeworkSubmissionReport
10 points
Due TBD
Download →
Quiz
Quiz 6
Week 6 Quiz

Short quiz covering deadlock conditions, prevention, avoidance, detection, and lock ordering.

10 Questions15 MinutesOnline
Quiz
TBD
Start →
All Downloads
Files
Week 6 File Package

Central download area for slides, notes, lab, assignment, starter code, and reference files. Replace placeholder paths after uploading final files.

SlidesNotesLabAssignmentCode
Student Checklist
  • □ Complete preparation reading
  • □ Open Week 6 slides
  • □ Review lecture notes
  • □ Complete Lab 6
  • □ Submit Assignment 6
  • □ Complete Quiz 6
  • □ Save screenshots and code
  • □ Prepare questions for next week

Week 7 focuses on memory management. Students move from CPU and concurrency management to memory abstractions.