Operating system principles: Process Management 4 and 5

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.