Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2) 13 points. 1.5 point eachl 1. Assume you want to implement a web-server for YouTube by using multithreading, where each thread serves one incoming

image text in transcribed
Q2) 13 points. 1.5 point eachl 1. Assume you want to implement a web-server 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 user- level threads or kernel-level threads should be used? Why? 2. Now you want to implement a web-server for Facebook, to serve each user's "Home" page (the first page you see after you log in). This time your web-server needs to perform many tasks: load the news feeds from each of your friends, load the advertisement, check for new messages, etc. Now you want to implement your webserver by using multithreading, and have one thread to perform each of the tasks, and later these threads will cooperate with each other to collectively construct the "Home" page. For performance reasons, Facebook makes sure that all the data these threads need is already cached in the memory (so they don't have to perform any disk /O). Do you think user-level threads or kernel-level threads should be used? Why

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions