Chapter 4 : Process and Threads

Get Started. It's Free
or sign up with your email address
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. Process state

2.1. Two-state process model

2.1.1. runing

2.1.1.1. Process Creation

2.1.1.1.1. process spawning

2.1.1.1.2. Parent Process

2.1.1.1.3. Child Process

2.1.1.1.4. reason for Process Creation

2.1.2. no-running

2.1.2.1. Process terrmination

2.1.2.1.1. process to indicate its completion

2.1.2.1.2. quit program

2.1.2.1.3. reason for Process terminatiom

2.2. Five-state model

2.2.1. process suspension

2.2.1.1. reason for process suspension

2.2.1.1.1. swapping

2.2.1.1.2. interactive user request

2.2.1.1.3. timing

2.2.1.1.4. parent process request

3. Control Structures

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

3.1.1. Process Tables

3.1.2. IO tables

3.1.3. Memory tables

3.1.4. File Tables

4. Threads

4.1. type of thread

4.1.1. user

4.1.1.1. pros

4.1.1.1.1. Thread switching does not require Kernel mode privileges.

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

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

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

4.1.1.2. cons

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

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

4.1.2. kernel

4.1.2.1. pros

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

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

4.1.2.1.3. Kernel routines themselves can be multithreaded.

4.1.2.2. cons

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

4.1.2.2.2. Transfer of control from one thread to another within the same process requires a mode switch to the Kernel.

4.2. Single Threaded Approaches

4.2.1. executed per porcess

4.2.1.1. E.g. MS-DOS

4.3. Multi-Threaded Approaches

4.3.1. executed multiple process at same time

4.3.1.1. E.g. Java run-time environment

4.3.2. pros

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

4.3.2.2. less time to terminate a thread than a process

4.3.2.3. time taken less in switching between two threads

4.3.2.4. enhance efficiency in communication between programs

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