正在加载图片...
pplication. with several threads of control operating simultaneously, it is not simply a matter of stepping through the program line by line to find a mistake. Most often, it is the interaction between threads that is the Multithreading a program may not be a trivial matter. As with most types of programming, however, experience makes the process easier. The benefit is significantly enhanced performance 96.6 Real-Time Systems Real-time systems are those that guarantee that the system will respond in a predetermined amount of time We use real-time systems when, for example, computers control an assembly line or run a flight simulator. In such an environment we define an action that must occur and a deadline by which we wish that action to take place. On an assembly line an event may occur, such as a part arriving at a station, and an action, such as painting that part. The deadline we impose will be based on the speed of the assembly line. Obviously, we must int the part before it passes to the next station. This is called a hard real-time system because the syste lust meet a strict deadline Another class of system is termed soft real-time. These are environments in which response time is important but the consequences are not as serious as, for example, on an assembly line. Airline reservation systems are in this category. Rapid response time to an event, such as an agent attempting to book a ticket, is and must be considered when the system performs other activities. One way of distinguishing hard and soft real-time systems is by examining the value of a response over time. For example, if a computer was controlling a nuclear reactor and the reactor began to overheat, the command to open the cooling valves has extremely high value until a deadline, when the reactor explodes. After that deadline, there is no value in opening the valves(see Fig 96.2) Relatively few events require that type of responsiveness. Most events have a deadline, but there continue to be value in responding to that event even past the deadline. In our airline reservation example, the airline may wish to respond to a customer request within, say, 10 seconds. However, if the response comes in 11 seconds, there is still value in the response. The value is lessened because the customer has become upset. As time increases, the customer becomes more and more upset and the value of responding decreases. We illustrate this in Fig. 96.3 96.7 Operating System Structure Operating systems are large, complex pieces of software. They must handle asynchronous events such as terrupts from I/O devices, control hardware memory management units(MMUs)to implement virtual mory, support multiple simultaneous users, implement complex network protocols, and much more. As with any software of this magnitude, an operating system is logically divided into smaller pieces. The structure f a typical modern operating system is depicted in Fig. 96.4 Deadline TIme FIGURE 96.2 Relative value of a response over time in FIGURE 96.3 Relative value of a response over time in e 2000 by CRC Press LLC© 2000 by CRC Press LLC application. With several threads of control operating simultaneously, it is not simply a matter of stepping through the program line by line to find a mistake. Most often, it is the interaction between threads that is the problem. Multithreading a program may not be a trivial matter. As with most types of programming, however, experience makes the process easier. The benefit is significantly enhanced performance. 96.6 Real-Time Systems Real-time systems are those that guarantee that the system will respond in a predetermined amount of time. We use real-time systems when, for example, computers control an assembly line or run a flight simulator. In such an environment we define an action that must occur and a deadline by which we wish that action to take place. On an assembly line an event may occur, such as a part arriving at a station, and an action, such as painting that part. The deadline we impose will be based on the speed of the assembly line. Obviously, we must paint the part before it passes to the next station. This is called a hard real-time system because the system must meet a strict deadline. Another class of system is termed soft real-time. These are environments in which response time is important, but the consequences are not as serious as, for example, on an assembly line. Airline reservation systems are in this category. Rapid response time to an event, such as an agent attempting to book a ticket, is important and must be considered when the system performs other activities. One way of distinguishing hard and soft real-time systems is by examining the value of a response over time. For example, if a computer was controlling a nuclear reactor and the reactor began to overheat, the command to open the cooling valves has extremely high value until a deadline, when the reactor explodes. After that deadline, there is no value in opening the valves (see Fig. 96.2). Relatively few events require that type of responsiveness. Most events have a deadline, but there continues to be value in responding to that event even past the deadline. In our airline reservation example, the airline may wish to respond to a customer request within, say, 10 seconds. However, if the response comes in 11 seconds, there is still value in the response. The value is lessened because the customer has become upset. As time increases, the customer becomes more and more upset and the value of responding decreases. We illustrate this in Fig. 96.3. 96.7 Operating System Structure Operating systems are large, complex pieces of software. They must handle asynchronous events such as interrupts from I/O devices, control hardware memory management units (MMUs) to implement virtual memory, support multiple simultaneous users, implement complex network protocols, and much more. As with any software of this magnitude, an operating system is logically divided into smaller pieces. The structure of a typical modern operating system is depicted in Fig. 96.4. FIGURE 96.2 Relative value of a response over time in a critical situation. FIGURE 96.3 Relative value of a response over time in a noncritical situation
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有