Question: Semaphore Implementation The following question does not need to be coded in any program and it is sufficient to write the program in word by
Semaphore Implementation
The following question does not need to be coded in any program and it is sufficient to write the program in word by creating its functionalities
- Suppose three processes of printing a file data are involving. Process A reads the relevant data from a disk and moves it to Buffer 1. Process B copies from Buffer 1 to Buffer 2 and the third process receives the relevant data from Buffer 2 and prints it. - Suppose all three processes are running on a single record (file) at the same time, both buffer capacities are one record. Write a program to coordinate three operations using semaphores. a) Multiprogramming - Define Sample processes - Number of processes and the time period that every process will need. These two parameters must be set by user after the program is run. You have one resource (e.g. cpu). - Consider binary semaphore - Queue management by RR (time slice=3)
b) Multiprocessing - Define Sample processes - Number of processes, the number of resources that each process will need, the period of time it will need every resource. These three parameters must be set by user after the program is run. - Consider countering semaphore - Use multithreading - Queues management by FIFO
Project: Semaphore Implementation . Multiprogramming Define Sample processes Number of processes and the time period that every process will need. These two parameters must be set by user after the program is run. You have one resource (e.g. cpu). Consider binary semaphore Queue management by RR (time slice=3) Multiprocessing Define Sample processes Number of processes, the number of resources that each process will need, the period of time it will need every resource. These three parameters must be set by user after the program is run. Consider countering semaphore Use multithreading Queues management by FIFO
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
