hw2-sol - CSE 120: Homework #2 Fall 2011 For the homework...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 120: Homework #2 Fall 2011 For the homework questions below, if you believe that you cannot answer a question without making some assumptions, state those assumptions in your answer. 1. Explain the trade-offs between using multiple processes and using multiple threads A: Consider a multi-process web server application (like from lecture). Every request creates a new process. This means a new PCB, stack, page table, etc. Then the OS must schedule this new process before it can service the request. This involves a context switch. No contrast that with the same web server written as a multi-threaded application. Now just a TCB needs to be created, a portion of the existing process’ stack is used as the thread’s stack, no new page table. Further, the process has control over which thread to run, and can switch to the most appropriate without a context switch. However, the main drawback to the multi-threaded version is that the OS doesn’t know about all these threads and will not give the web server more CPU time. 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/18/2012 for the course INFORMATIK 2011 taught by Professor Phanthuongcang during the Winter '11 term at Cornell University (Engineering School).

Page1 / 3

hw2-sol - CSE 120: Homework #2 Fall 2011 For the homework...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online