(10 points) Consider the reader-writer problem. The following are two potential solution to the problem .Neither of them work. Explain why.
a.Writer code the same as slide 71 of synchronization, reader code as follows:
Reader code the same as slide 71 of synchronization, writer code as follows
5. (16 points) Consider deadlock avoidance with single resources. Assuming we have 4 process P1,P2, P3, P4. and 4 resources r1, r2, r3, r4. Consider all| 4 processes are writers (i.e. no resource scan be shared among processes). Suppose the processes are to acquire and release the release the resources in the following order (and assume the OS has the complete knowledge of the schedule beforehand) – we only show the first 8 requests.
We also assume the following:
if a request is denied, the process immediately quits and release all resources it is holding/waiting (if any).
all waiting queues for each resources are FIFO
if a process have to wait for a resource (if another process is holding it), the avoidance algorithm can still grant the request and allow that process to wait
a.Draw the resource allocation graph before the first request is made
b. Will the third request (P3 request r3) be granted? Explain your answer using the resource allocation graph.
c. Is there any request after that one that will be denied? If so, show the first request that will be denied and explain why using the resource allocation graph. If not, show the request allocation graph at the of the 8-th request.
This question is about space allocation method for files on a magnetic hard drive.
a. Contiguous allocation is a way of allocate blocks to files. However, it can suffer from over or under estimation. Describe one problem that each will cause.
. Another way of allocation is to used linked blocks. The slides suggest using FAT (file allocation table) to improve the performance. How can FAT improve the performance?
Consider using an SSD for storing student records
a. Explain why updating student records can potentially take significant more time than adding new student records.
b. All operating systems have buffers that store data to be written to the disk until a page of data is filled before writing to the disk (or until the OS explicitly force the buffer to be written). Name two reasons why using buffers are crucial in the case when appending new student records to the file.
Kindly submit your queries
we will make sure available to you as soon as possible.
Search Other Question
Getting answers to your urgent problems is simple. Submit your query in the given box and get answers Instantly.