Process concepts read operating system concepts version 6

Source: Internet
Author: User

Processes can be considered as executing programs. A process requires resources (such as CPU time, memory, files, and I/O devices) to complete its tasks. These resources are allocated when a process or execution thread is created.

 

A process is a program executed, which is informal. A process is not just a program code.Text Section. The process also includes the current activity.Program countersValue and the content of the Processor register. In addition, processes usually include processesStack segment(Including temporary data, such as method parameters, return addresses, and local variables) and data segments (including global variables ).

The program itself is not a process; the program is only a passive entity, such as the file content stored on the disk, and the process is an active entity, it has a program counter to indicate the next command to be executed and a collection of related resources.

 

The process changes its status during execution.

New: the process is being created.

Run: The command is being executed.

Wait: The process waits for a certain event (such as I/O completion or receiving a signal ).

Ready: the process is waiting to be allocated to a processor.

Terminate: the process has been completed.

 

Each process is represented by a process control block (PCB) in the operating system.

Process status: The status may include new, ready, running, waiting, and stopped.

Program counters: The address of the next command to be executed by the process.

CPU registers: The number and type of registers vary depending on the computer architecture. They include accumulators, index registers, stack pointers, General registers, and other condition code information registers. Like program counters, these status information needs to be saved in case of interruptions, so that the process can continue correctly in the future.

CPU scheduling information: This type of information includes process priority, scheduling queue pointer, and any other scheduling parameters.

Memory Management Information: The base address register and limit register values, page tables, or field tables of this type of information.

Accounting Information: This type of information includes the CPU time, actual use time, time limit, accounting quantity, job or process quantity, etc.

I/O status information: This type of information includes the list of I/O devices allocated to the process and the list of opened files.

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.