Question: Part 1. (24 points) Please mark each sentence with T (for TRUE) or F (for FALSE) or both, and give one sentence of justification below.
Part 1. (24 points) Please mark each sentence with T (for TRUE) or F (for FALSE) or both, and give one sentence of justification below. Accordingly, answer with A, B, C, D, E where applicable or answer with a brief description: (a) Spinlock is always less efficient than blocking operations because a thread spinning wastes unnecessary CPU cycles in its slated slice. (b) Test and Set is not a protected instruction (c) We are implementing a web-server via multi-threading. Each thread serves one incoming request by loading a video file from a disk by means of the conventional OS system calls. There may be thousand incoming requests and only limited threads to serve the requests. Do you think that user threads or kernel threads should be used? Why? If you think both, briefly discuss the reasons why both (pros and cons). (d) How does your answer change (if it needs to change) if you are now implementing a web-server for Twitter that performs various and multi-fledged tasks. It loads advertisements from followers, news, checks for new messages. Your web server again uses multi-threading to implement the above. Twitter has a very big storage capacity in all levels of hierarchy. How would you structure your multithreaded server now? (e) Lock/unlock synchronizations for kemel level threads are system calls (assume the lock unlock are implemented using test and set) 0 Which of the followings are true about thread yield0? (a) thread yield0 never retums (b) thread yield0 puts the calling thread to sleep (c) thread yield0 terminates the calling thread (d) None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
