Lesson 4 | CPU dispatching priorities |
Objective | Describe dispatching priority. |
CPU dispatching Priorities
Within the database server, CPU cycles are assigned to the run queue according to dispatching priority.
Those tasks with a high dispatching priority move to the top of the CPU run queue while use tasks with a lower dispatching priority wait in a
first-in, first-out (FIFO) queue where the earliest in line is the first served.
1) Tasks are queued and wait for CPU cycles
2) CPU dispatcher distributes tasks to CPU1, CPU2, CPU3
3) A UNIX system process with a higher dispatching priority requests CPU and moves to the front of the line
4) Run the Queue
❮
❯
What is the relationship between CPU cycles and dispatching priorities in Oracle?
In Oracle, the CPU cycles determine the amount of processing power that is available for executing queries and other database operations. The dispatching priorities determine the order in which these operations are executed by the CPU.
When a query or other database operation is submitted to Oracle, it is assigned a priority based on its resource consumption and the current state of the system. The CPU cycles are then allocated to the operations based on their assigned priorities, with higher-priority operations receiving more CPU cycles and lower-priority operations receiving fewer.
For example, if a query is considered high-priority because it is critical to the operation of the system, it may be assigned a higher priority and receive a larger share of the available CPU cycles. Similarly, if a query is considered low-priority because it is not time-sensitive, it may be assigned a lower priority and receive a smaller share of the CPU cycles.
In this way, the dispatching priorities in Oracle help to ensure that the most important operations receive the resources they need to run efficiently, while lower-priority operations are executed only when there are sufficient CPU cycles available. This helps to ensure that the system runs smoothly and efficiently, even when under heavy load.
Sometimes, you may want to lower the default dispatching priority. For example, a long-running batch task can be given a lower priority so that
online transactions will get faster service. The next lesson shows how to do this with the nice command.