|
|
Table 3.7 Instructions executed per operating system function [20]. |
| Operation | | | | | System call/return | | | | | Trap/interrupt | | | | | Page table entry change | | | | | Context switch | | | | |
|
|
|
|
|
|
interrupt or trap vector to determine which specific systems routine is to be called. |
|
|
|
|
|
|
|
|
The activity required to change a page table entry has been implied in our earlier discussion of the not-in-TLB operation (see section 1.7), and it depends on the TLB structure. It differs from other systems calls as it is not necessary to save and restore more than a relatively small number of registers to do the required address arithmetic. |
|
|
|
|
|
|
|
|
A context switch requires that new values be brought in for all registers. For a straightforward register set, context switch ought to require somewhat less work to process than a trap or interrupt, since the analysis of exceptional conditions is not required. However, for a system with multiple register sets (register windows), a context switch may require that all sets be saved and new values loaded for all of the multiple register sets. Table 3.7 shows a number of instructions executed for various operating system primitive functions [20]. |
|
|
|
|
|
|
|
|
Moreover, there are a number of trends in operating systems. A simple R+M machine such as the VAX executes between 9 and 14 instructions per systems call, while L/S machines execute many more (Table 3.7). Even though time does not scale with instruction count, this result is a source of concern. The reason for this is twofold: |
|
|
|
|
|
|
|
|
1. The VAX has a relatively simple register state. |
|
|
|
|
|
|
|
|
2. The VAX supports robust save and restore instructions. |
|
|
|
|
|
|
|
|
Our modern load/store machines have larger register spaces (Table 3.8), which must be saved and restored and generally support only simple call mechanisms, requiring software to manage the details of directing the system call to the correct system handler routine. Adding registers and/or multiple register sets may improve user state performance, but doing so may come at the expense of system performance. |
|
|
|
|
|
|
|
|
Moreover, modern operating systems are moving along interesting lines. Two particular developments are certain to affect processor performance in the future. These are: |
|
|
|
|
|
|
|
|
1. The client/server model. |
|
|
|
|
|
|
|
|
2. Partitioning the operating system into multiple threads. |
|
|
|
|
|
|
|
|
The client/server model is a form of distributed operating system particularly well suited for multiple processors on a network system. It basically |
|
|
|
|
|