(1) A virtual processor represents a logical resource that is capable of scheduling and executing threads and other virtual processors bound to them. Virtual processors can be declared as a subcomponent of a processor or another virtual processor, i.e., they are implicitly bound to the processor or virtual processor they are contained in. Virtual processors can also be declared separately, that is as a subcomponent of a system component, and explicitly bound to a processor or virtual processor. This allows virtual processors to represent hierarchical schedulers that schedule thread and/or virtual processors bound to them. In a fully bound system every virtual processor and thread is eventually bound to a physical processor.
Legality Rules
Category |
Type |
Implementation |
virtual processor |
Features: · provides subprogram access · provides subprogram group access · port · feature group · feature Flow specifications: yes Modes: yes Properties: yes |
Subcomponents: · virtual processor · virtual bus · abstract Subprogram calls: no Connections: yes Flows: yes Modes: yes Properties: yes |
(L1) A virtual processor component type can contain port, feature group, provides subprogram access, and subprogram group access declarations. It may contain flow specifications, a modes subclause, as well as property associations.
(L2) A virtual processor component implementation can contain declarations of virtual bus, virtual processor, and abstract subcomponents.
(L3) A virtual processor implementation can contain a modes subclause, flows subclause, and a properties subclause.
(L4) A virtual processor implementation must not contain a subprogram calls subclause.
(L5) A virtual processor implementation can contain subprogram access, subprogram group access, port, feature, and feature group connections.
Consistency Rules
(C1)In a fully bound system every virtual processor must be directly or indirectly bound to, or directly or indirectly contained in a physical processor.
(C2)In a fully deployed system a requires virtual bus binding of a virtual processor specified by the Required_Virtual_Bus_Class property must be satisfied by binding the virtual processor to a virtual processor or processor that provides this virtual bus. It is also satisfied if the virtual processor is contained in a processor and the respective virtual bus is bound to the processor.
Standard Properties
-- Properties related to source text that provides thread scheduling services
Source_Text: inherit list of aadlstring
Source_Language: inherit list of Supported_Source_Languages
Source_Code_Size: Size
Source_Data_Size: Size
Source_Stack_Size: Size
Allowed_Memory_Binding_Class:
inherit list of classifier (memory, system, processor)
Allowed_Memory_Binding: inherit list of reference (memory, system, processor)
Actual_Memory_Binding: inherit list of reference (memory)
Allowed_Processor_Binding_Class:
inherit list of classifier (processor, virtual processor, system)
Allowed_Processor_Binding: inherit list of reference (processor, virtual processor, system)
Actual_Processor_Binding: inherit list of reference (processor, virtual processor)
-- Virtual processor initialization properties
Startup_Execution_Time: Time_Range
Startup_Deadline: Time
-- Properties specifying provided thread execution support
Thread_Limit: aadlinteger 0 .. Max_Thread_Limit
Allowed_Dispatch_Protocol: list of Supported_Dispatch_Protocols
Allowed_Period: list of Time_Range
Scheduling_Protocol: inherit list of Supported_Scheduling_Protocols
Slot_Time: Time
Frame_Period: Time
-- acceptable priority value on threads and mapping into RTOS priority values
Priority_Range: range of aadlinteger
Priority_Map: list of Priority_Mapping
Process_Swap_Execution_Time: Time_Range
Thread_Swap_Execution_Time: Time_Range
Supported_Source_Language: list of Supported_Source_Languages
-- Properties of the dispatch characterstics of this virtual processor
Period: inherit Time
Dispatch_Protocol: Supported_Dispatch_Protocols
Execution_Time: Time
-- Protocol support
Provided_Virtual_Bus_Class : inherit list of classifier (virtual bus)
Provided_Connection_Quality_Of_Service : inherit list of Supported_Connection_QoS
-- mode related properties
Resumption_Policy: enumeration ( restart, resume )
Deactivation_Policy: enumeration (inactive, unload) => inactive
-- need for and
provision of address space protection
Runtime_Protection : inherit aadlboolean
Runtime_Protection_Support : aadlboolean
-- Virtual machine layering
Implemented_As: classifier ( system implementation )
NOTES:
The above is the list of the predefined virtual processor properties. Additional processor properties may be declared in user-defined property sets. Candidates include properties that describe capabilities and accuracy of a synchronized clock, e.g., drift rates, differences across processors.
Semantics
(2) A virtual processor is the logical execution platform component that is capable of scheduling and executing threads and other virtual processors. Threads and virtual processors will be bound to a virtual processor or processor for their execution. The Allowed_Dispatch_Protocol property specifies the dispatch protocols that a virtual processor supplies, i.e., only threads or virtual processors whose dispatch protocol is supported can be bound.
(3) Support for thread execution may require software that implements virtual processor functionality such as thread scheduling, e.g., an operating system kernel or other software virtual machine. Such software must be bound to a memory component that is accessible to the processor via the Actual_Memory_Binding property. Services provided by such software can be called through the provides subprogram access features of a virtual processor.
(4) A virtual processor component can include protocols in its abstraction. These protocols can be explicitly modeled as virtual bus subcomponents to satisfy protocol requirements by connections. The fact that a protocol is supported by a virtual processor can also be specified by a Provided_Virtual_Bus_Class property.
(5) A virtual processor can be declared as a subcomponent of a processor or another virtual processor; it can also be declared separately in a system component and then bound to a processor or another virtual processor. The difference between the two uses of virtual processor is that in the case of the subcomponent of a processor or virtual processor the binding of the virtual processor is implicit in the containment relationship.
(6) Flow specifications model logical flow through virtual processors. For example, they may represent requests for operating system services through subprograms or ports.
(7) Modes allow virtual processor components to have different property values under different operational virtual processor modes. Modes may be used to specify different runtime selectable configurations of virtual processor implementations.
(8) Virtual processor states and transitions are illustrated in the hybrid automaton shown in Figure 10. The hybrid automaton of a virtual processor interacts with the hybrid automaton of the processor or virtual processor that it is bound to. A virtual processor is permitted to initialize itself after the processor and any virtual processors are initialized, and before any processes or threads are initialized. Similarly, virtual processors are stopped after threads, processes, and virtual processors contained in them are stopped.
Figure 10 Virtual Processor States and Actions
(9) The virtual processor is an logical abstraction of a processor. If it is desirable, the internals of the virtual processor can be modeled by AADL as an application system in its own right. For example, a virtual processor may represent an operating system that can be described in terms of processes and threads. This system implementation description can be associated with the device component declaration by the Implemented_As property (see Section 14).