Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ Linux run queue process scheduling     - To install Python-Pip and Fabric under CentOS / Ubuntu (Linux)

- Integrated security administrator Linux accident management (Linux)

- Linux System Getting Started Learning: the local time in between Perl and UNIX timestamp conversion (Linux)

- VirtualBox virtual machine to install Linux (Linux)

- Linux System Getting Started Learning: Fix ImportError: No module named scapy.all (Linux)

- Sleuth Kit: used to analyze a disk image and restore files open source forensics tools (Linux)

- The principle Httpclient4.4 (HttpClient Interface) (Programming)

- Oracle 12c R2 new feature dbca command to create a standby database (Database)

- Linux System Getting Started Learning: DeVeDe installed on Linux to create a video DVD (Linux)

- Java memory area (Programming)

- Unix system security configuration (Linux)

- Java objects are taking up much space (Programming)

- How to import JNI resulting .so libraries in Android Studio (Programming)

- Appweb configuration in detail (Server)

- Using IPFilter bridge filter in the FreeBSD system (Linux)

- CentOS modify yum update source (Linux)

- Implement firewall function on a closed Linux machine (Linux)

- How to make Linux a non-root user uses less than 1024 ports (Linux)

- To remove those IP is prohibited Fail2ban on CentOS 6/7 (Server)

- Linux performance monitoring and common commands Introduction (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.
- Read and write files efficiently from Apache Kafka (Server)
- Linux Crontab Timing task command Detailed (Linux)
- When Linux Detailed time zone and common function of time (Linux)
- Spring MVC Exception Handling (Programming)
- Install the latest Pinta graphics editing software on Ubuntu 14.04 (Linux)
- 64-bit Windows Server 2012 R2 install Oracle 10g Second Edition (Database)
- After you change the GRUB boot disk partition repair (Linux)
- Java Concurrency -volatile keywords (Programming)
- JavaScript is implemented without new keywords constructor (Programming)
- Squid proxy server configuration under Linux (Server)
- Online booking shocking information leakage risk, you dare book the tickets online? (Linux)
- How to install Git on CentOS 7 (Linux)
- Distributed Firewall Design on Linux platform (Linux)
- Performance Optimization: Using Ramlog transfer log files to memory (Linux)
- Report generation CPU, memory, and input and output ports with the sar command (Linux)
- Some Linux networking tools you might not know (Linux)
- OpenCV 3.0 + Python 2.7 installation and testing under Ubuntu 14.04 (Linux)
- Modify Linux SSH default port 22 in several ways (Linux)
- Java Learning: elegant string (Programming)
- After the first remote installation GlassFish Web to remotely access their back office management system error solution appears (Server)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.