Process and Threads

Get Started. It's Free
or sign up with your email address
Process and Threads by Mind Map: Process and Threads

1. Process Termination

1.1. -Process to indicate its completion. -Should include a HALT instruction or an explicit OS service call for termination -Indicate when the process is completed.

2. Reasons For Process Termination

2.1. -Normal Completion -Time Limit Exceeded -Memory Unavailable -Bounds Violation -Protection Error -Arithmetic error -Time Overrun -I/0 Failure -Invalid Instruction -Privileged instruction -Data misuse} -Operator or OS intervention -Parent termination -Parent Request

3. Five-State Process Model

3.1. -New -Ready -Running -Exit -Blocked

4. Suspended Processes

4.1. Swapping -Involves moving part involves moving part of all of a process from main memory to disk

4.2. Characteristics of a Suspended Process -The process is not immediately available for execution -May or may not be waiting on an event -may not be removed from the state until the agent explicity orders -Was placed in a suspended state by an agent.

4.3. Reasons for Process Suspension -Swapping -Other OS reason -Interactive user request -Timing -Parent process request.

5. Processes and Threads

5.1. Single Threaded Approaches -A thread is not recognized Multithreaded Approaches -A java run-time environment is an example of a system of one process with multiple threads.

5.2. Resource Ownership -Process includes a virtual address space to hold the process image Scheduling/Execution -Follows and execution path may be interleaved with other processes.

5.3. -Dispatching is referred to as a thread or lightweight process. -Unit of resource ownership referred as a process or task. -Multitthreading

5.4. Protected access to -Processosrs -Other processes -Files -I/O Resources

5.5. One or more threads in a process -an execution state -saved thread context when not running

5.6. Benefits of Threads - Take less time to create a new thread than a process - Less time to terminate a thread - Switch between two threads take less time than switching between processes -Threads enhance efficiency in communication between programs

6. Operatiing System Control Structures

6.1. -OS Must have information about the current status of each process and resources -maintains tables of information about each entity that is managing -Four Type of tables maintained by the OS -Memory tables, IO tables, File Tables, Process Tables

7. OS Management of Application Execution

7.1. -Resources available to multiple applications. -Processor switched among multiple applications. -I/0 can be used efficiently.

8. Process

8.1. -Execution -Instance running program -Entity that can assigned to, executed on, a processor. -Associated set of system resources.

8.2. Process Elements

8.2.1. Program code -Shared with other processes that are executing the same program. A set of data associated with that code -when the processor begins to execute the program code, we refer to this executing entity as a process.

8.2.2. -Identifier -State -Priority -Program Counter -Memory Pointers -Context Data -I/0 Status information - Accounting Information

8.3. Process Control Block -Contains process elements. -Possible interrupt a running process. Created and managed by the operation System -Key tool support multiple process.

9. Process States

9.1. Trace - listing the sequence of instructions that execute for that process. Dispatcher - Small program switches processor to another.

10. Two-State Process Model

10.1. Running or Not-running

11. Process Creation

11.1. -Occurs when a new process added to those currently managed processes. -Builds the data structures that are used to manage the process and allocates address space in main memory to the process.

11.2. Reasons For Process Creation

11.2.1. -New Batch Job -Interactive Logon -Created by OS to provide a service -Spawned by existing process

11.3. Process Spawning - When the OS creates a process at the explicit request of another process Parent Process -Is the original, creating, process. Child Process -Is the new process