In this problem you are to compare reading a fi?le using asingle-threaded fi?le
ID: 3609397 • Letter: I
Question
In this problem you are to compare reading a fi?le using asingle-threadedfi?le server and a multithreaded server. It takes 15 msec to get arequest for
work, dispatch it, and do the rest of the necessary processing,assuming that
the data needed are in a cache in main memory. If a disk operationis needed,
as is the case one-third of the time, an additional 75 msec isrequired, during
which time the thread sleeps. How many requests/sec can the serverhandle if
it is single threaded? If it is multithreaded?
Explanation / Answer
Dear User, In the single-threaded case, the cache hits take 30 msec andcache misses take (15+75) 90 msec.The weighted average is 2/3*15+1/3*90=40. Thus the mean requesttakes 60 msec and the server can do 1000/40 per
second.
For a multithreaded server , all the waiting for the disk isoverlapped, so every request takes 15 msec, and the server can
handle 1000/15= 66.66 requests per second I hope this will helps toyou
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.