[CSE]  Advanced Operating Systems 
 COMP9242 2002/S2 
UNSW

PRINTER Printer-Friendly Version
Administration               
- Notices
- Course Intro
- Consultations
# On-line Survey (closed)
- Survey Results
 
Work
- Lectures
- Milestone 0
- Project Admin
- Project Spec
- Project FAQ
- Exam
 
Documentation
- ASysT Lab
- L4 source browser
- Sulima ISA Simulator
R4x00 ISA Summary 
MIPS R4700 ReferenceMIPS R4000 User Manual 
- Network Driver
- GT64111
 
Related Info
- Aurema OS Prize
- OS Hall of Fame
 
History
- 2000
- 1999
- 1998
 
Staff
- Gernot Heiser (LiC)

 
Valid HTML 4.0!
next up previous
Next: Release CPU: thread_switch System Up: 01-l4 Previous: Details of task_new Operation

Thread Manipulation: lthread_ex_regs System Call

  • Task has a fixed number (128) of threads, initially all but one inactive.
  • Thread is activated by supplying a valid IP and SP.
    • Thread inherits pager, excepter from activating thread.
  • lthread_ex_regs() sets new and returns previous values for
    instruction pointer (IP), stack pointer (SP), exception handler, pager.
  • Supplying invalid value (-1) to any of those retains original setting.

    Can be used for:

    • performing a user-level thread switch
      (exchanging registers of running thread with saved ones);
    • saving thread's context (by supplying only invalid parameters).
  • Call terminates any pending or ongoing IPC.
Note: A thread cannot be ``deleted'', it is stopped by blocking.



Gernot Heiser 2002-08-07