Table of Contents Previous Chapter ACIS

28.0 Software Housekeeper (36-53220 01)

28.1 Purpose

The Software Housekeeper provides the statistical repository for the various active tasks. Periodically it delivers the database to be telemetered, and begins a fresh accumulation of software data. This process is initiated during start-up and persists until CPU reset.

The frequency with which the housekeeper attempts to deliver packets will default to approximately one per minute. It is TBD whether the accumulation period may be varied by command. The same level of activity is generated in regular mode and low data mode.

28.2 Uses

  1. A method of acquiring reported statistical values

  2. A system for periodically delivering the accumulated statistics.

28.3 Organization

Figure 1 illustrates the relationship between the classes used by the Software Housekeeper.

FIGURE 126. Software Housekeeper Class Relationships


The Software Housekeeper uses the Executive, and Protocols, class categories.

SwHousekeeper - This class is a subclass of Executive::Task. It is responsible for accumulating and delivering software housekeeping statistics reported by other processes.

TfSwHouse - This class encapsulates the representation of a telemetry packet. It is a subclass of Protocols::TlmForm.

SystemClock - This class provides the Back End Processor tick count which is included with the Software Housekeeping Database. It is a subclass of Executive.

TaskMonitor - This class (not shown) is a subclass of Executive::Task. It is responsible for insuring that active tasks are responsive, (not subverted by an SEU, etc.).

28.4 Scenarios

28.4.1 Operational Overview

The Software Housekeeper task has a quiescent period during which statistics are accumulated. When activated, it initiates an attempt to obtain a fresh database; failing, it continues
accumulating into the current telemetry packet data array; succeeding, a fresh new array becomes available and the former packet is delivered to be telemetered.

Each of the statistics are comprised of two items; the number of times each entry was reported during the period, and an associated value. An enumerated list is used to specify the data items reported. The accumulating process will increment the count of occurrences in the first item of the two item data structure installed at the enumerated database location as each incident is deposited. The associated values' meaning and representation is entirely application dependent. It is stored as an unsigned integer.

Any process may be a client of the software housekeeper. It is the clients responsibility to
deliver whichever statistical data are desired. The housekeeper does not solicit items to be included in the statistics.

28.4.2 Use 1::A method of acquiring reported statistical values

Figure 127 illustrates the operation of the Software Housekeeper data accumulation process.

FIGURE 127. Software Housekeeper Accumulation


  1. During the system initialization when the constructor, SwHousekeeper(), is created, TfSwHouse::setupBuffer() is called to provide the first packet buffer. After the TfSwHouse pointer currentPtr has been associated with the packet, statistics may be accumulated into the buffer.

  2. The software housekeeper thread, goTaskEntry(), contains an infinite loop during which it waits in intervalWait() (not shown) while statistical data accumulates, then delivery of the housekeeping database packet is initiated.

  3. The client task, any active software process, may deposit information whenever necessary, or desirable using SwHousekeeper::report().

  4. The software housekeeper will initiate storage of information into the database using TfSwHouse::accumulateStat(). Normally, each process will store in the structure location allotted to it; however, several processes may employ the same structure location to record information.

  5. Meanwhile, the TaskMonitor, on its own schedule, will query the software housekeeper to determine if it is viable. During its accumulation period the housekeeper would reply using TaskMonitor::respond().

28.4.3 Use 2:: A system for periodically delivering the accumulated statistics

Figure 128 illustrates the operation of the Software Housekeeper packet delivery process.

FIGURE 128. Software Housekeeper Delivery of Statistics


  1. The software housekeeper thread, goTaskEntry(), associates the pointer, nextPtr with the packet instance-in-waiting. During operation, the software housekeeper will alternate between this packet instance and the instance currentPtr associated in the constructor. The software housekeeper then enters an infinite loop during which data accumulates and delivery of the housekeeping database packet is initiated.

  2. At the end of the accumulation period, the housekeeper uses SystemClock::currentTime() to obtain the current BEP tick count to be inserted into the replacement packet header.

  3. Then the housekeeper will attempt to acquire a replacement packet buffer to hold the database for the next period using TfSwHouse::setupBuffer(), passing the BEP time as the argument.

  4. Should another buffer not be available, software statistics will continue to accumulate in the current packet buffer. The housekeeper will record the incident in the database using its own report() function. With a replacement buffer acquired, the software housekeeper will swap the pointers, making the new packet buffer the target for accumulating statistics.

  5. With a fresh packet database buffer in place and accumulating statistics, the housekeeper will deliver the loaded packet using the inherited function TlmForm::post().

28.5 Class SwHousekeeper

Documentation
The SwHousekeeper periodically initiates telemetering of accumulated statistical data provided by various software elements. During the normal course of their operation, the software tasks, which are intended to provide statistics, will call the software housekeeper and deliver the pertinent data which will be installed into the software housekeeping data structure. Periodically, the housekeeper will attempt to obtain a packet buffer for the replacement database. Failing, it will report the incident, and continue to accumulate in the current database. Succeeding, it will swap databases, initiate delivery of the acquired data to the telemetry service, and begin a new accumulation period.
Export Control: Public
Cardinality: 1
Hierarchy
Superclasses: Task
Public Interface
Operations:

SwHousekeeper()

goTaskEntry()

report()
Private Interface
Operations

intervalWait ()
Has-A Relationships:

TfSwHouse formSwHOne: This is an instance of a software housekeeping packet. A packet buffer will be associated with this instance.

TfSwHouse formSwHTwo: This is an instance of a software housekeeping packet. A packet buffer will be associated with this instance.

TfSwHouse *currentPtr: This pointer is used to indicate which software housekeeping packet is currently available to be filled with data

const unsigned accumInterval: This variable contains time, in telemetry science frames (about 2.5 seconds), over which to accumulate software housekeeping statistics. If telemetry resources are available, one housekeeping packet will be sent after each interval. The interval duration is TBD.
Concurrency: Active
Persistence: Persistent

28.5.1 SwHousekeeper()

Public member of: SwHousekeeper
Arguments

unsigned taskId :: Identifies the task being constructed.
Documentation
The SwHousekeeper() constructor initiates acquisition of the first software housekeeping statistics database packet.
Preconditions
It is expected that, functions which provide a telemetry packet will be in place when this function is constructed.
Semantics
SwHousekeeper() uses TfSwHouse.setupBuffer(), which acquires the packet buffer. The Buffer MUST be obtained!
Concurrency: Guarded

28.5.2 goTaskEntry()

Public member of: SwHousekeeper
Return Class: void
Documentation
goTaskEntry() is the initiation point for the software housekeeper. On a regular basis, it initiates dispatch of the accumulated housekeeping statistics being telemetered.
Preconditions
The constructor for SwHousekeeper() has initiated the first packet.
Semantics
On start-up, goTaskEntry() associates a pointer with the second TfSwHouse software housekeeping packet. It then enters a FOREVER loop, and remains inactive in intervalWait() for a fixed time period (accumInterval) during which statistics are accumulated into the telemetry buffer. When activated, it initiates an attempt to obtain a replacement empty telemetry packet buffer. If it is successful, it will switch packet buffer pointers and begin accumulating into the fresh packet buffer database and post the prior, loaded database by utilizing the inherited function TlmForm::post(). Otherwise, it will record the condition using SwHousekeeper::report() to record a skipped software housekeeping packet delivery (statistic), before continuing accumulation in the same packet during the ensuing interval.
Post Conditions
This procedure never returns.
Concurrency: Guarded

28.5.3 intervalWait()

Private member of: SwHousekeeper
Return Class: void
Documentation
intervalWait() idles the process for a predefined period. During this interval, housekeeping reports are filed by various entities. Also, during this accumulation period, intervalWait() will respond to taskMonitor() interrogations.
Semantics
intervalWait() idles in waitForEvent() while it waits for the monitor (are you alive) interrogation events or for accumInterval number of Science Frame pulse timing tick events. It will respond to the interrogation and will count the requisite number of pulses before returning.
Concurrency: Guarded

28.5.4 report()

Public member of: SwHousekeeper
Return Class: void
Arguments

SwStatistic statisticId :: Identifies the statistic being recorded.

unsigned value :: Contains a (possibly irrelevant) associated value.
Documentation
report() is the vehicle provided to accumulate the referenced statistics which the software housekeeper will deliver.
Semantics
It verifies that the statisticId is within range, and hands-off the values to TfSwHouse.accumulateStat() which will accumulate occurrences of the referenced statistic and record its associated value. With some statistics, the count of happenings is most significant; with others, the most recently recorded associated value is most important.
Concurrency: Synchronous

Table of Contents Next Chapter