Changes between Version 2 and Version 3 of CapabilitiesAndScheduling


Ignore:
Timestamp:
May 19, 2006 1:37:02 PM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CapabilitiesAndScheduling

    v2 v3  
    164164}}} 
    165165 
     166 
     167  Question - if a capability can consist of multiple OS threads then in THREADED_RTS, where is the list of current threads in execution?  
     168 
     169Here are some important observations about a capability: it consists of essentially a collection of OS threads, a register set and a set of TSOs. The resister set is the member of type 'r'. Real hardware may or may not provide mappings of these to actual registers. [Anything else to add here?]. 
     170 
     171TSO stands for Thread State Object and is the abstract for a haskell thread from the perspective of the RTS. TSO's are defined in TSO.h.  
     172 
     173{{{ 
     174typedef struct StgTSO_ { 
     175    StgHeader               header; 
     176 
     177    struct StgTSO_*         link;       /* Links threads onto blocking queues */ 
     178    struct StgTSO_*         global_link;    /* Links all threads together */ 
     179     
     180    StgWord16               what_next;      /* Values defined in Constants.h */ 
     181    StgWord16               why_blocked;    /* Values defined in Constants.h */ 
     182    StgWord32               flags; 
     183    StgTSOBlockInfo         block_info; 
     184    struct StgTSO_*         blocked_exceptions; 
     185    StgThreadID             id; 
     186    int                     saved_errno; 
     187    struct Task_*           bound; 
     188    struct Capability_*     cap; 
     189    struct StgTRecHeader_ * trec;       /* STM transaction record */ 
     190 
     191#ifdef TICKY_TICKY 
     192    /* TICKY-specific stuff would go here. */ 
     193#endif 
     194#ifdef PROFILING 
     195    StgTSOProfInfo prof; 
     196#endif 
     197#ifdef PAR 
     198    StgTSOParInfo par; 
     199#endif 
     200#ifdef GRAN 
     201    StgTSOGranInfo gran; 
     202#endif 
     203#ifdef DIST 
     204    StgTSODistInfo dist; 
     205#endif 
     206 
     207    /* The thread stack... */ 
     208    StgWord32          stack_size;     /* stack size in *words* */ 
     209    StgWord32          max_stack_size; /* maximum stack size in *words* */ 
     210    StgPtr             sp; 
     211     
     212    StgWord            stack[FLEXIBLE_ARRAY]; 
     213} StgTSO; 
     214}}} 
     215 
     216