Question: (12 marks). You are writing an application using an operating system designed by a fool. The problem with the operating system is that the Sleep)

 (12 marks). You are writing an application using an operating system

(12 marks). You are writing an application using an operating system designed by a fool. The problem with the operating system is that the Sleep) call is not accessible to application programs, it is only available to special system processes (Sleep(N) suspends execution of the calling process for N seconds). The application you are writing requires this call, but cannot run as a system process You therefore, in a fit of brilliance, decide to write a sleep server. The sleep server will accept sleep requests from clients and suspend the client's execution for the desired duration. This server (and its workers, if any) are system processes and therefore have access to the builtin Sleep() call Notes you must write the stub routine MySleep(int seconds), the server and any workers your server must be able to handle new requests while acting on previous ones . if you use the administrator model, you must NOT create a worker process every time MySleep() is called. You may only create one if your existing workers are all occupied assume pthreads-like IPC and process management primitives, and list primitives (if needed) please use C-like pseudo-code (12 marks). You are writing an application using an operating system designed by a fool. The problem with the operating system is that the Sleep) call is not accessible to application programs, it is only available to special system processes (Sleep(N) suspends execution of the calling process for N seconds). The application you are writing requires this call, but cannot run as a system process You therefore, in a fit of brilliance, decide to write a sleep server. The sleep server will accept sleep requests from clients and suspend the client's execution for the desired duration. This server (and its workers, if any) are system processes and therefore have access to the builtin Sleep() call Notes you must write the stub routine MySleep(int seconds), the server and any workers your server must be able to handle new requests while acting on previous ones . if you use the administrator model, you must NOT create a worker process every time MySleep() is called. You may only create one if your existing workers are all occupied assume pthreads-like IPC and process management primitives, and list primitives (if needed) please use C-like pseudo-code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!