Ch. 4 PPT Flashcards
What is a unit of dispaching?
Thread/lightweight process
Unit of resource ownership
Process/task
What is multithreading?
The ability of an OS to support multiple, concurrent paths of execution within a single process
What is the single threaded approach?
There is a single thread of execution per process. Really, the concept of a thread is not recognized.
What is the multithreaded approach?
A process that spawns multiple threads, like the JRE
Where is the process image stored?
The virtual address space
What does a process have protected access to?
Processors, other processes, files, and I/O resources
What are some benefits of threads?
Takes less time than making/terminating a process, faster switching between threads, increases efficency/communication between programs
In a single-user system, what are threads good for?
Asynchronous processing, faster execution, and modular programs
Where is execution information stored?
In a thread-level data structure.
What happensto threads if a process is suspended/terminated?
All threads are suspended or terminated for that process
What are the key thread states?
Running, ready, and blocked
What are the thread change states?
Spawn, block, unblock, finish
How are threads synchronized?
All threads of a process share an address space/resources/ If a resource is altered, it affects all threads in the process
How are user level threads handled?
Managed by application, and many-to-one mappings
What are the advantages of user level threads?
Thread switching does not require kernel priveleges, scheduling can be application specific, and can be run on any OS
What is bad about a ULT?
Any system calls are blocking, effecting all threads of a process if a system call is made. Might not take advaqntage of multiprocessing.
What is the ULT work around for system calls?
Make the application spawn as multiple processes rather than threads
What is a kernel level thread?
One that is managed entirely by the kernel and not at all by the application
What is good about KLT’s?
The kernel can simotaneously schedule threads on multiple processors, and multiple threads in a process can be run if one in that process is blocked.
What is bad about KLT’s?
A mode switch is required when switching control between threads, and is less portable than ULT.
What is a combined approach?
Threads are created in the user space and most of scheduling is done by the application. Solaris is an example.
How would IO implemented as a single process behave?
The IO operation threads would be subject to swapping
What do multicore benefits depend on?
The ability to exploit parallel resources while executing