Answered step by step
Verified Expert Solution
Link Copied!

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.

  1. 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.

  1. Explain the characteristics of pre-emptable and non-pre-emptable resources.

(2 marks)

  1. Identify pre-emptable resources and non-pre-emptable resources from the description given above.

(2 marks)

  1. Discuss whether or not CD-ROM can be allocated to Process B before Process A finishes their task.

(4 marks)

  1. Two processes P1 and P2 needs to read and update data on a tape file and print the result on a printer.

  1. Explain the steps showing how deadlock might occur in the above scenario.

(2 marks)

  1. Draw a resource allocation graph to support your explanation.

(2 marks)

  1. 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)

  1. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions