HPlogo Getting Started as an MPE/iX Programmer Programmer's Guide: HP 3000 Computer MPE/iX Computer Systems > Chapter 3 Program Development

Multi-programming Environment

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

MPE/iX is a multiprogramming environment in which one process has control of the CPU at any given instant. All other processes are suspended to allow time for this to occur, and the processes take turns. The frequency and duration of a turn is determined by the MPE/iX Dispatcher and is dependent on the priority assigned to the process. Processes can voluntarily suspend for many reasons. For example, a process may suspend because it is waiting for input or output. The code and data for suspended processes is retained in memory until space is needed by the executing process.

Priority Levels

A priority number identifies the priority level for a process. The lower the number, the higher the priority. Priorities range from 1 to 255. MPE/iX uses a mechanism of subqueues to determine when to change the priority level of a process, if at all. Operating system processes are given the highest priority to promptly service requests. The AS subqueue (used for most operating system processes) receives the highest priorities, followed by the BS subqueue (usually used for special user processes). The CS, DS, and ES subqueues (used for the Command Interpreter, Editor, compilers, and standard user processes), as a group receive the lowest priorities.

Operating system processes are given the highest priority to promptly service requests. At the user level, processes are queued and given CPU control based on rules for the types of queue used at the particular level of the process. The operating system always runs the highest priority process that is ready to execute. A system manager can assign to users and accounts privileges or restrictions of one subqueue over another. A system supervisor has some control over the priority levels in CS, DS, and ES.

Linear Subqueues

The AS and BS subqueues are linear queues. The characteristics of a linear queue are:

  • MPE/iX does not change the priority level of a process.

  • Processes at a given priority level execute on a first come, first served basis.

  • An executing process controls the CPU until it voluntarily suspends or receives a higher priority interrupt.

The AS subqueue should be reserved for operating system processes. A user process running in AS can severely impair the operating system's ability to function. The BS subqueue is for special high priority user processes. It is a recommended practice to run a special user process at a priority of 140 or lower to avoid preempting important MPE/iX functions, such as spooler operation.

Circular Subqueues

The CS, DS, and ES subqueues are circular queues. The characteristics of a circular queue are:

  • Priority levels are cycled.

  • An executing process controls the CPU until it voluntarily suspends, receives a higher priority interrupt, or reaches the end of its quantum (time slice).

A circular queue lowers the priority of a process at the end of its quantum. After the drop, the process eventually gets another opportunity to execute. The CS, DS, and ES subqueues differ in how low a priority can be dropped.

Feedback to webmaster