13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TASK MANAGEMENTState Model of Task SchedulingThe role that the operating system must play in using the <strong>iAPX</strong> <strong>286</strong> task features is most convenientlyexpressed in terms of a state-transition model. To distinguish from the processing state of a task (asstored in the TSS), the term scheduling state is used here. Figure 4-2 illustrates the scheduling statesthat a task may assume and the events that may cause a change of state.A RUNNING task is the one that the processor is executing. A RUNNING task continues to executeuntil• It voluntarily gives up control because it needs to wait for some event, such as completion of anI/O operation, data from another program, or the end of a specific period of time.• It is preempted, i.e., forced to give up control. The interrupt mechanism may cause preemption inorder to execute an interrupt task, or the operating system may preempt periodically (via timerinterrupt) to give another task a chance to receive its share of the processor's attention.A WAITING task may be waiting for any of several events:• Completion of a request to the OS for I/O• A signal from another task• Data from another task• The end of a time-delay periodThe READY state is really a special case of the WAITING state. A READY task is waiting for onespecific event: the availability of a processor to execute it. A task becomes READY when first created.A WAITING task becomes READY upon occurrence of the event (or events) for which it is waiting.A RUNNING task becomes READY when preempted...INITIATE121960·22Figure 4-2. Scheduling State Transition Diagram4-5 121960·001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!