Chapter 3: Automating Communication Architecture Maintenance
3.2 Bi-Architecture Model
3.3.3 Consecutive Commands by a Single User
So far, we have assumed that a user enters a command when the system is in a quiescent state. In this section, we relax this assumption by considering the case when a user enters a command before all usersβ devices have completed the processing and transmission tasks of all commands entered previously by the user. Thus, we are considering the case
107
when think times are low or there is type-ahead and only one user is entering commands. In this case, a command may arrive at a computer early, that is, before the computer has
completed the processing and transmission tasks of a previous command. When this happens, the new command must wait until the computer completes the transmission and processing task of the previous commands. Hence, the analysis presented so far does not apply because a command can be delayed on a userβs computer for longer than the time accounted for in the above response time equations. We next present an analysis that accounts for this additional delay. We present first the analysis for input commands entered by a master user in the replicated architecture.
Replicated Local Response Time
Consider first the local response times of commands entered by a master user. The response time equation for the first command π entered by master π user when the system is in a quiescent state is repeated from above
ππππππ πΈπ,π,π = ππππ β π₯πΆπππ,ππΌπ + ππ,ππΌπ + ππ,ππππ
Suppose that user π enters command π + 1π‘π+1 time after entering command π and that π‘π+1 < ππππ β π₯πΆππ π,ππΌπ + ππ,ππΌπ + ππ,ππππ. Therefore, after command π + 1 arrives, the CPU on userjβs computer still requires ππππ β π₯πΆππ π,ππΌπ+ ππ,ππΌπ + ππ,ππππ β π‘π+1 time to complete the transmission and processing tasks of command π. The response time of command π + 1 includes this additional delay, and is given by
ππππππ πΈπ,π+1,π = ππππ β π₯πΆππ π,ππΌπ + ππ,ππΌπ + ππ,ππππ β π‘π+1+ ππππ β π₯πΆππ π+1,ππΌπ + ππ+1,ππΌπ + ππ+1,ππππ Suppose that user π enters command π + 2π‘π+2 time after entering command π. If the command is entered after userjβs computer completes all tasks for command π, this is the
computer is still carrying out tasks for command π, then the local response time of command
π + 2 includes the time the computer requires to complete the tasks for command π, ππππ β
π₯πΆππ π,ππΌπ+ π
π,ππΌπ + ππ,ππππ β π‘π+2, plus the time it requires to complete the tasks for command
π + 1, ππππ β π₯πΆππ π+1,ππΌπ + ππ+1,ππΌπ + ππ+1,ππππ, plus the time it requires to perform the task for command π + 2, ππππ β π₯πΆππ π+2,ππΌπ + ππ+2,ππΌπ + ππ+2,ππππ . More generally, the local response time of command π + π§ entered π‘π+π§ time after the CPU on userjβs computer begins transmitting
command π but before it completes processing command π is given by
ππππππ πΈπ,π+π§,π = ππππ β π₯πΆππ π,ππΌπ + ππ,ππΌπ + ππ,ππππ π+π§
π=π
β π‘π+π§
As described above, userjβs computerβs destination delay for command π entered in a
quiescent state is equal to ππππ β π₯πΆππ π,ππΌπ + ππ,ππΌπ+ ππ,ππππ. Therefore, the above equation can be stated equivalently as
ππππππ πΈπ,π+π§,π = πππ π‘(π, π)
π+π§
π=π
β π‘π+π§
Replicated Remote Response Times
The remote response time analysis is more complicated. The reason is that a command may arrive early at more than one computer from the path to the destination. In particular, even if userj enters command π + 1 after the computer π completed the tasks for
command π, an intermediate or the destination computer may not have completed tasks for command π by the time command π + 1 reaches it. To illustrate how this can happen, consider the remote response times of userb for command π + π§ entered by userj. Let
109
takes the longest to perform tasks of commands. We call ο°π the critical computer on the path. If ο°π is idle when command π + π§ reaches it, then all computers must be idle when the
command reaches them. Therefore, response times reduce to those of commands entered in a quiescent state. Thus, we consider the case when ο°π is busy performing tasks for previous commands when command π + π§ reaches it. Let command π entered by userj be the last
command that ο°π received when it was in an idle state. Since it was idle when command π reached it, then all computers were idle when the command reached them; otherwise, ο°π would not be the critical computer on the path. Moreover, command π + π§ reaches all computers downstream from ο°π when they are in an idle state; otherwise, again, ο°π would not be the critical computer on the path.
Figure 3-5. Critical computer on path from source to destination. time Source ο°1 i i+1 cmd i, i+1, and i+2 i+2 ο°3 ο°4 Destinationο° 5 ο°2 i i+1 i+2 i i+1 i+2 i i+1 i+2 i i+1 i+2 ti+z Time cmd i takes to reach ο°3 Time ο°3 takes perform tasks for cmds i to i+1 and transmit i+2 to ο°5 Time cmd i+2 takes to reach ο°5 from ο°3
We illustrate the notion of a critical computer through an example of a path of length five shown in Figure 3-5. As Figure 3-5 shows, three commands, π, π + 1, and π + 2, are entered consecutively. The total transmission and processing time for each for each
command on the five computers is shown by the sizes of the boxes in the diagram. The total times spent on a command by each computer ordered from lowest to highest are ο°1 < ο°2 =
ο°4 <ο°5 < ο°3. As Figure 3-5 shows, the source user inputs commands quicker than the source computer ο°1 can complete the transmission and processing tasks. Hence, commands arrive early at the source computer. Since ο°2, the next computer on the path, takes longer to complete the tasks for each command, they arrive early also at ο°2. Since ο°3 is takes even longer than ο°2 the second computer, they also arrive early at ο°3. However, they do not arrive early at ο°4 and ο°5, the destination computer. The reason is that these computers are able to complete the tasks for each command faster than ο°3 the third computer. Hence, in this case,
ο°3 is the critical computer.
We can use the notion a critical computer to derive the remote response time of command π + π§. The critical computer may be an intermediate computer or the destination computer. When it is an intermediate (destination) computer, then userbβs remote response
time of command π + π§ is equal to 1) the amount of time that elapses from the moment command π is entered to the moment it reaches the critical computer, 2) plus the amount of time that elapses from the moment the critical computer receives command π to the it transmits command π + π§ to the next computer on the path (completes processing of command π + π§), 3) plus the amount of time that elapses from the moment the critical computer transmits command π + π§ to the next downstream computer to the moment userb
111
entered to the moment command π + π§ is entered. The case when an intermediate computer other than the source is the critical computer is illustrated in Figure 3-5. Since the critical computer is idle when command π reaches it, then by the definition of the critical computer, all computers are idle when command π reaches them, as shown in Figure 3-5. Thus, the first is term is equal to the sum of network latencies on the part of the path from the source to the critical computer plus the intermediate delays for command π of computers on this part of the path, that is, π β1π=1π ππ, ππ+1 + π β1π=1πππ‘π πΈπ π, ππ . Note that if the critical computer is the same as the source computer, then the first term is equal to zero. The second term is more complicated and we return to it momentarily. The third term is similar to the first term. By the definition of the critical computer, all computers downstream from the critical computer are idle when command π + π§ reaches them, as shown in Figure 3-5. Thus, the third term is equal to sum of the network latencies along the part of the path from the critical to the destination computer, plus the intermediate delays for command π + π§ of all non-destination computers on this part of the path, plus the delay command π + π§ on the destination
computer, that is, π β1π=π π ππ, ππ+1 + π β1π=π +1πππ‘π πΈπ π + π§, ππ + πππ π‘π πΈπ π + π§, ππ . Note that if the critical computer is the same as the destination computer, then the third term is equal to zero. The fourth term is a constant. Therefore, the first, third, and fourth terms are
independent of the number of consecutive commands that have been entered.
The second term, which we refer to as the critical computer time, is more complex than the others because it depends on the number of commands that have been entered consecutively. When the critical computer is an intermediate computer, then the time it requires to complete the tasks of consecutive commands is a function of both the network card and CPU costs. It is a function of CPU costs because until the CPU completes tasks for
a command, the network card cannot begin transmitting the next command even if it is idle because the CPU must first transmit it. It is a also function of transmission times because until the network card completes transmitting a command to all destinations, it cannot begin transmitting the next command even if the CPU has completed the processing and
transmission tasks for it. In one extreme case, the total network card transmission time is higher than the CPU processing time for each command. In this case, the network card falls
further behind the CPU with each command, as shown in Figure 3-6 (left). The other extreme case is that the CPU processing time is higher than the total network card transmission time for each command. In this case, the network card keeps up with the CPU, as shown in Figure 3-6 (right). In all other cases, when neither the total network card transmission time nor the CPU processing time dominate each other, then for any one command, the network card either falls further behind or makes up ground on the CPU. Therefore, on average, the
Figure 3-6. Critical computer time for completing tasks of consecutive commands.
time CPU NIC i i i i+1 i+1 time CPU NIC cmd i+1cmd i Transmission Processing cmd i+1cmd i i+1 i i i i+1 i+1 i+1
113
network card keeps up with the CPU. Hence, all non-extreme cases are equivalent to the second extreme case. Thus, we analyze the response times only for the two extreme cases.
Let us first consider the extreme case when the total network card transmission times dominate the CPU processing times. The critical computer time is equal to (1) the amount of time that elapses from the moment the critical computer receives command π to the moment the CPU transmits π to the first destination, plus (2) the amount of time that elapses from the moment the network card begins to transmit π to the first destination to the moment it
transmits π + π§ β 1 to the last destination, plus (3) the amount of time that elapses from the moment the network card begins transmitting π + π§ to the moment it transmits it to the next downstream computer. The first term is equal to π₯πΆππ π,ο°
π
πΌπ . The second term is equal to
πππο°π β π₯ππΌπΆ π,πΌπο°π π+π§β1
π=π because once the network card begins transmitting π, it does not stop until it finishes transmitting π + π§. The third term is equal to πππ ο°π ,ο°π +1 β π₯ππΌπΆ π+π§,ο°
π πΌπ . Thus, we can finally state userbβs remote response time of command π + π§ entered by
userj by adding the critical computer time to the other three components of the remote
response time, which we had derived earlier. In particular, when an intermediate computer is the critical computer and the total network transmission times dominate the CPU processing time the remote response time is given by
πππππ‘ππ πΈπ,π+π§,π = π ππ, ππ+1 πβ1 π=1 + πππ‘π πΈπ π, ππ π β1 π=1 + π₯πΆππ π,π π πΌπ + πππ ππ β π₯ππΌπΆ π,ππΌππ π+π§β1 π=π + πππ ππ , ππ +1 β π₯ππΌπΆ π+π§,ππΌπ π + πππ‘π πΈπ π + π§, ππ πβ1 π=π +1 + πππ π‘π πΈπ π + π§, ππ β π‘π+π§
At first, this equation may appear quite different from the general remote response time equation for commands entered in a quiescent state. There are two differences in these two equations. The first difference is that there are two intermediate delay sums instead of one because in the consecutive command case, we have to separately consider the delays of computers upstream and downstream from the critical computer. The other, major difference is the critical computer time, π₯πΆππ π,π
π πΌπ + πππ ππ β π₯ππΌπΆ π,ππΌππ π+π§β1 π=π + πππ ππ , ππ +1 β π₯ππΌπΆ π+π§,π π
πΌπ , that is included in the equation for consecutive commands. However, a closer look at the two differences shows that the consecutive command equation βstretches outβ the delay of the intermediate computer ππ in the quiescent state equation. Therefore, the remote response time equation of consecutive commands indeed resembles the response time equation of commands entered in a quiescent state.
The other extreme case is when the CPU processing time dominates the total network card transmission for each command. In this case, the critical computer time is equal to (1) the amount of time that elapses from the moment the CPU begins to perform tasks for command π to the moment the CPU completes that task for command π + π§ β 1, plus (2) the amount of time that elapses from the moment the CPU begins to perform tasks for command
π + π§ to the moment the network transmits it to the next downstream computer. The first term is equal to π+π§β1π=π πππο°π β π₯πΆππ π,πΌπο°π + ππ,πΌπο°π + ππ,πππο°π . The second term is equal to
π₯πΆππ π+π§,ο°
π
πΌπ + πππ ο°
π ,ο°π +1 β π₯ππΌπΆ π+π§,πΌπ ο°π . Thus, we can state userbβs remote response time of
command π + π§ entered by userj when an intermediate computer is the critical computer and
115 πππππ‘ππ πΈπ,π+π§,π = π ππ, ππ+1 π β1 π=1 + πππ‘π πΈπ π, ππ π β1 π=1 + πππο° π β π₯πΆπππ,ο°π πΌπ + π π,ο°π πΌπ + π π,ο°π πππ π+π§β1 π=π +π₯πΆπππ+π§,ο° π πΌπ + πππ ο° π ,ο°π +1 β π₯ππΌπΆπ+π§,πΌπ ο°π + πππ‘π πΈπ π + π§, ππ π β1 π=π +1 + πππ π‘π πΈπ π + π§, ππ βπ‘π+π§ This equation, like the one before it, also resembles the general remote response time equation for commands entered in a quiescent state. The differences between this and the quiescent state equations are the same as the differences between the previous and quiescent state equations.
When the critical computer is the destination, the critical computer time is not a function of the network card transmission times. Hence, the second term on the destination computer is equal to the time the CPU requires to transmit and process all of the commands, that is, to π+π§π=π πππο°π β π₯πΆππ π,πΌπο°π + ππ,πΌπο°π + ππ,πππο°π . Thus, when the destination computer is the critical computer, the response time equations are given by
πππππ‘ππ πΈπ,π+π§,π = π ππ, ππ+1 π β1 π=1 + πππ‘π πΈπ π, ππ π β1 π=1 + πππο° πβ π₯πΆπππ,ο°π πΌπ +π π,ππΌππ + ππ,πππππ π+π§ π=π βπ‘π+π§ This equation is similar the general remote response time equation of quiescent state
commands. This makes sense because command π must traverse the path from the source to the destination regardless of whether the user enters consecutive commands after it. The only
difference is that the destination delay term is more complex in the consecutive command equation because of the extra delay command π + π§ experiences at the destination.
Centralized Response Times
So far, we have presented only the response times of consecutive commands entered by master users in the replicated architecture. Next, we give the equations for the response times of such commands entered by master and slave users in the centralized architecture. Consider first the remote response times of commands entered by the master user. As in the analysis of commands entered in the quiescent state, we can derive these equations from the replicated architecture equations as long as we account for the two main differences in the centralized and replicated architectures. First, in the centralized architecture, only the master computer processes both input and output commands, while other computers process only