What is RunQueue for a Linux Box?

Linux on System z, Linux on zSeries, Linux/390, zLinux, z/Linux, z/VM & UNIX Shell services. IBM OS/360, OS/370, MVS, OS/390, TPF, VM/CMS, VM/ESA, VSE/ESA, z/VSE, z/OS.
Post Reply
Urmila Sharma
New Member
Posts: 5
Joined: Tue Dec 16, 2014 9:15 am

What is RunQueue for a Linux Box?

Post by Urmila Sharma »

Hi,

What is RunQueue for a Linux Box? I have googled about it and the definition about it as: Run queue
In modern computers many processes run at once. Active processes are placed in an array called a run queue, or runqueue. The run queue may contain priority values for each process, which will be used by the scheduler to determine which process to run next. To ensure each program has a fair share of resources, each one is run for some time period (quantum) before it is paused and placed back into the run queue. When a program is stopped to let another run, the program with the highest priority in the run queue is then allowed to execute.

Processes are also removed from the run queue when they ask to sleep, are waiting on a resource to become available, or have been terminated.

In the Linux operating system (prior to kernel 2.6.23), each CPU in the system is given a run queue, which maintains both an active and expired array of processes. Each array contains 140 (one for each priority level) pointers to doubly linked lists, which in turn reference all processes with the given priority. The scheduler selects the next process from the active array with highest priority. When a process' quantum expires, it is placed into the expired array with some priority. When the active array contains no more processes, the scheduler swaps the active and expired arrays, hence the name O(1) scheduler.

In UNIX or Linux, the sar command is used to check the run queue.

The vmstat UNIX or Linux command can also be used to determine the number of processes that are queued to run or waiting to run. These appear in the 'r' column.
But I don't understand if this can be applied to zLinux too? I don't find a mention about it in the documents.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What is RunQueue for a Linux Box?

Post by Robert Sample »

zLinux can run under z/VM or natively in an LPAR, so I'm not sure that your question even makes sense as posted. Furthermore, the quote you gave referenced kernel version 2.6.23, while z/Linux (as of 2015) is running kernel version 4.1. zLinux, like the other z/Architecture operating systems, uses something like run queues to manage work but it may not be called a "run queue" in the documentation.
Urmila Sharma
New Member
Posts: 5
Joined: Tue Dec 16, 2014 9:15 am

Re: What is RunQueue for a Linux Box?

Post by Urmila Sharma »

Thanks. Can you please guide me to a correct term for zLinux for run queue, if you can. It will be a great help.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “zLinux, USS and other Operating Systems for Mainframes.”