Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Multiples answers are allowed Assume you want to implement a web - server for YouTube by using multithreading, where each thread serves one incoming request
Multiples answers are allowed
Assume you want to implement a webserver for YouTube by using multithreading, where each thread serves one incoming request by loading a video file from the disk. Assume the OS
only provides the normal blocking read system call for disk reads, do you think ULTs or KLTs should be used?
Select the statements that are properly matched to achieve this goal.
In this case, it is recommended to use ULTs for its efficiency as one thread can block all other threads within the same process.
It is better to use KLT because one thread won't block others.
It is recommended to use KLT because each thread will make blocking IO calls.
Using ULT, one thread will block all other threads which is suitable for operations.
In this case, using KLTs which is more expensive, is not a matter as everytime such communication needs anyway to go through the kernel.
In this particular case, it is beneficial to implement ULTs since these threads need to communicate frequently with each other.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started