1. Trang chủ
  2. » Công Nghệ Thông Tin

Lecture Operating system: Chapter 3 - TS. Nguyễn Văn Hiệp

29 128 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 29
Dung lượng 0,98 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Lecture Operating system - Chapter 3: Deadlocks has contents: Resource, introduction to deadlocks, the ostrich algorithm, deadlock detection and recovery, deadlock avoidance, deadlock prevention, other issues.

Trang 5

Introduction to Deadlocks

• Formal definition :

A set of processes is deadlocked if each process in the set is waiting  for an event that only another process in the set can cause

Trang 9

How deadlock occurs

A       B      C

Deadlock Modeling (4)

Trang 10

Deadlock Modeling (5)

How deadlock can be avoided

(o)      (p)       (q)

Trang 12

Detection with One Resource of Each Type (1)

• Note the resource ownership and requests

• A cycle can be found within the graph, denoting deadlock

Trang 13

Data structures needed by deadlock detection algorithm

Trang 14

An example for the deadlock detection algorithm

Trang 17

Deadlock Avoidance

Resource Trajectories

Two process resource trajectories

Trang 18

Safe and Unsafe States (1)

Demonstration that the state in (a) is safe

(a)      (b)       (c)      (d)      (e)

Trang 19

Safe and Unsafe States (2)

Demonstration that the sate in b is not safe

(a)      (b)       (c)       (d) 

Trang 21

Banker's Algorithm for Multiple Resources

Example of banker's algorithm with multiple resources

Trang 26

Summary of approaches to deadlock prevention

Ngày đăng: 30/01/2020, 02:42

TỪ KHÓA LIÊN QUAN

w