ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 82
![no-image](/images/no-image-200.jpg)
ST20-C1
Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
1.ST20-C1.pdf
(205 pages)
- Current page: 82 of 205
- Download datasheet (842Kb)
7.5 Inactive processes
7.5
An inactive process is a process that is waiting for some event to occur, such as a
process executing a run instruction or a peripheral completing a DMA. An inactive
process cannot continue even if the CPU is idle. Inactive processes are not polled, but
should be rescheduled by the event for which they are waiting.
A process becomes inactive by saving its own state and then executing the stop
instruction. stop automatically saves the Iptr and Wptr in the process control block.
The code should save the Tdesc in an appropriate place where the awaited event can
find it. The Tdesc points to the process control block. The Iptr is loaded onto the eval-
uation stack using ldpi , the Wptr using ldlp 0 and the Tdesc using ldtdesc . For
example:
Two mechanisms are provided for rescheduling inactive processes:
The run instruction takes a task descriptor in Areg and adds the process control block
to the back of the scheduling queue. For example:
Inactive processes may need to be queued, for example while waiting for a sema-
phore. The semaphore queue handling is incorporated into the signal and wait instruc-
tions, but for other queues the instructions enqueue and dequeue are needed.
Enqueue will add a process to the back of an arbitrary queue, and dequeue will take a
process from the front of the queue.
7.6
When a process restarts after an interrupt or trap, the entire state is loaded from the
saved state. However, when the process starts or restarts after being descheduled,
the CPU makes assumptions about the state of the process, since not all the state
was saved.
Wptr and Iptr are set to the values saved in pw.Wptr and pw.Iptr of the process
descriptor block.
The status register is set to the values shown in Table 7.3. The global interrupt enable
and timeslice enable are global status bits, and are carried over from one process to
the next when a context switch occurs.
82/205
Inactive processes
ldtdesc; ld tdesc_save_address; stnl 0;
stop;
Executing the run instruction. This allows other processes to reschedule an
inactive process. For example, this is used when semaphore signalling to a
waiting process and could be used by other communications, possibly imple-
mented by an operating system.
Scheduling an exception. This allows external devices to reschedule an inac-
tive process. For example, this is used by DMA peripherals to wake a process
waiting for the DMA to complete. Exception scheduling is described in section
4.11.
ld task_descriptor ; run;
Descheduled process state
Related parts for ST20-C1
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ST20](/images/no-image3.png)
Part Number:
Description:
ST20 software development and debugging tools
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
![ST20-SWC++/PC](/images/no-image3.png)
Part Number:
Description:
C++ preprocessor for ST20 and T4/T8 transputers
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
![ST20-JPI110](/images/no-image3.png)
Part Number:
Description:
PC PARALLEL PORT TO JTAG INTERFACE
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
![ST20-PPI110](/images/no-image3.png)
Part Number:
Description:
PC PARALLEL PORT TO OS-LINK INTERFACE
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
![st20-gp1](/images/manufacturer_photos/0/6/637/stmicroelectronics_tmb.jpg)
Part Number:
Description:
Gps Processor
Manufacturer:
STMicroelectronics
Datasheet:
![st20-gp6](/images/manufacturer_photos/0/6/637/stmicroelectronics_tmb.jpg)
Part Number:
Description:
Gps Processor
Manufacturer:
STMicroelectronics
Datasheet:
![TYN058](/images/no-image3.png)
Part Number:
Description:
THYRISTORS
Manufacturer:
ST Microelectronics
Datasheet:
![ST755](/images/no-image3.png)
Part Number:
Description:
ADJUSTABLE INVERTING NEGATIVE OUTPUT CURRENT MODE PWM REGULATORS
Manufacturer:
ST Microelectronics
Datasheet:
![P0102BL5AA4](/images/no-image3.png)
Part Number:
Description:
0.25A SCRs
Manufacturer:
ST Microelectronics
Datasheet:
![P0102DN5AA4](/images/no-image3.png)
Part Number:
Description:
0.8A SCRs
Manufacturer:
ST Microelectronics
Datasheet:
![ST19AF08](/images/no-image3.png)
Part Number:
Description:
Smartcard MCU With 4 additional I/0
Manufacturer:
ST Microelectronics
Datasheet:
![ST24C02](/images/no-image3.png)
Part Number:
Description:
SERIAL 2K (256 x 8) EEPROM
Manufacturer:
ST Microelectronics
Datasheet:
![P10NB50FP](/images/no-image3.png)
Part Number:
Description:
Search -----> STP10NB50FP
Manufacturer:
ST Microelectronics
Datasheet:
![P12NB30](/images/no-image3.png)
Part Number:
Description:
Search ---> STP12NB30
Manufacturer:
ST Microelectronics
Datasheet:
![P13NK50Z](/images/no-image3.png)
Part Number:
Description:
Search -----> STP13NK50Z
Manufacturer:
ST Microelectronics
Datasheet: