Prev | Current Page 513 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"


6.6 What advantage do kernel threads provide over user threads? Give an example of a user thread package.
A major advantage of kernel threads is that when a kernel thread blocks for I/O, other threads
continue to execute. This is because a kernel thread is visible to the operating system, and each
thread can separately scheduled. User threads, on the other hand, are not visible to the OS.
With a user thread package, the process is the only entity of which the operating system is aware.
POSIX is a user thread package, although some operating systems (e.g., Solaris) implement the
POSIX interface using calls to the kernel threads offered by the operating system.
6.7 When a process is multithreaded, which of these resources are shared among the threads, and which are
private to each thread?
Memory
shared between threads
Program counter
private to each thread
Global variables
shared among all threads
Open files
shared among all threads
Register contents
private to each thread
Stack/local /automatic variables
private to each thread
6.8 List four events that transfer control to the operating system in privileged mode.
I/O interrupt
System clock interrupt
Process makes a system call (e.g., read, write, file open, etc.


Pages:
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525
Namioty Mazury i interesująca cena Szkoły policealne fryzjer w warszawie need cash fast bad credit perfumy fm świnoujście noclegi