Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tool Mentor: Capturing a Concurrency Architecture using Rational Rose RealTime

Purpose

This tool mentor describes how to distribute capsules across threads.

This section provides links to additional information related to this tool mentor.

Overview

This tool mentor is applicable when running Microsoft Windows 98/NT 4.0.

Tool Steps

To distribute capsules across threads in Rose RealTime:

  1. [Identify processes and threads](#Identify processes and threads)
  2. [Design the structure](#Design the structure)

1. Identify processes and threads

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.

2. Design the structure

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++

  1. Add the frame service port to the container capsule.
  2. Define the sub-capsule.
  3. Make the sub-capsule optional.
  4. Determine the logical thread.
  5. Define the physical thread.
  6. Map the logical thread to the physical thread.
  7. 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

  1. Add the frame service port to the container capsule.
  2. Make the sub-capsule optional.
  3. Create a new controller and thread.
  4. Incarnate the capsule on a new controller.

For additional information on designing the structure with Java, refer to Rational Rose RealTime Java Reference guide.