PROCESS AND THREADS

Laten we beginnen. Het is Gratis
of registreren met je e-mailadres
PROCESS AND THREADS Door Mind Map: PROCESS AND THREADS

1. PROCESS STATES

1.1. TRACES

1.1.1. the behavior of an individual process by listing the sequence of instructions that execute for that process

1.1.2. the behavior of the processor can be characterized by showing how the traces of the various processes are interleaved

1.2. DISPATCHER

1.2.1. small program that switches the processor from one process to another

1.3. Two-state process model

1.3.1. Running

1.3.2. Non-running

1.4. Creation and termination

1.4.1. CREATION

1.4.1.1. Occurs when a new process is to be added to those currently being managed processes

1.4.1.2. The operating system builds the data structures that are used to manage the process and allocates address space in main memory to the process

1.4.1.3. REASONS

1.4.1.3.1. New batch jobs

1.4.1.3.2. Interactive logon

1.4.1.3.3. Created by OS to provide a service

1.4.1.3.4. Spawbed by existing process

1.4.2. TERMINATION

1.4.2.1. There must be a means for a process to indicate its completion

1.4.2.2. A batch job should include a HALT instruction or an explicit OS service call for termination

1.4.2.3. For an interactive application, the action of the user will indicate when the process is completed

1.4.2.4. REASONS

1.4.2.4.1. Normal completion

1.4.2.4.2. Time limit exceeded

1.4.2.4.3. Memory unavailable

1.4.2.4.4. Bounds violation

1.4.2.4.5. Protection error

1.4.2.4.6. Arithmetic error

1.4.2.4.7. Time overrun

1.4.2.4.8. I/O failure

1.4.2.4.9. Invalid instruction

1.4.2.4.10. Privileged instruction

1.4.2.4.11. Data misuse

1.4.2.4.12. Operator or OS intervention

1.4.2.4.13. Parent termination

1.4.2.4.14. Parent request

1.5. Five-state model

1.5.1. New

1.5.2. Ready

1.5.3. Running

1.5.4. Blocked

1.5.5. Exit

1.6. Suspended processes

1.6.1. SWAPPING

1.6.1.1. involves moving part of all of a process from main memory to disk

1.6.1.2. when none of the processes in main memory is in the Ready state, the OS swaps one of the blocked processes out on to disk into a suspend queue

1.6.2. The process is not immediately available for execution

1.6.3. The process was placed in a suspended state by an agent: either itself, a parent process, or the OS, for the purpose of preventing its execution

1.6.4. The process may or may not be waiting on an event

1.6.5. The process may not be removed from this state until the agent explicitly orders the removal

1.6.6. REASONS

1.6.6.1. Swapping

1.6.6.2. Other OS reason

1.6.6.3. Interactive user request

1.6.6.4. Timing

1.6.6.5. Parents process request

2. PROCESSES AND THREADS

2.1. Resource Ownership

2.1.1. Process includes a virtual address space to hold the process image

2.1.2. the OS performs a protection function to prevent unwanted interference between processes with respect to resources

2.2. Scheduling/Execution

2.2.1. Follows an execution path that may be interleaved with other processes

2.2.2. a process has an execution state and a dispatching priority and is scheduled and dispatched by the OS

2.3. The unit of dispatching is referred to as a thread or lightweight process

2.4. The unit of resource ownership is referred to as a process or task

2.5. Multithreading - The ability of an OS to support multiple, concurrent paths of execution within a single process

2.6. SINGLE THREAD APPROACHES

2.6.1. A single thread of execution per process, in which the concept of a thread is not recognized, is referred to as a single-threaded approach

2.6.2. MS-DOS

2.7. MULTITHREADED APPROACHES

2.7.1. A Java run-time environment is an example of a system of one process with multiple threads

2.8. PROCESSES

2.8.1. The unit of resource allocation and a unit of protection

2.8.2. A virtual address space that holds the process image

2.8.3. Protected access to

2.8.3.1. processors

2.8.3.2. other processes

2.8.3.3. files

2.8.3.4. I/O resources

2.9. Threads in a process

2.9.1. has an execution state

2.9.2. has saved thread context when not running an execution stack

2.9.3. has some per-thread static storage for local variables

2.9.4. access to the memory and resources of its process

2.10. BENEFITS OF THREAD

2.10.1. Takes less time to create a new thread than a process

2.10.2. Less time to terminate a thread than a process

2.10.3. Switching between two threads takes less time than switching between processes

2.10.4. Threads enhance efficiency in communication between programs