| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
ST20-C1 Datasheet(PDF) 84 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 Datasheet(HTML) 84 Page - STMicroelectronics |
|
84 / 205 page ![]() 7.8 Scheduling kernels 84/205 ® The following code would set up a process control block: ld entry_point; ld control_block; stnl pw.Iptr; ld work_space_top; arot; stnl pw.Wptr; The process is then inactive, so it can be added to the back of the scheduling queue using run, exactly as in section 7.5. 7.8 Scheduling kernels A scheduling kernel can be written to override the default scheduling behavior of the ST20-C1, but still using the very fast micro-code scheduling. The basis of such a scheduler would be trap handlers to trap the system exceptions el_idle_trap, el_run_trap, el_stop_trap, el_timeslice_trap and el_schedule_exception_trap. When these traps are taken, a scheduling event is due or the processor has become idle. The trap replaces the default scheduling action. When the trap handler returns, the CPU will continue with the next instruction. Traps are described in Chapter 6. Additional system calls may be implemented by user-defined trap handlers, called using ecall. 7.9 Semaphores Semaphores are a mechanism for managing access to shared resources within a multi-tasking environment. The semaphore operations are provided by the instructions listed in Table 7.4. The semaphore instructions act on a semaphore control block, defined in Table 7.5. Each semaphore has a semaphore control block, which implements a linked list of waiting processes and a count of free resources. The count should be initialized to the total number of available resources (usually one), and the front list pointer should be initialized to the empty value NotProcess. For fast signalling and minimal interrupt latency, semaphore control blocks should be in fast memory, preferably on-chip. Mnemonic Name signal signal wait wait stop stop process run run process Table 7.4 Semaphore instructions Word offset Slot name Purpose 2 s.Back The back of the semaphore waiting list. 1 s.Front The front of the semaphore waiting list. 0 s.Count The unsigned number of extraprocesses that the semaphore will allow to continue running on a wait request. Table 7.5 Semaphore control block |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |