shows a proposed implementation of a Rate Limiter class, which runs jobs but limits the “weight” of the jobs started per minute using a quota, which is increased to LIMIT every minute by a separate...


shows a proposed implementation of a Rate Limiter class, which runs jobs but limits the “weight” of the jobs started per minute using a quota, which is increased to LIMIT every minute by a separate thread. We want to guarantee that jobs will run promptly if there is enough quota. You may assume a fast processor and fair scheduler, so that the Rate Limiter reaches a quiescent state (all jobs are sleeping in a wait()or running), if possible, before each call to increase Quota().


a. Describe the distributions of weight values (0≤ weight ≤ LIMIT) under which this implementation works or fails and explain why.


b. Fix this implementation so it allows jobs to have any weight value from 0 to LIMIT, and describe how it may impact performance.




Jan 15, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here