Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Linux run queue process scheduling     - To achieve Linux Security (Linux)

- Oracle Automatic Diagnostic Repository (Automatic Diagnostic Repository, ADR) (Database)

- Generators and iterators in Python (Programming)

- error 1819 (HY000): your password does not satisfy the current policy requirements (Database)

- Java logging performance of those things (Programming)

- Ubuntu 14.04 compile RT288x_SDK / toolchain / squashfs3.2-r2 Error (Linux)

- Hadoop namenode do NFS disaster recovery (Server)

- RHEL 5.7 Yum configure local source [Errno 2] No such file or directory (Linux)

- Thinking in Java study notes - initialization and cleanup (Programming)

- Build Nginx + uWSGI + Flask operating environment under CentOS 6.4 tutorial (Server)

- Hadoop 2.2.0 installation development environment (standalone pseudo-distributed mode) (Server)

- Ubuntu 14.04 virtual machine switching desktop environments (Linux)

- Linux install Samba file sharing server (Server)

- Ubuntu buffalo wzr-hp-300nh brush DD-WRT router system (Linux)

- Ubuntu installation 2.10.x version of Scala (Linux)

- Compression decompression command under Linux (Linux)

- CentOS 7.0 Enable iptables firewall (Linux)

- Upgrading Oracle 11.2.0.1 to 11.2.0.3 (Database)

- ELKstack log analysis platform (Server)

- The Objects in JavaScript (Programming)

 
         
  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.
     
         
         
         
  More:      
 
- BCP importing and exporting large amounts of data Practice (Database)
- RPM package management under Linux (Linux)
- Android Application Development: Genymotion can not start solving (Linux)
- Hadoop1.2.1 plug compilation (Server)
- Workspace Go language and environment variables GOPATH (Linux)
- sqlplus connect to Oracle (Database)
- Oracle Listener can not start (TNS-12555, TNS-12560, TNS-00525) (Database)
- Make Windows boot disk to install USB in Ubuntu Linux (Linux)
- Storm basic framework for analysis (Programming)
- Hadoop2.0 configuration yarn success (Server)
- MySQL high availability cluster fragmentation of deployment uses Cobar (Database)
- When the master key encounter NULL (Database)
- How open source code libraries hosted on Github (Linux)
- The first IOS Objective-C program (Programming)
- Configuration based on open source Lucene Java development environment (Server)
- Neo4j map data processing tab (Database)
- Oracle RMAN repair logical bad blocks (Database)
- Linux processes in memory and memory cgroup statistics (Linux)
- Vim useful plugin: YouCompleteMe (Linux)
- 22 Port weak passwords and SSH connection program of the Linux server (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.