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

2.1.1.1. pros

2.1.1.1.1. Thread switching does not require Kernel mode privileges.

2.1.1.1.2. User level thread can run on any operating system.

2.1.1.1.3. Scheduling can be application specific in the user level thread.

2.1.1.1.4. User level threads are fast to create and manage.

2.1.1.2. cons

2.1.1.2.1. In a typical operating system, most system calls are blocking.

2.1.1.2.2. Multi-threaded application cannot take advantage of multiprocessing.

2.1.2. kernel

2.1.2.1. pros

2.1.2.1.1. Kernel can simultaneously schedule multiple threads from the same process on multiple processes.

2.1.2.1.2. If one thread in a process is blocked, the Kernel can schedule another thread of the same process.

2.1.2.1.3. Kernel routines themselves can be multithreaded.

2.1.2.2. cons

2.1.2.2.1. Kernel threads are generally slower to create and manage than the user threads.

2.1.2.2.2. 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

2.2.1.1. E.g. MS-DOS

2.3. Multi-Threaded Approaches

2.3.1. executed multiple process at same time

2.3.1.1. E.g. Java run-time environment

2.3.2. pros

2.3.2.1. less time to create a new thread than a process

2.3.2.2. less time to terminate a thread than a process

2.3.2.3. time taken less in switching between two threads

2.3.2.4. enhance efficiency in communication between programs

3. Process state

3.1. Two-state process model

3.1.1. runing

3.1.1.1. Process Creation

3.1.1.1.1. process spawning

3.1.1.1.2. Parent Process

3.1.1.1.3. Child Process

3.1.1.1.4. reason for Process Creation

3.1.2. no-running

3.1.2.1. Process terrmination

3.1.2.1.1. process to indicate its completion

3.1.2.1.2. quit program

3.1.2.1.3. reason for Process terminatiom

3.2. Five-state model

3.2.1. process suspension

3.2.1.1. reason for process suspension

3.2.1.1.1. swapping

3.2.1.1.2. interactive user request

3.2.1.1.3. timing

3.2.1.1.4. 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