Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ Linux run queue process scheduling     - Install Web-based monitoring tool: Linux-Dash (Server)

- SSH keys using login and password to log prohibited practice (Linux)

- Linux Learning --- disk partition / relational representation + mount (Linux)

- How to Install Node.js in CentOS 7 (Linux)

- Migrate Oracle database files to ASM (Database)

- Android Studio Getting Started Hello World (Programming)

- CentOS 7.0 Enable iptables firewall (Linux)

- Linux, C programming language library file handling and preparation of Makefile (Programming)

- C ++ handling text input (Programming)

- To install Xen in Ubuntu 12.04 (Linux)

- FileZilla install on Ubuntu 14.10 (Linux)

- Ubuntu will be written in a command file, executable file, source command (Linux)

- Is Linux the most secure operating system (Linux)

- Smack 4.1.x Upgrade Guide (Linux)

- Get and Post requests Comments (Linux)

- Three kinds of implementation model of the Linux thread history (Programming)

- Ubuntu upgrade to Linux Kernel 4.2.3 Kernel (Linux)

- Use Makeself Create installation file (Linux)

- Learning C ++ Standard Template Library and data structures (Programming)

- The most common and most effective security settings under linux (Linux)

  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.
- Lsblk command lists using Linux block device information (Linux)
- Oracle table space create large files (Database)
- RabbitMQ tutorial examples: the Hello RabbitMQ World Java realization (Linux)
- NAT (network address translation) Realization (Linux)
- MongoDB, Cassandra, HBase transaction design strategy (Database)
- JavaScript, some conclusions about the implicit conversion (Programming)
- Using Lua implement various operations list (Programming)
- Django 1.8 TEMPLATE_DIRS configuration and STATICFILES_DIRS (Server)
- Kubernetes Cluster Setup problems encountered and solutions (Server)
- C # assembly calls across constants, variables and functions (Programming)
- 17 How to install the Ubuntu 14.04 and Linux Mint Kodi14 (XBMC) (Linux)
- Oracle 11g maintenance partitions (Seven) - Modifying Real Attributes of Partitions (Database)
- Nginx reverse proxy and self-signed https (Server)
- Linux terminal program running in the background (Linux)
- grep command Series: grep command to search for multiple words (Linux)
- Win8 mount disk partitions under Ubuntu (Linux)
- How to create a bootable USB disk to use MultiSystem on Ubuntu (Linux)
- Sniffer install applications in Linux supplement (Linux)
- Adjustment expand VMDK format VirtualBox disk space (Linux)
- Nginx version information hidden or modified (Server)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.