| Previous | Table of Contents | Next |
Figure 5.9 shows four examples of system objects. The space is the simplest system object, occupying just one segment. It only has a segment header, an EPA header, and a space for user data. An example of an object that occupies two segments is the independent index, usually just called an index. Its primary responsibility is to support the OS/400 user index. The base segment of the index contains a segment header, an EPA header, an index (customized) header, and a binary radix tree. In the next chapter, we will see how a binary radix tree is used to implement indexes in an AS/400. The second segment of the index is an associated space segment, meaning it has a segment header with the type byte set to indicate it is an associated space. This second segment also contains the user data for the index.
Figure 5.9 Examples of Objects
Two examples of objects that occupy three segments are also shown. The first is a program. The base segment of a program contains a segment header, an EPA header, a program (customized) header, the instruction stream, and the initialization code for the program. The second segment is an associated space segment that contains the user data for the program. The third segment is the materialization definition table (MDT) segment that contains the program template and the object mapping for the program. This third segment contains the information necessary to materialize the program. When a user chooses to delete observability, this third segment is eliminated, and the program occupies only two segments.
The last object shown is a data-space index. The base segment, like all others, contains a segment header, an EPA header, a data-space index (customized) header, the alternate collating sequence for this index, the index tables, and the binary radix tree. The second segment is again an associated space segment. Every system object, except the space, has an associated space segment as its second segment. The third segment is a delayed-maintenance segment.
One of the options available with a data-space index is to delay maintenance of the index. In other words, changes to the index, such as insert or remove a key, are not immediately applied. Instead, they are logged in the delayed-maintenance segment until the next time the file member is opened. Delayed maintenance eliminates the need to wait for the completion of maintenance operations while the index is being used. The updates, however, are applied before the index is used the next time.
Objects provide the means to manage and protect AS/400 system resources. Naming and addressing of nearly everything in the system are tied to objects. So is the system security. Objects are also used to efficiently share information among system users. Through object encapsulation and well-defined operations on these objects, the AS/400 achieves a level of technology independence and integrity unknown in other systems.
Objects are fundamental to the AS/400 design. They were not added on top of an existing design, as is so often the case with other systems. Objects have been a part of the AS/400 from the very beginning.
Many of the objects we have introduced in this chapter are used by the system components described in the rest of this book. In the next chapter, we look at the AS/400s integrated database. Many of the objects we have already seen are part of that database.
| Previous | Table of Contents | Next |