Basic knowledge about Linux: processes

Source: Internet
Author: User
Q1. what are the concepts of programs and processes? Why should we introduce the concept of a process? A: 1) A program is A common file and A collection of machine code commands and data. these commands and data are stored in an executable image on the disk, and the executable image is called executableimage) is...

Q1. what are the concepts of programs and processes? Why should we introduce the concept of "process?
A:

1) a program is a common file and a collection of machine code commands and data. these commands and data are stored in an executable image on the disk. the executable image) is the content of an executable file;

2) a process represents the execution process of a program. it is a dynamic entity and constantly changes with the execution of commands in the program, the process content at a specific time point is called a process image );

3) the execution process of a program can be said to be the sum of an execution environment, which includes some additional data in addition to various instructions and data in the program; the dynamic changes in the execution environment reflect the running of the program. to describe the process of dynamic changes, the concept of "process" is introduced.

 

Q2. what is a process control block? What basic information does it contain?

A:

1) in Linux, the description structure of processes is called task_struct, and such a data structure is called a process control block (PCB );

2) PCB is a massive data structure with more than 80 segments. all domains are divided into status information based on their functions, link information, various identifiers, inter-process communication information, time and timer information, scheduling information, file system information, virtual memory information, and processor environment information.

 

Q3. what are the Linux kernel statuses?

A:

1) There are three basic processes in Linux: The running state, the ready state, and the blocking state (or the waiting state). There are four possible conversion relationships between these three states: running state-> blocking state, running state-> ready state, ready state-> running state and blocking state-> ready state;

2) for ease of management, combine the ready state and running state into a state-runable state, including other changes, and divide the process state: operational, sleep (or waiting), paused, and frozen.

 

Q4. what are the PCB organization methods?

A: PCB is organized in the following ways: Process linked list, scattered list, operational queue, and waiting queue.

 

Q5. what are the main scheduling algorithms? What aspects should a good scheduling algorithm consider?

A:

1) the main scheduling algorithms include: time slice rotation scheduling algorithm, priority scheduling algorithm (non-preemptible priority algorithm and preemptible priority algorithm), multi-level feedback queue scheduling algorithm and real-time scheduling algorithm;

2) a good scheduling algorithm should consider five aspects: fairness, efficiency, response time, turnover time and throughput.

From:

Related Article

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.