Lecture 4 (unfinished) Flashcards
What is Resource Ownership in terms of Processes?
Process includes a virtual address space to hold the process image
• The OS performs a protection function to prevent unwanted interference between processes with respect to resources
What is Scheduling/Execution in terms of Processes?
Follows an execution path that may be interleaved with other processes
A process has an execution state (Running, Ready, etc.) and a dispatching priority, and is the entity that is scheduled and dispatched by the OS
What is a Thread (Lightweight process)?
The unit of dispatching is referred to as a thread
What is a process (task)?
Defined in a multithreaded environment as “the
unit of resource allocation and a unit of protection”
Associated with processes:
A virtual address space that holds the process image
Protected access to:
Processors
Other processes (for interprocess communication)
Files
I/O resources (devices and channels)
What is multithreading?
Multithreading - The ability of an OS to support multiple, concurrent paths of execution within a single process.
Check multithread and single thread model/pics slide 5
Check multithread and single thread model/pics slide 5
What does each thread have ?
Access to the memory and resources of its processes, shared with all other threads in that process
An execution state (Running, Ready, etc.)
A saved thread context when not running
An execution stack
Some per-thread static storage for local variables
2 benefits of threads?
Takes less time to create a new thread than a process
Less time to terminate a thread than a process
What is Thread Use in a Single-User System?
Foreground and background work in parallel
•Asynchronous processing
•Speed of execution
•Modular program structure
What is suspending a process?
Suspending a process involves suspending all threads of the process
What is a termination of a process?
Termination of a process terminates all threads within the process
What is thread syncronization?
It is necessary to synchronize the activities of the various threads
•All threads of a process share the same address space and other resources
•Any alteration of a resource by one thread affects the other threads in the same process
What are the 2 types of threads?
User Level thread
Kernel Level thread
What is a user Level Thread (ULT)?
- All thread management is done by the application
* The kernel is not aware of the existence of threads
2 advantages of ULT?
Thread switching does not require kernel mode privileges
ULTs can run on any OS