Chapter 4 : Process and Threads

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

1. Process Control Block

1.1. process elements

1.1.1. Program code

1.1.2. A set of data associated with that code

1.2. handle interuption occured

1.3. created by OS

2. Threads

2.1. type of thread

2.1.1. user pros Thread switching does not require Kernel mode privileges. User level thread can run on any operating system. Scheduling can be application specific in the user level thread. User level threads are fast to create and manage. cons In a typical operating system, most system calls are blocking. Multi-threaded application cannot take advantage of multiprocessing.

2.1.2. kernel pros Kernel can simultaneously schedule multiple threads from the same process on multiple processes. If one thread in a process is blocked, the Kernel can schedule another thread of the same process. Kernel routines themselves can be multithreaded. cons Kernel threads are generally slower to create and manage than the user threads. Transfer of control from one thread to another within the same process requires a mode switch to the Kernel.

2.2. Single Threaded Approaches

2.2.1. executed per porcess E.g. MS-DOS

2.3. Multi-Threaded Approaches

2.3.1. executed multiple process at same time E.g. Java run-time environment

2.3.2. pros less time to create a new thread than a process less time to terminate a thread than a process time taken less in switching between two threads enhance efficiency in communication between programs

3. Process state

3.1. Two-state process model

3.1.1. runing Process Creation process spawning Parent Process Child Process reason for Process Creation

3.1.2. no-running Process terrmination process to indicate its completion quit program reason for Process terminatiom

3.2. Five-state model

3.2.1. process suspension reason for process suspension swapping interactive user request timing parent process request

4. Control Structures

4.1. constructs and maintains tables of information about each entity that it is managing

4.1.1. Process Tables

4.1.2. IO tables

4.1.3. Memory tables

4.1.4. File Tables

5. Processes

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

5.1.1. processors

5.1.2. other processes

5.1.3. files

5.1.4. I/O resources