SlideShare une entreprise Scribd logo
1  sur  41
บทที่  7  วงจรอับ  :  Deadlocks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ปัญหาการเกิดวงจรอับ The Deadlock Problem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ตัวอย่าง สะพานแบบที่รถสามารถวิ่งได้คันเดียว Bridge Crossing Example ,[object Object],[object Object],[object Object],[object Object]
ตัวแบบระบบ  System Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ลักษณะต่างๆ ของวงจรอับ  Deadlock Characterization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],อาจเกิดวงจรอับขึ้นได้หากเกิดเหตุการณ์สี่แบบต่อไปนี้อย่างต่อเนื่อง
กราฟแสดงการจัดการทรัพยากร  Resource-Allocation Graph ,[object Object],[object Object],[object Object],[object Object],[object Object],A set of vertices  V  and a set of edges  E .
Resource-Allocation Graph (Cont.) ,[object Object],[object Object],[object Object],[object Object],P i P i R j R j
ตัวอย่าง กราฟแสดงการจัดการกับทรัพยากร Example of a Resource Allocation Graph
กราฟแสดงการจัดการกับทรัพยากร ที่เกิดปัญหาวงจรอับ Resource Allocation Graph With A Deadlock
กราฟแสดงการจัดการกับทรัพยากรแบบวนรอบ แต่ไม่เกิดปัญหาวงจรอับ Resource Allocation Graph With A Cycle But No Deadlock
ปัจจัยพื้นฐาน  Basic Facts ,[object Object],[object Object],[object Object],[object Object]
ระเบียบวิธีในการจัดการกับการเกิดวงจรอับ   Methods for Handling Deadlocks ,[object Object],[object Object],[object Object],[object Object]
การป้องกันการเกิดวงจรอับ    Deadlock Prevention ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Restrain the ways request can be made.
การป้องกันการเกิดวงจรอับ Deadlock Prevention (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
การหลีกเลี่ยงการเกิดวงจรอับ   Deadlock Avoidance ,[object Object],[object Object],[object Object],ระบบจำเป็นต้องทราบถึงข้อมูลเกี่ยวกับระดับความสำคัญ
สถานะปลอดภัย  Safe State ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ความจริงพื้นฐาน  Basic Facts ,[object Object],[object Object],[object Object]
สถานะที่ปลอดภัยและไม่ปลอดภัยในการเกิดปัญหาวงจรอับ  Safe, Unsafe , Deadlock State
Resource-Allocation Graph Algorithm ,[object Object],[object Object],[object Object],[object Object]
กราฟแสดงการจัดสรรทรัพยากร เพื่อหลีกเลี่ยงการเกิดปัญหาวงจรอับ Resource-Allocation Graph For Deadlock Avoidance
กราฟแสดงการจัดสรรทรัพยากรในสถานะที่ไม่ปลอดภัย Unsafe State In Resource-Allocation Graph
อัลกอริธึมของนายธนาคาร Banker’s Algorithm ,[object Object],[object Object],[object Object],[object Object]
โครงสร้างข้อมูลของ อัลกอริธึมของนายธนาคาร Data Structures for the Banker’s Algorithm  ,[object Object],[object Object],[object Object],[object Object],[object Object],Let  n  = number of processes, and  m  = number of resources types.
Safety Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Resource-Request Algorithm for Process  P i ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example of Banker’s Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example  P 1  Request (1,0,2) (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
การตรวจจับการเกิดวงจรอับ Deadlock Detection ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Single Instance of Each Resource Type ,[object Object],[object Object],[object Object],[object Object],[object Object]
กราฟแสดงการจัดสรรทรัพยากร และกราฟแสดงการรอคอย Resource-Allocation Graph and Wait-for Graph Resource-Allocation Graph Corresponding wait-for graph
อินแสตนส์ต่างๆ ของทรัพยากรแต่ละประเภท  Several Instances of a Resource Type ,[object Object],[object Object],[object Object]
อัลกอริธึมในการตรวจจับ Detection Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Detection Algorithm (Cont.) ,[object Object],[object Object],Algorithm requires an order of O( m  x  n 2)  operations to detect whether the system is in deadlocked state.
Example of Detection Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Detection-Algorithm Usage ,[object Object],[object Object],[object Object],[object Object],[object Object]
การกู้คืนสถานะจากปัญหาวงจรอับ การสิ้นสุดโปรเซส Recovery from Deadlock:  Process Termination ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
การกู้คืนสถานะจากปัญหาวงจรอับ  การจัดสรรทรัพยากรเชิงลำดับความสำคัญ Recovery from Deadlock: Resource Preemption ,[object Object],[object Object],[object Object]
การใช้หลายกลยุทธ์ในการจัดการการเกิดวงจรอับ Combined Approach to Deadlock Handling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
การเกิดวงจรอับ Traffic Deadlock for Exercise 8.4

Contenu connexe

Tendances

บทท 8 ระบบประสาท (1)
บทท   8 ระบบประสาท (1)บทท   8 ระบบประสาท (1)
บทท 8 ระบบประสาท (1)Natthaya Khaothong
 
Best practice ครูยุภาพร ผลสว่าง
Best practice ครูยุภาพร ผลสว่างBest practice ครูยุภาพร ผลสว่าง
Best practice ครูยุภาพร ผลสว่างsomdetpittayakom school
 
5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์
5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์
5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์Wichai Likitponrak
 
Biology Lab: Plant DNA Extraction
Biology Lab:  Plant DNA ExtractionBiology Lab:  Plant DNA Extraction
Biology Lab: Plant DNA ExtractionNapasorn Juiin
 
ระบบหมุนเวียนเลือด
ระบบหมุนเวียนเลือดระบบหมุนเวียนเลือด
ระบบหมุนเวียนเลือดWan Ngamwongwan
 
ชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรอง
ชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรองชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรอง
ชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรองชลธิกาญจน์ จินาจันทร์
 
บทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิต
บทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิตบทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิต
บทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิตTeetut Tresirichod
 
ระบบของสัตว์
ระบบของสัตว์ระบบของสัตว์
ระบบของสัตว์พัน พัน
 
4สารบัญตารางวิจัย
4สารบัญตารางวิจัย4สารบัญตารางวิจัย
4สารบัญตารางวิจัยkrupornpana55
 
กิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะ
กิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะกิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะ
กิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะSilpakorn University
 
8ติวข้อสอบสสวทสารและแยกสาร
8ติวข้อสอบสสวทสารและแยกสาร8ติวข้อสอบสสวทสารและแยกสาร
8ติวข้อสอบสสวทสารและแยกสารWichai Likitponrak
 
บทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิต
บทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิตบทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิต
บทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิตTa Lattapol
 
หน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการ
หน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการหน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการ
หน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการWichai Likitponrak
 
Operating System Chapter 4
Operating System Chapter 4Operating System Chapter 4
Operating System Chapter 4Nuth Otanasap
 
อาณาจักรพืช
อาณาจักรพืชอาณาจักรพืช
อาณาจักรพืชMin Minho
 

Tendances (20)

11.ลม
11.ลม11.ลม
11.ลม
 
บทท 8 ระบบประสาท (1)
บทท   8 ระบบประสาท (1)บทท   8 ระบบประสาท (1)
บทท 8 ระบบประสาท (1)
 
Power Point
Power PointPower Point
Power Point
 
Best practice ครูยุภาพร ผลสว่าง
Best practice ครูยุภาพร ผลสว่างBest practice ครูยุภาพร ผลสว่าง
Best practice ครูยุภาพร ผลสว่าง
 
5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์
5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์
5.แหล่งน้ำgs ผิวดินบาดาลใช้ประโยชน์
 
Biology Lab: Plant DNA Extraction
Biology Lab:  Plant DNA ExtractionBiology Lab:  Plant DNA Extraction
Biology Lab: Plant DNA Extraction
 
การเคลื่อนที่ของคน
การเคลื่อนที่ของคนการเคลื่อนที่ของคน
การเคลื่อนที่ของคน
 
ระบบหมุนเวียนเลือด
ระบบหมุนเวียนเลือดระบบหมุนเวียนเลือด
ระบบหมุนเวียนเลือด
 
ชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรอง
ชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรองชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรอง
ชุดกิจกรรมการเรียนรู้ เรื่องการจำแนกสาร ชุดที่ 1 การแยกสารด้วยวิธีการกรอง
 
บทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิต
บทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิตบทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิต
บทที่ 5 การวางแผนความต้องการวัสดุและกำลังการผลิต
 
Nervous system
Nervous systemNervous system
Nervous system
 
ระบบของสัตว์
ระบบของสัตว์ระบบของสัตว์
ระบบของสัตว์
 
4สารบัญตารางวิจัย
4สารบัญตารางวิจัย4สารบัญตารางวิจัย
4สารบัญตารางวิจัย
 
กิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะ
กิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะกิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะ
กิจกรรม ออกแบบและสร้างอุปกรณ์รางรถไฟเหาะ
 
8ติวข้อสอบสสวทสารและแยกสาร
8ติวข้อสอบสสวทสารและแยกสาร8ติวข้อสอบสสวทสารและแยกสาร
8ติวข้อสอบสสวทสารและแยกสาร
 
บทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิต
บทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิตบทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิต
บทที่ 2 การเคลื่อนที่ของสิ่งมีชีวิต
 
พลังงานสะสมในตัวเก็บประจุ
พลังงานสะสมในตัวเก็บประจุพลังงานสะสมในตัวเก็บประจุ
พลังงานสะสมในตัวเก็บประจุ
 
หน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการ
หน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการหน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการ
หน่วยการเรียนรู้ที่ 4 เรื่อง วิวัฒนาการ
 
Operating System Chapter 4
Operating System Chapter 4Operating System Chapter 4
Operating System Chapter 4
 
อาณาจักรพืช
อาณาจักรพืชอาณาจักรพืช
อาณาจักรพืช
 

En vedette

Operating System Chapter 5
Operating System Chapter 5Operating System Chapter 5
Operating System Chapter 5Nuth Otanasap
 
Operating System Chapter 2
Operating System Chapter 2Operating System Chapter 2
Operating System Chapter 2Nuth Otanasap
 
Operating System Chapter 3
Operating System Chapter 3Operating System Chapter 3
Operating System Chapter 3Nuth Otanasap
 
Operating System Chapter 1
Operating System Chapter 1Operating System Chapter 1
Operating System Chapter 1Nuth Otanasap
 
กองทุนท่าจีน
กองทุนท่าจีนกองทุนท่าจีน
กองทุนท่าจีนNuth Otanasap
 
4 ca-process structure
4 ca-process structure4 ca-process structure
4 ca-process structurekrissapat
 
Adrenals and adrenal cancers
Adrenals and adrenal cancersAdrenals and adrenal cancers
Adrenals and adrenal cancersshankaruro84
 
CMS BlueButton On FHIR - HIMSS17 Update
CMS BlueButton On FHIR - HIMSS17 UpdateCMS BlueButton On FHIR - HIMSS17 Update
CMS BlueButton On FHIR - HIMSS17 UpdateMark Scrimshire
 
Anthony Gough, Developer
Anthony Gough, DeveloperAnthony Gough, Developer
Anthony Gough, DeveloperSmartNet
 
4 antijuridicidad
4 antijuridicidad4 antijuridicidad
4 antijuridicidadUGM NORTE
 
Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...
Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...
Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...SmartNet
 
RHBC Announcements 3/12
RHBC Announcements 3/12RHBC Announcements 3/12
RHBC Announcements 3/12rhbc
 
Los derechos de la mujer dominicana
Los derechos de la mujer dominicanaLos derechos de la mujer dominicana
Los derechos de la mujer dominicanamichell pozo
 
Proyecto Educativo de Centro 2016 17
Proyecto Educativo de Centro 2016 17Proyecto Educativo de Centro 2016 17
Proyecto Educativo de Centro 2016 17iessaavedra2011
 
Elaboración y formulación de monografías
Elaboración y formulación de monografíasElaboración y formulación de monografías
Elaboración y formulación de monografíasFernando Lugo Zanelli
 

En vedette (20)

Ch06th
Ch06thCh06th
Ch06th
 
Operating System Chapter 5
Operating System Chapter 5Operating System Chapter 5
Operating System Chapter 5
 
Operating System Chapter 2
Operating System Chapter 2Operating System Chapter 2
Operating System Chapter 2
 
Operating System Chapter 3
Operating System Chapter 3Operating System Chapter 3
Operating System Chapter 3
 
Operating System Chapter 1
Operating System Chapter 1Operating System Chapter 1
Operating System Chapter 1
 
Ch09th
Ch09thCh09th
Ch09th
 
กองทุนท่าจีน
กองทุนท่าจีนกองทุนท่าจีน
กองทุนท่าจีน
 
4 ca-process structure
4 ca-process structure4 ca-process structure
4 ca-process structure
 
Adrenals and adrenal cancers
Adrenals and adrenal cancersAdrenals and adrenal cancers
Adrenals and adrenal cancers
 
SW Resume
SW ResumeSW Resume
SW Resume
 
Złota Księga 2016
Złota Księga 2016Złota Księga 2016
Złota Księga 2016
 
CMS BlueButton On FHIR - HIMSS17 Update
CMS BlueButton On FHIR - HIMSS17 UpdateCMS BlueButton On FHIR - HIMSS17 Update
CMS BlueButton On FHIR - HIMSS17 Update
 
Anthony Gough, Developer
Anthony Gough, DeveloperAnthony Gough, Developer
Anthony Gough, Developer
 
4 antijuridicidad
4 antijuridicidad4 antijuridicidad
4 antijuridicidad
 
Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...
Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...
Nicole Lauenstein, Architect urban design & planning - presentation at Seismi...
 
RHBC Announcements 3/12
RHBC Announcements 3/12RHBC Announcements 3/12
RHBC Announcements 3/12
 
Los derechos de la mujer dominicana
Los derechos de la mujer dominicanaLos derechos de la mujer dominicana
Los derechos de la mujer dominicana
 
Mjedisi dhe njeriu
Mjedisi dhe njeriuMjedisi dhe njeriu
Mjedisi dhe njeriu
 
Proyecto Educativo de Centro 2016 17
Proyecto Educativo de Centro 2016 17Proyecto Educativo de Centro 2016 17
Proyecto Educativo de Centro 2016 17
 
Elaboración y formulación de monografías
Elaboración y formulación de monografíasElaboración y formulación de monografías
Elaboración y formulación de monografías
 

Plus de Nuth Otanasap

มาตรฐานผลการเรียนรู้
มาตรฐานผลการเรียนรู้มาตรฐานผลการเรียนรู้
มาตรฐานผลการเรียนรู้Nuth Otanasap
 
Ec2009 ch01 overview of electronic commerce
Ec2009 ch01 overview of electronic commerceEc2009 ch01 overview of electronic commerce
Ec2009 ch01 overview of electronic commerceNuth Otanasap
 
Ec2009 ch14 creating and launching
Ec2009 ch14 creating and launchingEc2009 ch14 creating and launching
Ec2009 ch14 creating and launchingNuth Otanasap
 
Ec2009 ch15 e commerce strategy
Ec2009 ch15 e commerce strategyEc2009 ch15 e commerce strategy
Ec2009 ch15 e commerce strategyNuth Otanasap
 
Ec2009 ch12 legal ethical and social
Ec2009 ch12 legal ethical and socialEc2009 ch12 legal ethical and social
Ec2009 ch12 legal ethical and socialNuth Otanasap
 
Ec2009 ch11 electronic payment systems
Ec2009 ch11 electronic payment systemsEc2009 ch11 electronic payment systems
Ec2009 ch11 electronic payment systemsNuth Otanasap
 
Ec2009 ch10 e commerce security
Ec2009 ch10 e commerce securityEc2009 ch10 e commerce security
Ec2009 ch10 e commerce securityNuth Otanasap
 

Plus de Nuth Otanasap (20)

มาตรฐานผลการเรียนรู้
มาตรฐานผลการเรียนรู้มาตรฐานผลการเรียนรู้
มาตรฐานผลการเรียนรู้
 
SA Chapter 14
SA Chapter 14SA Chapter 14
SA Chapter 14
 
SA Chapter 13
SA Chapter 13SA Chapter 13
SA Chapter 13
 
SA Chapter 12
SA Chapter 12SA Chapter 12
SA Chapter 12
 
SA Chapter 11
SA Chapter 11SA Chapter 11
SA Chapter 11
 
SA Chapter 10
SA Chapter 10SA Chapter 10
SA Chapter 10
 
SA Chapter 9
SA Chapter 9SA Chapter 9
SA Chapter 9
 
SA Chapter 8
SA Chapter 8SA Chapter 8
SA Chapter 8
 
SA Chapter 7
SA Chapter 7SA Chapter 7
SA Chapter 7
 
SA Chapter 6
SA Chapter 6SA Chapter 6
SA Chapter 6
 
SA Chapter 5
SA Chapter 5SA Chapter 5
SA Chapter 5
 
SA Chapter 4
SA Chapter 4SA Chapter 4
SA Chapter 4
 
SA Chapter 3
SA Chapter 3SA Chapter 3
SA Chapter 3
 
SA Chapter 2
SA Chapter 2SA Chapter 2
SA Chapter 2
 
Ec2009 ch01 overview of electronic commerce
Ec2009 ch01 overview of electronic commerceEc2009 ch01 overview of electronic commerce
Ec2009 ch01 overview of electronic commerce
 
Ec2009 ch14 creating and launching
Ec2009 ch14 creating and launchingEc2009 ch14 creating and launching
Ec2009 ch14 creating and launching
 
Ec2009 ch15 e commerce strategy
Ec2009 ch15 e commerce strategyEc2009 ch15 e commerce strategy
Ec2009 ch15 e commerce strategy
 
Ec2009 ch12 legal ethical and social
Ec2009 ch12 legal ethical and socialEc2009 ch12 legal ethical and social
Ec2009 ch12 legal ethical and social
 
Ec2009 ch11 electronic payment systems
Ec2009 ch11 electronic payment systemsEc2009 ch11 electronic payment systems
Ec2009 ch11 electronic payment systems
 
Ec2009 ch10 e commerce security
Ec2009 ch10 e commerce securityEc2009 ch10 e commerce security
Ec2009 ch10 e commerce security
 

Ch08th