Traditional Culture Encyclopedia - Traditional customs - What is the basic unit of resource allocation and scheduling in an operating system that introduces threads? Process or thread? Why?
What is the basic unit of resource allocation and scheduling in an operating system that introduces threads? Process or thread? Why?
In an operating system that introduces threads, the basic unit of resource allocation and scheduling is the process.
Processes represent a single computer program running a set of activities, and are the basic unit of resource allocation and scheduling in a system, and are the basis of the operating system structure.
In early process-oriented computer architectures, the process was the basic execution entity of the program, and in modern computer architectures designed for threading, the process is a container for threads. A program is a description of instructions, data, and their organization, and a process is the entity of a program.
The reason why operating systems introduced the concept of a process: from a theoretical point of view, it is an abstraction of the process of a running program. From an implementation point of view, it is a data structure designed to clearly portray the inner laws of a dynamic system and to effectively manage and schedule programs that enter the main memory of the computer system to run.
Expanded:
The entities of a thread include the program, data, and the TCB.A thread is a dynamic concept, and its dynamic characteristics are described by the Thread Control Block (TCB).The TCB includes the following information:
1. Thread state.
2. Live resources that are saved when the thread is not running.
3. A set of execution stacks.
4. A local variable main memory area that holds each thread.
5. Access to main memory and other resources in the same process.
A set of registers and stacks used to indicate the program counter for the sequence of instructions being executed, reserved local variables, a few status parameters, return addresses, etc.
Baidu Encyclopedia-Process
- Related articles
- There are many similarities with Xiao. How to distinguish them?
- Cultural Construction of the Middle School Attached to the North of Shanghai University
- What kind of socks does everyone's middle-aged husband wear?
- World Book Day Activities Briefing
- What grade does the red dot pen belong to?
- (2009? Qingyuan) Tofu is an important invention in ancient China, while Qingyuan's Jiulong Tofu is flavored with local unique ground beans.
- Children's Day Paper Works
- Guangdong Foshan Floor Brick 10 Brand
- What are the legends about the four great beasts: the Green Dragon, the White Tiger, the Vermilion Bird, and the Xuanwu?
- [Communication Day 1]