Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions