<< Prev | - Up - | Next >> |
Property
The Property
module provides operations to query and possibly update Mozart system-related parameters that control various aspects of the Mozart engine and system modules.
The most important properties can be controlled graphically by means of the Mozart Panel, which is described in ``Oz Panel''.
The properties are accessible to the programmer by operations resembling the operations on dictionaries: Property.put
sets a property, whereas Property.get
and Property.condGet
access properties. The operations are described here in more detail.
The properties that control the Mozart engine are identified by atoms. For example, the current number of runnable threads is identified by the atom 'threads.runnable'
. That is,
{Property.get 'threads.runnable'}
returns the number of currently runnable threads as an integer.
For convenience, most properties are organized into groups. A group is accessed by an atom giving the group's name ('threads'
, for example), and it returns a record containing the properties of that group. For example,
{Property.get 'threads'}
returns a record that has several features one of which is 'runnable'
.
Some properties are read-only. They provide access to statistical information (as the property 'threads.runnable'
in our previous example), but cannot be used to update that information. Other properties are mutable: changing their values customizes the engine's behaviour. For example, the property 'threads.medium'
gives the ratio between the number of time slices available for threads of priorities medium
and low
. This can be changed to 2:1 by:
{Property.put 'threads.medium' 2}
Property.put
supports groups as well. For example, to customize time slices for threads of all priorities, we can do:
{Property.put 'threads' foo('medium': 2
'high': 2)}
The record's label is not significant.
All properties are listed in the following sections, which are sorted by group.
get
{Property.get
+LI
X
}
Returns the property stored under the key LI
(a literal or an integer). Raises an exception, if no property with key LI
exists.
condGet
{Property.condGet
+LI
X
Y
}
Returns the property stored under the key LI
(a literal or an integer). If no property with key LI
exists, X
is returned.
put
{Property.put
+LI
X
}
Stores the property X
under key LI
(a literal or an integer). Raises an exception, if the property is read-only.
<< Prev | - Up - | Next >> |