SlideShare a Scribd company logo
a) use resources allocation graph to show that a deadlocl is a possibility in this system.
b)re order the various wait() and signal() calls to maintain the resource protection for the critical
sections while ensuring that deadlock will not occur.
2.2 Semaphore Contention (8 marks) Assume there are three processes running in a computer
system that has four available resources: a usb port, a scanner, a printer and a monitor. Each of
the resources is protected by a semaphore of the same name. The code of the three processes is
like this:

More Related Content

More from astraders2

a) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdf
a) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdfa) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdf
a) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdf
astraders2
 
a) How does PERT differ from CPM- b) The following table shows the nin.pdf
a) How does PERT differ from CPM- b) The following table shows the nin.pdfa) How does PERT differ from CPM- b) The following table shows the nin.pdf
a) How does PERT differ from CPM- b) The following table shows the nin.pdf
astraders2
 
a) Given the map above- construct a geological cross section for the m.pdf
a) Given the map above- construct a geological cross section for the m.pdfa) Given the map above- construct a geological cross section for the m.pdf
a) Given the map above- construct a geological cross section for the m.pdf
astraders2
 
a) Discuss three differences among the three types of journals- b) Why.pdf
a) Discuss three differences among the three types of journals- b) Why.pdfa) Discuss three differences among the three types of journals- b) Why.pdf
a) Discuss three differences among the three types of journals- b) Why.pdf
astraders2
 
A) Explain why the skin is called the cutaneous membrane (e-g- what is.pdf
A) Explain why the skin is called the cutaneous membrane (e-g- what is.pdfA) Explain why the skin is called the cutaneous membrane (e-g- what is.pdf
A) Explain why the skin is called the cutaneous membrane (e-g- what is.pdf
astraders2
 
a) Composte the coefficient of variation for each population- The conf.pdf
a) Composte the coefficient of variation for each population- The conf.pdfa) Composte the coefficient of variation for each population- The conf.pdf
a) Composte the coefficient of variation for each population- The conf.pdf
astraders2
 
A young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdf
A young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdfA young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdf
A young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdf
astraders2
 
A _________ is the term for microbial cells grown on a solid medium an.pdf
A _________ is the term for microbial cells grown on a solid medium an.pdfA _________ is the term for microbial cells grown on a solid medium an.pdf
A _________ is the term for microbial cells grown on a solid medium an.pdf
astraders2
 
A young couple- Eve and Steven- want to divide their main household ch.pdf
A young couple- Eve and Steven- want to divide their main household ch.pdfA young couple- Eve and Steven- want to divide their main household ch.pdf
A young couple- Eve and Steven- want to divide their main household ch.pdf
astraders2
 
A total of 5 CVD patients were followed up for death- The data is show.pdf
A total of 5 CVD patients were followed up for death- The data is show.pdfA total of 5 CVD patients were followed up for death- The data is show.pdf
A total of 5 CVD patients were followed up for death- The data is show.pdf
astraders2
 
A Wireshark trace of TCP traffic between hosts A and B indicated the f.pdf
A Wireshark trace of TCP traffic between hosts A and B indicated the f.pdfA Wireshark trace of TCP traffic between hosts A and B indicated the f.pdf
A Wireshark trace of TCP traffic between hosts A and B indicated the f.pdf
astraders2
 
A World Health Organization study (the MONICA project) of health in va.pdf
A World Health Organization study (the MONICA project) of health in va.pdfA World Health Organization study (the MONICA project) of health in va.pdf
A World Health Organization study (the MONICA project) of health in va.pdf
astraders2
 
A virus infects a host- Its RNA genome must be transcribed into a seco.pdf
A virus infects a host- Its RNA genome must be transcribed into a seco.pdfA virus infects a host- Its RNA genome must be transcribed into a seco.pdf
A virus infects a host- Its RNA genome must be transcribed into a seco.pdf
astraders2
 
A viral envelope is made from the previous host cell's A- plasma membr.pdf
A viral envelope is made from the previous host cell's A- plasma membr.pdfA viral envelope is made from the previous host cell's A- plasma membr.pdf
A viral envelope is made from the previous host cell's A- plasma membr.pdf
astraders2
 
A very aggressive CFO would finance Fixed Assets- Permanent Current As.pdf
A very aggressive CFO would finance Fixed Assets- Permanent Current As.pdfA very aggressive CFO would finance Fixed Assets- Permanent Current As.pdf
A very aggressive CFO would finance Fixed Assets- Permanent Current As.pdf
astraders2
 
A variety of cells respond to signals from their environment- For eac.pdf
A variety of cells respond to signals from their environment-  For eac.pdfA variety of cells respond to signals from their environment-  For eac.pdf
A variety of cells respond to signals from their environment- For eac.pdf
astraders2
 
A tree species grows in a savannah- The high wind makes some individua.pdf
A tree species grows in a savannah- The high wind makes some individua.pdfA tree species grows in a savannah- The high wind makes some individua.pdf
A tree species grows in a savannah- The high wind makes some individua.pdf
astraders2
 
A Travel insurance policy would apply to this claim only- (imark) a) T.pdf
A Travel insurance policy would apply to this claim only- (imark) a) T.pdfA Travel insurance policy would apply to this claim only- (imark) a) T.pdf
A Travel insurance policy would apply to this claim only- (imark) a) T.pdf
astraders2
 
A unique answer please- The outbreak of COVID-19 pandemic has been occ.pdf
A unique answer please- The outbreak of COVID-19 pandemic has been occ.pdfA unique answer please- The outbreak of COVID-19 pandemic has been occ.pdf
A unique answer please- The outbreak of COVID-19 pandemic has been occ.pdf
astraders2
 
A track team is participating in a race with 3 other teams- There are.pdf
A track team is participating in a race with 3 other teams- There are.pdfA track team is participating in a race with 3 other teams- There are.pdf
A track team is participating in a race with 3 other teams- There are.pdf
astraders2
 

More from astraders2 (20)

a) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdf
a) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdfa) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdf
a) Sketch the region corresponding to the statement P(z-2-4)- Shade- C.pdf
 
a) How does PERT differ from CPM- b) The following table shows the nin.pdf
a) How does PERT differ from CPM- b) The following table shows the nin.pdfa) How does PERT differ from CPM- b) The following table shows the nin.pdf
a) How does PERT differ from CPM- b) The following table shows the nin.pdf
 
a) Given the map above- construct a geological cross section for the m.pdf
a) Given the map above- construct a geological cross section for the m.pdfa) Given the map above- construct a geological cross section for the m.pdf
a) Given the map above- construct a geological cross section for the m.pdf
 
a) Discuss three differences among the three types of journals- b) Why.pdf
a) Discuss three differences among the three types of journals- b) Why.pdfa) Discuss three differences among the three types of journals- b) Why.pdf
a) Discuss three differences among the three types of journals- b) Why.pdf
 
A) Explain why the skin is called the cutaneous membrane (e-g- what is.pdf
A) Explain why the skin is called the cutaneous membrane (e-g- what is.pdfA) Explain why the skin is called the cutaneous membrane (e-g- what is.pdf
A) Explain why the skin is called the cutaneous membrane (e-g- what is.pdf
 
a) Composte the coefficient of variation for each population- The conf.pdf
a) Composte the coefficient of variation for each population- The conf.pdfa) Composte the coefficient of variation for each population- The conf.pdf
a) Composte the coefficient of variation for each population- The conf.pdf
 
A young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdf
A young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdfA young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdf
A young oodple deades an ty as hore dailens seel ther ham a bor For fi.pdf
 
A _________ is the term for microbial cells grown on a solid medium an.pdf
A _________ is the term for microbial cells grown on a solid medium an.pdfA _________ is the term for microbial cells grown on a solid medium an.pdf
A _________ is the term for microbial cells grown on a solid medium an.pdf
 
A young couple- Eve and Steven- want to divide their main household ch.pdf
A young couple- Eve and Steven- want to divide their main household ch.pdfA young couple- Eve and Steven- want to divide their main household ch.pdf
A young couple- Eve and Steven- want to divide their main household ch.pdf
 
A total of 5 CVD patients were followed up for death- The data is show.pdf
A total of 5 CVD patients were followed up for death- The data is show.pdfA total of 5 CVD patients were followed up for death- The data is show.pdf
A total of 5 CVD patients were followed up for death- The data is show.pdf
 
A Wireshark trace of TCP traffic between hosts A and B indicated the f.pdf
A Wireshark trace of TCP traffic between hosts A and B indicated the f.pdfA Wireshark trace of TCP traffic between hosts A and B indicated the f.pdf
A Wireshark trace of TCP traffic between hosts A and B indicated the f.pdf
 
A World Health Organization study (the MONICA project) of health in va.pdf
A World Health Organization study (the MONICA project) of health in va.pdfA World Health Organization study (the MONICA project) of health in va.pdf
A World Health Organization study (the MONICA project) of health in va.pdf
 
A virus infects a host- Its RNA genome must be transcribed into a seco.pdf
A virus infects a host- Its RNA genome must be transcribed into a seco.pdfA virus infects a host- Its RNA genome must be transcribed into a seco.pdf
A virus infects a host- Its RNA genome must be transcribed into a seco.pdf
 
A viral envelope is made from the previous host cell's A- plasma membr.pdf
A viral envelope is made from the previous host cell's A- plasma membr.pdfA viral envelope is made from the previous host cell's A- plasma membr.pdf
A viral envelope is made from the previous host cell's A- plasma membr.pdf
 
A very aggressive CFO would finance Fixed Assets- Permanent Current As.pdf
A very aggressive CFO would finance Fixed Assets- Permanent Current As.pdfA very aggressive CFO would finance Fixed Assets- Permanent Current As.pdf
A very aggressive CFO would finance Fixed Assets- Permanent Current As.pdf
 
A variety of cells respond to signals from their environment- For eac.pdf
A variety of cells respond to signals from their environment-  For eac.pdfA variety of cells respond to signals from their environment-  For eac.pdf
A variety of cells respond to signals from their environment- For eac.pdf
 
A tree species grows in a savannah- The high wind makes some individua.pdf
A tree species grows in a savannah- The high wind makes some individua.pdfA tree species grows in a savannah- The high wind makes some individua.pdf
A tree species grows in a savannah- The high wind makes some individua.pdf
 
A Travel insurance policy would apply to this claim only- (imark) a) T.pdf
A Travel insurance policy would apply to this claim only- (imark) a) T.pdfA Travel insurance policy would apply to this claim only- (imark) a) T.pdf
A Travel insurance policy would apply to this claim only- (imark) a) T.pdf
 
A unique answer please- The outbreak of COVID-19 pandemic has been occ.pdf
A unique answer please- The outbreak of COVID-19 pandemic has been occ.pdfA unique answer please- The outbreak of COVID-19 pandemic has been occ.pdf
A unique answer please- The outbreak of COVID-19 pandemic has been occ.pdf
 
A track team is participating in a race with 3 other teams- There are.pdf
A track team is participating in a race with 3 other teams- There are.pdfA track team is participating in a race with 3 other teams- There are.pdf
A track team is participating in a race with 3 other teams- There are.pdf
 

Recently uploaded

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 

Recently uploaded (20)

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 

a) use resources allocation graph to show that a deadlocl is a possibi.pdf

  • 1. a) use resources allocation graph to show that a deadlocl is a possibility in this system. b)re order the various wait() and signal() calls to maintain the resource protection for the critical sections while ensuring that deadlock will not occur. 2.2 Semaphore Contention (8 marks) Assume there are three processes running in a computer system that has four available resources: a usb port, a scanner, a printer and a monitor. Each of the resources is protected by a semaphore of the same name. The code of the three processes is like this: