Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please fast because i need answer before 16:00 QUESTION 3 A deadlock is a situation in which two computer programs sharing the same resource are
Please fast because i need answer before 16:00
QUESTION 3
A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.
- A system has 32MB of user memory and a disk, CD-ROM and a line printer attached to it. Two processes A and B, with the size of 8MB and12MB are currently in the memory. Process A requests and gets the CD-ROM. It is currently writing something to the device. Process B also requests for the CD-ROM.
- Explain the characteristics of pre-emptable and non-pre-emptable resources.
(2 marks)
- Identify pre-emptable resources and non-pre-emptable resources from the description given above.
(2 marks)
- Discuss whether or not CD-ROM can be allocated to Process B before Process A finishes their task.
(4 marks)
- Two processes P1 and P2 needs to read and update data on a tape file and print the result on a printer.
- Explain the steps showing how deadlock might occur in the above scenario.
(2 marks)
- Draw a resource allocation graph to support your explanation.
(2 marks)
- A computer has three USB drives and three processes. Each of the three processes able to hold one of the USB drives. Explain the steps showing how to avoid deadlock to take place in the above scenario.
(4 marks)
- Describe the fate of the victim in deadlock resolution and the actions required in order to complete the victims tasks.
(4 marks)
(Total: 20 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started