Operating Systems
Operating Systems
Võ Hồ Quốc Huy
01 02 03
04 05
If there is only 1 process in the system, then in the IO cycles of the process,
the CPU will be completely idle. The idea of increasing the number of
processes in the system is to utilize the CPU: if process 1 execute IO, then the
operating system can use the CPU to perform process 2 ...
Tiến trình 1:
CPU IO CPU IO CPU
Tiến trình 2:
CPU IO CPU IO
Increased multitasking level
For each process to rotate in a very short time, giving the impression
that the system has many processes executing simultaneously.
One program counter A
Process
B
Process Four program counter
A switch C
D
B
B C D
A
C
Time
D
Increase processing speed
User
Space
thread Thread
Kemel
Space Kemel Kemel
Thread Example
disk
Thread Example
A process has three threads, each thread has its own stack
Thread Installation
Installation in Kernel-space
Installation in User-space
Installation in Kernel-space and User-space
Thread Installation in Kernel – space
Non-privileged mode
restricts access and
cannot execute
privileged instructions.
Data structure of process control block
Process control block (PCB): is a
memory area the stores
descriptive information for the
process:
Process identifier (1)
Process status (2)
Context of the process (3)