Understanding Jobs

Within the context of the Trace Analyzer, the term job refers to a unit of work which the program performs.  Examples of such work would be printing a report, or indexing the records in a trace file, or applying a data filter.  Generally speaking, tasks which meet the following criteria are managed as jobs: The following tasks are managed as jobs:

The Job Engine

Jobs are created as the result of some user action, such as loading a trace file, or initiating a search.  Upon creation, a job is submitted to a job engine for processing.  The job engine acts as a dispatcher for jobs;  its responsibilities are to: Once a job is submitted for processing as the result of a user action, such as the click of a button, the program is free to continue responding to the user's new requests, while the job engine does its work in the background.  In practice, complex or long running jobs may contend with the user interface for the CPU, even though they are running in the background.  This can cause a noticeable impact on the responsiveness of the user interface.

Job Conflicts

A job submitted for processing may be in conflict with the another active or queued job, due to:
  1. a conflict in the nature of the work performed;  or
  2. a conflicting dependency upon shared resources.
As an example of case 1 above, a job which is submitted to close a trace file has a conflicting goal with a job that is loading that file.  An example of case 2 above is a job which applies a new data filter to the current trace file, while another job is printing, or waiting to print, the currently loaded set of trace records.

When a job is submitted which results in such a conflict, the user is prompted to resolve the situation via the Job Conflict dialog window (see Figure 1).


Figure 1.  Job Conflict dialog window

This window presents information about the newly submitted job, as well as about any active or waiting jobs which would be preempted if the new job is allowed to continue.  The following actions can be taken to resolve the conflict:


How Multiple Jobs are Organized

Only one job is actively running in the job engine at any given time.  All other jobs must wait until the active job completes.  Jobs are sorted in a queue by the job engine in the order in which they are to be performed.  This is not necessarily the same order in which they were submitted, since some jobs by their nature must be performed before others, or will make others obsolete.  If there are any other jobs active or queued when a new job is submitted, the job engine must determine: Jobs are organized according to a priority scheme, in which different types of work are assigned different priorities.  In addition to its priority, an attribute of each job is its precedence with respect to other jobs;  in other words, how other jobs are affected when this job is submitted.  Table 1 summarizes the precedence assigned to the various job types used by the Trace Analyzer.  The table is organized in priority order by job type, with the highest (most urgent) priority job type first, descending to the lowest (least urgent) priority last.

Job Type Precedence Behavior
Exit Program Aborts all other jobs of lower or equal priority *;  becomes only job in system
Close Trace Aborts all other jobs of lower or equal priority *
Load Trace Aborts all other jobs of lower or equal priority *
Apply Data Filter Aborts all other jobs of lower or equal priority *
Find Record Aborts only other Find Record jobs *
Write Trace Aborts nothing;  queues among waiting jobs first by priority, then in order of submission (first in, first out)
Print Report(s) Aborts nothing;  queues among waiting jobs first by priority, then in order of submission (first in, first out)
Table 1.  Job precedence and priority
(* Indicates there can be only one job of this type at a time)


Copyright © 2000-2001 Golden Code Development Corporation.  ALL RIGHTS RESERVED.