diff --git a/docs/arch/scheduler b/docs/arch/scheduler index 745a185..942e1d9 100755 --- a/docs/arch/scheduler +++ b/docs/arch/scheduler @@ -12,6 +12,28 @@ 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. +