Process Management 4
1. Process several states. Run, ready, blocked
2. How the process is stored. (Combination of arrays and links, local principle: address continuous)
3. Switching between processes--interrupts (clock interrupts), blocking--ready, running--ready, etc. interrupt
4.CPU scheduling process optimization, with hardware to do, on the CPU to do a series of instructions, save the process site.
Dynamically switch between processes, or use registers to switch dynamically, putting process information into registers
, we change the state of the registers, that is, the state between the processes.
Process Management 5
1. Process START Process: When the system kernel is loaded, the process starts. The user is very urgent
The required thread. such as the resource manager.
2. Click on the software icon What's going on? The resource manager is invoked, the resource management is called again, and the process is created.
3. The relationship between the child process and the parent process. Fork (), process replication.
4. Each process has its own separate address space, otherwise the security issue is large.
Because the process can be freely accessible between, it is very insecure.
5.fork (), process replication mechanism. (scene, which jumps from the current process to another process.) )
A process runs, calls the fork process, produces a parent process and a child process.
After the process is copied, two processes are the same, but the return value is different after the call to fork ()
When the replication process is complete, the child process calls other processes. Because the value returned by the child process is
The ID number of the process to enable.
6. The parent process waits for the child thread to finish executing, and the child thread is finished, returning to the parent thread.
Operating system principles: Process Management 4 and 5