hw1sol - Homework 1 From the textbook questions:...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Homework 1 From the textbook questions: 7,8,10,11,12,13,14,17 on page 170. On question 11, the author is talking about User-level threads. (1) #7) This problem will not occur in a single-threaded process. If the single thread is blocked, waiting for keyboard input, then it can not fork. (2) #8) The fact that blocking-system calls are required means that if user-threads are used as soon as a single worker-thread goes to fetch a request, the entire web-server will be blocked, destroying the advantage of having multiple threads. Kernel threads will allow the blocking system call (I/O) to be overlapped with CPU (other threads). (3) #10) When threads are removed from the CPU (blocked, pre-empted etc.) the current state of the registers need to be remembered so that when the thread (or process) is resumed on the CPU the thread can start where it left off. (4) #11) Threads within the same process are meant to cooperate, this may mean yielding at certain times. (5) #12) User-level threads cannot be preempted by the clock unless the whole process quantum has been used up, in which case the kernel will run some other process or thread from a different process. Kernel-level threads can be preempted individually.the kernel will run some other process or thread from a different process....
View Full Document

This note was uploaded on 04/02/2012 for the course CIS 486 taught by Professor Mcsweeney during the Spring '10 term at Syracuse.

Page1 / 5

hw1sol - Homework 1 From the textbook questions:...

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