Process description and control essay

Source: Internet
Author: User

Process Control block: identifier, status, priority, program counter, memory pointer, context data, I/O status information, accounting information

The process control block is a key tool for the operating system to support multiple processes and provide multi-processing. It can be said that the process is composed of program code and related data and process control blocks.

Mode switching differs from process switching in that a pattern switch does not change the state of a process that is in the running state, in which case it requires little overhead to save the context and later restore the context environment.

To perform process management functions, the operating system maintainer describes each process, or process image, which includes the address space of the execution process and a Process control block.

A running process can be interrupted by an interrupt event that occurs outside the process and is recognized by the processor, or by a system call that executes the operating system. In either case, the processor performs a mode switch and transfers the control to the operating system routines.

User-level line threads has two obvious drawbacks for kernel-level threading:

1> in a typical operating system, many system calls can cause blocking. Therefore, when a user-level thread executes a system call, not only will the thread be blocked, but all threads in the process will be blocked.

2> in a purely user-level threading strategy, a multithreaded application cannot take advantage of multi-processing techniques.

You can solve these two problems by writing the application as a multi-process program rather than as a multi-threaded one. Another way to overcome threading problems is to use a technique called jacketing. The goal of jacketing is to convert a blocking system call into a non-blocking system call.

Between a user-level thread and a kernel-level thread, there is a performance gap of more than one level between the kernel-level thread and the process.

If most of the thread switching in your application requires kernel-state access, then the scenario based on a user-level thread will not be much better than a kernel-level thread-based scenario.

Process description and control essay

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.