Summary: Process

1. Von Neumann architecture

Here Insert Picture Description

2. Process

(0) for the operating system, a task is a process;
(1) the process is to act allocate system resources (CPU time, memory) entity, is a dynamic characteristics.
(2) Time slice:
(2.1) operating system (such as Windows, Linux) task scheduling is a preemptive round-robin scheduling, that a short time after performing a task force a break to the next task, each take turns to perform tasks.
(2.2) is called a short time task execution time slice, the state of the task being performed called running, force a break to the next task after task execution time, the suspended task is in the ready state to wait for a part of its arrival time slice.

3. Concurrent and Parallel

(1) concurrently: a plurality of processes using round-robin manner the CPU next, within a period of time, to promote multiple processes are called concurrent.
(2) in parallel: a plurality of processes at a plurality of each CPU, running at the same time, which is called parallel.

4. kernel mode and user mode

1. kernel mode: the operating system kernel as a direct control of the underlying hardware of software, the highest authority, called the kernel mode, or kernel mode.
2. User Mode: Permissions lowest user program, called user mode.

5. The process context

(1) simply is a context environment, round-robin process during handover, since the process is different for each runtime environment, it relates to context switch before and after conversion.
When executed, the state of all registers of the CPU in the value of the process and the contents of the stack (2) is a process.
The need to preserve the current process (3) switch all the states that hold the current process context of the process, when in order to perform the process again, able to restore the state of the switch, continue.

5. Process Status

Here Insert Picture Description
Ready: The process is runnable state, not just CPU time slice to the rotation process, the process is in a ready state.
Run: runnable state process, and the CPU time slice to the rotation process, the process is executing code, the process is running.
Obstruction: The process does not have the operating conditions, we are waiting for the completion of an event.

Published 101 original articles · won praise 21 · views 5785

Guess you like

Origin blog.csdn.net/weixin_43613297/article/details/103646181