Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ Linux run queue process scheduling     - MongoDB learning Notes (2) basic connection example of -Nodejs and MongoDB (Database)

- Install the free open source financial software GnuCash 2.6.6 under Ubuntu (Linux)

- Getting the Linux shell variable test (Programming)

- Yii2 Advanced Version Copy New Project Problem Solved (Programming)

- SQL MySQL query table duplicate data (Database)

- Linux installation and configuration curl command tool (Linux)

- Linux system started to learn: Teaches you install Ubuntu 15.04 on VirtualBox (Linux)

- Linux systems use logwatch log file monitoring (Linux)

- RabbitMQ tutorial examples: the Hello RabbitMQ World Java realization (Linux)

- DRBD daily management (Server)

- Linux network security strategy (Linux)

- Spring classic face questions Share (Programming)

- Getting Started with Linux system to learn: how to check the version of SSH on Linux (Linux)

- The need to avoid a gap of InnoDB lock (Database)

- OpenSSL: implementation creates a private CA, certificate signing request Explanation (Server)

- CentOS of NFS (Server)

- To install the Git and Github under Ubuntu (Linux)

- How to run Kali Linux 2.0 in Docker container (Linux)

- extundelete: the Linux-based open source data recovery tools (Linux)

- Shell script to crawl through AWR SQL Report Problems (Database)

  Linux run queue process scheduling
  Add Date : 2018-11-21      
  Run queue

When the Linux kernel to look for a new process to run on the CPU, you must consider only the process is runnable state (ie process TASK_RUNNING state), because the process of scanning the entire list is quite inefficient, so the introduction of the runs two-way circular linked list state of the process, also called the run queue (runqueue).

Run queue to accommodate the system can run all the processes, it is a two-way circular queue

The queue by task_struct structure pointer run_list two lists to maintain. Flag queue has two: one is "empty process" idle_task, a queue length.

There are two special processes in the run queue forever alone: ​​the current process and empty process. Earlier we discussed before, the current process is pointed to by the pointer cureent process that is currently running process, but please note, current pointer in the scheduling process (scheduler execution) does not make sense, why do you say? Before scheduling, the current process is running, when there is a scheduling opportunity sparked process scheduling, previously running process what state is unknown, in most cases in a wait state, so current at this time makes no sense, http: //Ubuntuone.cn/ until the scheduler selected a process put into operation, current really points to the currently running process; empty process is a special process that can only run the system does not process it will be executed, Linux run it as the head of the queue when the scheduler run queue traversal, from idle_task beginning to idle_task end, the scheduler is running, allowed to join the queue of runnable processes emerging, emerging runnable processes inserted into the tail, so that the benefits will not affect the members of the scheduler queue to be traversed, visible, idle_task is a very important sign of the run queue.

Another important symbol is the queue length, that is, the system can be run in a number of state (TASK_RUNNING) process, with a global integer variable nr_running representation, /kernel/fork.c defined in the following:

int nr_running = 1;

If nr_running is 0, it means that only empty queue process. Here to explain: If nr_running 0, the system of the current process and empty process is the same process. However, Linux will make full use of CPU and try to avoid this situation.
- Linux systems use IP masquerading anti-hacker (Linux)
- System Security: Build Linux with LIDS steel castle (Linux)
- Oracle restrict certain IP, the malicious user actions on important table (Database)
- Ceph cluster disk is no workaround for the remaining space (Server)
- You need to know 12 Git High Command (Linux)
- Ubuntu 14.04 Nvidia proprietary drivers for install two graphic cards (Linux)
- Definition Format Oracle basis of various statements (Database)
- Python Multithreaded Programming (Programming)
- Nginx start, stop, smooth start, smooth upgrade (Server)
- IP configuration under Linux (Linux)
- Protect against network attacks using Linux system firewall (Linux)
- Linux text processing tool of awk (Linux)
- Linux kernel source code analysis (Linux)
- Detailed reference Oracle 11g Partition (Database)
- PuTTY Xming achieve the X11 forwarding ssh (Server)
- C language binary tree counts words (Programming)
- To use yum install VLC under CentOS (Linux)
- About Nginx 7 (Server)
- Repair Chrome for Linux is (Linux)
- CentOS 6.6 permanent method to modify the DNS address (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.