Code for producer-consumer problem


Q1. Supposing a cluster size of 512 bytes, compute the percentage in file space due to incomplete filling of last clusters, for the file sizes:

a) 1200 bytes
b) 20,000 bytes

Q2. A CPU scheduling algorithm finds out an order for the execution of its scheduled processes. The n processes to be scheduled on one processor is given, describe the various possible schedules are there? Write down a formula in terms of n.

Q3. Illustrate the concept of virtual memory system with an illustration? Is it possible to implement it by using segmentation? Describe how?

Q4. At some point in time, the given holes (in order) are made by a variable partition memory. 20K, 15K, 40K, 60K, 10K, 25K. For a new process of 25 K, name the hole would be filled by using best fit, first fit, and worst fit?

Q5. What do you mean by Semaphore? Write down the code for Producer-Consumer problem by using Semaphore. 

Request for Solution File

Ask an Expert for Answer!!
Operating System: Code for producer-consumer problem
Reference No:- TGS011945

Expected delivery within 24 Hours