Newer
Older
ubixos / docs / arch / scheduler
@apwillia apwillia on 6 Jul 2002 2 KB Added state information
Documentation for Ubix Scheduler.

Definitions:

Task - In Ubix, a task is a group of instructions to run on the processor.  Typically, this is in the form of a program THREAD.

Process - A grouping of one or more tasks, usually loaded from an executable file.  All of the tasks in a process will share the same ADDRESS SPACE.  When a process is created, it will initially contain one task.

Thread - Term used in unix environments to describe an Ubix TASK.

Address Space - Section of virtual memory to which a task has access to.

Priority - Importance placed on a task when the scheduler chooses a task to run.  There are two different types of priority in Ubix.  A static priority is given when a task is created.  In addition, a task contains a dynamic priority which is usually the same as the static priority.  At times, such as to prevent priority inversion or to minimize the running of a CPU hogging task, this dynamic priority is changed.  Ubix will implement 32 different priorities, 31 being the highest priority and 0 being the lowest.

State - Every task has a state that it can be in.  Also, processes have a state but there are fewer states that a process can be running in.  States are:

    STARTING - The task or process is in the process of being created.  Memory for it is being allocated.

    READY - The task or process is set to be scheduled for execution.

    RUNNING - The task or process is currently being run.  Once a process is first run after being started, it remains in the RUNNING state.

    SUSPEND - The scheduler has stopped the execution of the task or process to do some housekeeping work.

    SLEEP - (Task specific) A task has requested to be stopped for a period of time.

    BLOCK - (Task specific) A task is being stopped on a syncronization device, such as a mutex or semaphore.

    REPLY - (Task specific) A task has sent a syncronious message and is waiting for the response.

    WAIT - (Task specific) A task is listening for messages from other tasks.

    JOIN - (Task specific) A task is waiting for another task to complete.

    EXITING - The task or process is done and waiting for the scheduler to complete its housekeeping tasks.