5.5      Thread Groups

(1)   A thread group represents an organizational component to logically group threads contained in processes.  The type of a thread group component specifies the features and required subcomponent access through which threads contained in a thread group interact with components outside the thread group.  Thread group implementations represent the contained threads and their connectivity.  Thread groups can have multiple modes, each representing a possibly different configuration of subcomponents, their connections, and mode-specific property associations.  Thread groups can be hierarchically nested.

(2)   A thread group does not represent a virtual address space nor does it represent a unit of execution.  Therefore, a thread group must be directly or indirectly contained within a process.

Legality Rules

Category

Type

Implementation

thread group

Features:

·         port

·         feature group

·         provides data access

·         requires data access

·         provides subprogram access

·         requires subprogram access

·         provides subprogram group access

·         requires subprogram group access

·         feature

Flow specifications: yes

Modes: yes

Properties: yes

Subcomponents:

·         data

·         subprogram

·         subprogram group

·         thread

·         thread group

·         abstract

Subprogram calls: no

Connections: yes

Flows: yes

Modes: yes

Properties: yes

 

(L1)      A thread group component type can contain provides and requires data access, as well as port, feature group, provides and requires subprogram access declarations, and provides and requires subprogram group access declarations.  It can also contain flow specifications, modes subclauses, and property associations.

(L2)      A thread group component implementation can contain abstract, data, subprogram, subprogram group, thread, and thread group subcomponent declarations.

(L3)      A thread group implementation can contain a connections subclause, a flows subclause, a modes subclause, and properties subclause.

(L4)      A thread group must not contain a subprogram calls subclause.

Standard Properties

-- Properties related to source text
Source_Text: inherit list of aadlstring
-- Inheritable thread properties
Synchronized_Component: inherit aadlboolean => true
 
Active_Thread_Handling_Protocol: 
   inherit Supported_Active_Thread_Handling_Protocols => abort
Period: inherit Time
Deadline: inherit Time => Period
Dispatch_Offset: inherit Time
First_Dispatch_Time : inherit Time
-- Scheduling properties
Priority: inherit aadlinteger
Time_Slot: list of aadlinteger 
Criticality: aadlinteger
-- execution time related properties
Reference_Processor: inherit classifier ( processor )
-- mode related properties
Resumption_Policy: enumeration ( restart, resume )
-- startup properties
Startup_Deadline: Time
Startup_Execution_Time: Time_Range
-- Properties specifying constraints for processor and memory binding
Allowed_Processor_Binding_Class: 
   inherit list of classifier (processor, virtual processor, system)
Allowed_Processor_Binding: inherit list of reference (processor, virtual processor, system)
Allowed_Memory_Binding_Class: 
   inherit list of classifier (memory, system, processor)     
Allowed_Memory_Binding: inherit list of reference (memory, system, processor)
 
Actual_Processor_Binding: inherit list of reference (processor, virtual processor)
Actual_Memory_Binding: inherit list of reference (memory)
Allowed_Connection_Binding_Class: 
   inherit list of classifier(processor, virtual processor, bus, virtual bus, device, memory)
Allowed_Connection_Binding: inherit list of reference (processor, virtual processor, bus, virtual bus, device, memory)
Actual_Connection_Binding: inherit list of reference (processor, virtual processor, bus, virtual bus, device, memory)
 

NOTES:

Property associations of thread groups are inheritable (see Section 11.3) by contained subcomponents. This means if a contained thread does not have a property value defined for a particular property, then the corresponding property value for the thread group is used.

Semantics

(3)   A thread group allows threads contained in processes to be logically organized into a hierarchy.  A thread group type declares the features and required subcomponent access through which threads contained in a thread group can interact with components declared outside the thread group.

(4)   Thread groups may contain subprogram subcomponents and subprogram groups  The code of such subprograms and subprogram groups resides in the address space of the containing process.  The subprograms may be called by threads contained in the thread group.  The subprograms may also be called from outside the thread group if made accessible through a provides subprogram access declaration or subprogram group access declaration. 

(5)   Thread groups may contain data components.  They represent state that may be shared between threads inside the thread group through access connections to the requires data access features of those threads, and shared outside the thread group through provides data access features of the thread group.

(6)   A thread group implementation contains threads and thread groups.  Thread group nesting permits threads to be organized hierarchically.  A thread group implementation also contains connections to specify the interactions between the contained subcomponents and modes to represent different configurations of subsets of subcomponents and connections as well as mode-specific property associations.