📝 Proportional Share Scheduling in Real Time CPU Scheduling (46 MCQs)
📖 From Operating System • 6. CPU Scheduling • 46 questions available
What is Proportional Share Scheduling in Real Time CPU Scheduling?
Definition:
Proportional share scheduling allocates CPU time proportionally to weights such that process receives fraction of CPU bandwidth over interval .
Example:
Video decoder (weight=3) and audio mixer (weight=1) receive 75% and 25% of CPU time respectively, maintaining synchronized playback rates.
Reason:
This approach provides predictable resource isolation for soft real-time multimedia applications where exact deadlines are less critical than consistent throughput ratios and smooth quality degradation.
📝 All Proportional Share Scheduling in Real Time CPU Scheduling MCQs
Q1. What is the primary mechanism used by proportional share schedulers to allocate CPU time?
📖 Explanation: Proportional share schedulers operate by dividing a total number of shares (T) among applications. Each application receives a number of shares (N), which determines its proportion of the total processor time. This is the fundamental mechanism of this scheduling approach.
Q2. In a proportional share scheduler with T total shares, what fraction of CPU time does an application with N shares receive?
📖 Explanation: The fraction of CPU time an application receives is the ratio of its allocated shares (N) to the total number of shares (T). This is the core mathematical relationship in proportional share scheduling: the application gets N/T of the total processor time.
Q3. In a system with T=100 shares, process A receives 50 shares. What percentage of the CPU will process A receive?
📖 Explanation: With T=100 shares and process A receiving 50 shares, its CPU allocation is 50/100 = 0.50, or 50% of the processor time. This is a direct application of the N/T formula for proportional share scheduling.
Q4. Which component must work in conjunction with a proportional share scheduler to guarantee an application receives its allocated shares?
📖 Explanation: Proportional share schedulers must work with an admission-control policy to guarantee allocations. The admission control ensures that the total requested shares do not exceed the total available shares, preventing overallocation and guaranteeing that each admitted application receives its promised CPU time.
Q5. What is the role of an admission-control policy in proportional share scheduling?
📖 Explanation: The admission-control policy is responsible for deciding whether a new process can be admitted to the system. It admits a client requesting a particular number of shares only if sufficient shares are available, ensuring that the total allocated shares never exceed the total shares T.
Q6. In the example with T=100 shares, if A=50, B=15, and C=20 shares are allocated, what is the total number of shares allocated?
📖 Explanation: The total allocated shares are the sum of individual allocations: 50 + 15 + 20 = 85 shares. This represents the portion of the total 100 shares that have been assigned to processes. The remaining 15 shares are unallocated and available for new processes.
Q7. In the example with T=100 shares, A=50, B=15, and C=20, how many shares remain unallocated?
📖 Explanation: With a total of 100 shares and 85 shares already allocated (50+15+20), the remaining unallocated shares are 100 - 85 = 15 shares. These are the shares that are still available for allocation to new processes that may request them.
Q8. In the example with T=100 shares, if A=50, B=15, and C=20 shares are allocated, and process D requests 30 shares, what will the admission controller do?
📖 Explanation: The admission controller would deny D entry because only 15 shares remain unallocated (100 - 85 = 15), and D requires 30 shares. The admission control policy ensures that shares are not overallocated, so D's request must be rejected.
Q9. In proportional share scheduling, what is the significance of total shares T?
📖 Explanation: T represents the total number of shares available, which corresponds to the entire CPU capacity. These shares are divided among applications, with each share representing a portion of the total processor time. The sum of all allocated shares cannot exceed T.
Q10. What happens when a new process requests shares that exceed the available unallocated shares?
📖 Explanation: When a process requests more shares than are available, the admission-control policy denies the process entry. This prevents overallocation and ensures that all admitted processes receive their guaranteed share of CPU time, maintaining the system's predictability and fairness.
Q11. If T=200 shares, process P1 receives 80 shares, process P2 receives 60 shares, and process P3 receives 30 shares, what percentage of CPU time does P2 receive?
📖 Explanation: Process P2 receives 60 shares out of a total of 200 shares. Its CPU allocation is 60/200 = 0.30, or 30% of the processor time. This is a direct application of the proportional share calculation formula.
Q12. If T=150 shares, process X receives 45 shares, and process Y receives 60 shares, what percentage of CPU time does process X receive?
📖 Explanation: Process X receives 45 shares out of 150 total shares. The fraction is 45/150 = 0.30, which equals 30% of the CPU time. This demonstrates how the N/T formula is used to calculate the guaranteed CPU allocation for each process.
Q13. In a system with T=100 shares, process A receives 50 shares, B receives 15 shares, and C receives 20 shares. What is the total CPU utilization of these three processes?
📖 Explanation: The total CPU utilization is the sum of the individual allocations: 50/100 + 15/100 + 20/100 = 0.50 + 0.15 + 0.20 = 0.85, or 85%. This represents the portion of the total CPU capacity that is guaranteed to these three processes.
Q14. A proportional share scheduler has T=120 shares. Process P1 requires 40% of the CPU. How many shares should P1 receive?
📖 Explanation: To receive 40% of the CPU with T=120 shares, process P1 needs 40% of 120 shares, which is 0.40 * 120 = 48 shares. This is the number of shares that corresponds to the desired 40% CPU allocation.
Q15. If process A receives 30 shares out of a total of T=120 shares, what percentage of the CPU will process A receive?
📖 Explanation: Process A's CPU allocation is 30/120 = 0.25, or 25% of the processor time. This calculation demonstrates how the N/T ratio directly translates into a guaranteed percentage of CPU time for each process.
Q16. A system has T=80 shares. Process P1 receives 20 shares, P2 receives 30 shares, and P3 requests 35 shares. Will the admission controller admit P3?
📖 Explanation: The total allocated shares are 20 + 30 = 50 shares. The remaining available shares are 80 - 50 = 30 shares. Since P3 requests 35 shares, which exceeds the available 30 shares, the admission controller will deny P3 entry to the system.
Q17. What is the purpose of an admission controller in a proportional share scheduling system?
📖 Explanation: The admission controller's purpose is to prevent overallocation. It ensures that the sum of shares requested by all admitted processes never exceeds the total number of shares T. This guarantees that each admitted process can receive its promised share of CPU time.
Q18. In the example with T=100 shares, if A=50, B=15, and C=20 shares are allocated, and process D requests 15 shares, what will the admission controller do?
📖 Explanation: The admission controller would admit D because 15 shares are available (100 - 85 = 15). D's request exactly matches the available shares, so the total would become 100 shares, representing 100% CPU utilization. The admission controller allows this since it does not exceed the total.
Q19. What is the key requirement for proportional share schedulers to guarantee CPU allocations?
📖 Explanation: The key requirement is the integration with an admission-control policy. This policy prevents the system from accepting more processes than it can support, ensuring that all admitted processes receive their guaranteed share of CPU time. Without admission control, guarantees could not be made.
Q20. A proportional share system has T=200 shares. Processes P1, P2, and P3 have been allocated 80, 60, and 40 shares respectively. A new process P4 requests 30 shares. What is the result?
📖 Explanation: The total allocated shares are 80 + 60 + 40 = 180 shares. The remaining available shares are 200 - 180 = 20 shares. Since P4 requests 30 shares, which exceeds the available 20 shares, the admission controller will deny P4 entry to maintain the guarantee for existing processes.
Q21. A process is allocated 40 shares out of a total of T=160 shares. What percentage of the CPU will it receive?
📖 Explanation: The process will receive 40/160 = 0.25, or 25% of the CPU time. This is a direct application of the proportional share calculation where the fraction of CPU time is determined by the ratio of allocated shares to total shares.
Q22. What is the relationship between the total shares T and the number of processes in a proportional share system?
📖 Explanation: T is typically much larger than the number of processes to allow fine-grained allocation of CPU time. For example, T=100 with three processes allows allocations like 50, 15, and 20 shares, providing granularity that would be impossible if T equaled the number of processes.
Q23. What happens to the CPU allocation of existing processes when a new process is admitted in a proportional share system?
📖 Explanation: When a new process is admitted, the allocations of existing processes remain unchanged as long as the total allocated shares do not exceed T. The new process receives its share from the remaining unallocated shares. This ensures that the guarantees made to existing processes are maintained.
Q24. If a system has T=100 shares and three processes receive 40, 25, and 20 shares respectively, what is the total CPU utilization?
📖 Explanation: The total CPU utilization is the sum of the allocations: (40/100) + (25/100) + (20/100) = 0.40 + 0.25 + 0.20 = 0.85, or 85%. This represents the portion of the CPU that is reserved for these three processes.
Q25. What is the key difference between proportional share scheduling and priority-based scheduling?
📖 Explanation: The key difference is the guarantee. Proportional share scheduling guarantees that a process will receive a specific fraction (N/T) of the CPU time, provided it is admitted. Priority-based scheduling only ensures that higher-priority processes run before lower-priority ones but does not provide a specific guarantee of CPU time.
Q26. In a proportional share system, if process A receives 60 shares and process B receives 20 shares out of T=120 shares, what is the ratio of CPU time between A and B?
📖 Explanation: The ratio of CPU time between A and B is the ratio of their shares: 60:20, which simplifies to 3:1. This means A receives three times as much CPU time as B, which is a direct consequence of the proportional share allocation.
Q27. What is the purpose of having a large total number of shares T in a proportional share scheduler?
📖 Explanation: A large T allows for fine-grained allocation. For example, with T=100, an application can receive 5% of the CPU (5 shares). With T=1000, it could receive 5.5% (55 shares). This granularity allows more precise control over CPU allocations, especially when many processes are present.
Q28. A proportional share scheduler has T=80 shares. Process P1 has 20 shares, P2 has 30 shares, and P3 has 15 shares. How many shares are available for new processes?
📖 Explanation: The total allocated shares are 20 + 30 + 15 = 65 shares. The available shares are 80 - 65 = 15 shares. These 15 shares represent the remaining CPU capacity that can be allocated to new processes that may request admission.
Q29. If a process requests 25 shares in a system with T=100 shares and currently has 60 shares allocated to other processes, what is the outcome?
📖 Explanation: The total allocated shares are 60. The available shares are 100 - 60 = 40 shares. Since the process requests 25 shares, which is less than the available 40 shares, the process would be admitted. If it requested more than 40 shares, it would be denied.
Q30. What is the fundamental advantage of proportional share scheduling over round-robin scheduling?
📖 Explanation: The fundamental advantage is the guarantee. Round-robin provides equal time slices to all processes but does not guarantee a specific fraction of CPU time over the long term, especially under varying system loads. Proportional share guarantees a specific fraction (N/T) of CPU time to each admitted process.
Q31. In a proportional share system with T=200 shares, process P1 receives 80 shares, P2 receives 60 shares, and P3 receives 30 shares. What is the total CPU utilization?
📖 Explanation: The total utilization is (80/200) + (60/200) + (30/200) = 0.40 + 0.30 + 0.15 = 0.85, or 85%. This represents the portion of the CPU that is reserved for these three processes, leaving 15% of the CPU capacity unallocated.
Q32. Why is an admission-control policy necessary for proportional share scheduling?
📖 Explanation: The admission-control policy is necessary to prevent overallocation. Without it, the system could admit more processes than it has shares to allocate, making it impossible to guarantee each process's promised CPU time. The admission controller ensures the system remains schedulable.
Q33. What is the significance of the unallocated shares in a proportional share system?
📖 Explanation: The unallocated shares represent CPU capacity that is not reserved for any specific process. This capacity can be used by best-effort processes or new processes that request admission. It also provides a buffer that allows the system to maintain its guarantees even under varying conditions.
Q34. If process A receives 35 shares out of T=140 shares, what percentage of the CPU does it receive?
📖 Explanation: Process A receives 35/140 = 0.25, or 25% of the CPU time. This is a direct application of the proportional share calculation, demonstrating how the share allocation translates into a guaranteed percentage of CPU time.
Q35. What happens when a process requests shares that are exactly equal to the available unallocated shares?
📖 Explanation: When a process requests shares that exactly match the available unallocated shares, the admission controller admits the process. This results in 100% of the shares being allocated, meaning all CPU capacity is reserved for admitted processes, leaving no unused capacity.
Q36. In a proportional share system, what is the CPU allocation for a process that receives N shares out of T total shares?
📖 Explanation: The CPU allocation is (N/T) * 100% of the processor time. This is the fundamental formula of proportional share scheduling, where the fraction of CPU time is directly proportional to the number of shares allocated to the process.
Q37. A system has T=100 shares. Process A receives 45 shares, Process B receives 25 shares, and Process C receives 20 shares. A new process D requests 15 shares. Will the admission controller admit D?
📖 Explanation: The total allocated shares are 45 + 25 + 20 = 90 shares. The available shares are 100 - 90 = 10 shares. Since Process D requests 15 shares, which exceeds the available 10 shares, the admission controller will deny D entry to prevent overallocation.
Q38. What is the purpose of the admission-control policy in relation to the total shares T?
📖 Explanation: The admission-control policy ensures that the sum of shares allocated to all admitted processes never exceeds the total number of shares T. This is the fundamental constraint that allows the system to guarantee each process its promised share of CPU time.
Q39. If a process receives 25% of the CPU in a system with T=200 shares, how many shares does it have?
📖 Explanation: To receive 25% of the CPU with T=200 shares, the process needs 25% of 200 shares, which is 0.25 * 200 = 50 shares. This calculation demonstrates how to convert a percentage requirement into the corresponding number of shares.
Q40. What is the relationship between a process's shares and its CPU time in proportional share scheduling?
📖 Explanation: The relationship is directly proportional. A process with more shares receives a correspondingly larger fraction of the CPU time. This is the fundamental principle of proportional share scheduling: the CPU time allocation is directly proportional to the number of shares assigned to the process.
Q41. In the example with T=100 shares, why does process A receive 50% of the CPU?
📖 Explanation: Process A receives 50% of the CPU because it has 50 shares out of the total 100 shares (N/T = 50/100 = 0.50). This is a direct application of the proportional share allocation principle, where the fraction of CPU time is determined by the share allocation.
Q42. What is the purpose of the admission-control policy in proportional share scheduling?
📖 Explanation: The purpose of the admission-control policy is to prevent the system from exceeding its capacity. By ensuring that the total allocated shares never exceed T, the policy guarantees that each admitted process can receive its promised share of CPU time, maintaining system stability and predictability.
Q43. A system has T=60 shares. Process P1 receives 20 shares, P2 receives 15 shares, and P3 requests 25 shares. Will the admission controller admit P3?
📖 Explanation: The total allocated shares are 20 + 15 = 35 shares. The available shares are 60 - 35 = 25 shares. Since P3 requests exactly 25 shares, which matches the available shares, the admission controller will admit P3, resulting in 100% utilization of the shares.
Q44. What is the key advantage of proportional share scheduling for applications with different resource requirements?
📖 Explanation: The key advantage is the ability to provide guaranteed fractions of CPU time to different applications. This is particularly useful when applications have different resource requirements, as each can be allocated a specific share that matches its needs, ensuring fairness and predictability.
Q45. If T=100 shares and process A receives 60 shares, B receives 25 shares, and C receives 10 shares, what is the total CPU allocation?
📖 Explanation: The total CPU allocation is (60/100) + (25/100) + (10/100) = 0.60 + 0.25 + 0.10 = 0.95, or 95%. This means 95% of the CPU capacity is reserved for these three processes, leaving 5% unallocated for potential future processes.
Q46. What is the fundamental characteristic of proportional share scheduling?
📖 Explanation: The fundamental characteristic is the guarantee of a specific fraction of CPU time. Each process is allocated a number of shares, and the ratio of its shares to the total shares determines its guaranteed CPU allocation. This is the defining feature of proportional share scheduling.