Overview
This tool mentor is applicable when running Microsoft Windows 98/NT 4.0.
Tool Steps
To distribute capsules across threads in Rose RealTime:
-
Identify processes and threads
-
Design the structure
Rose RealTime uses three mechanisms to deal with concurrency:
-
Processes, which are heavyweight active objects with a high context switching overhead
-
Threads and tasks, which are lightweight context switching mechanisms
-
Capsules, which are very lightweight active objects with very low context switching overhead
With Rose RealTime, capsules are active objects that can be allocated to operating system threads. These active objects
are scheduled using an active object scheduling mechanism, which minimizes context switching overhead. In some cases,
it may be necessary to distribute capsules across threads and processes.
For additional information on how to design with active objects, see Tool Mentor: Designing with Active Objects in Rational Rose RealTime.
The steps for designing the physical and logical structure vary, depending upon which language you are using (C, C++,
or Java).
Designing the structure using C or C++
-
Add the frame service port to the container capsule.
-
Define the sub-capsule.
-
Make the sub-capsule optional.
-
Determine the logical thread.
-
Define the physical thread.
-
Map the logical thread to the physical thread.
-
Incarnate the capsule on a logical thread.
For additional information on designing
the structure with C or C++, refer to the Rational Rose RealTime C Reference or C++ Reference guide.
Designing the structure using Java
-
Add the frame service port to the container capsule.
-
Make the sub-capsule optional.
-
Create a new controller and thread.
-
Incarnate the capsule on a new controller.
For additional information on designing
the structure with Java, refer to Rational Rose RealTime Java Reference guide.
|