Method and apparatus for processing input/output requests from several host computer

Abstract: In order to share out central resources fairly between low-speed and high-speed input/output ports 20-1, 20-2 of an input/output control unit, an activation time between a time point when an end status associated with the end of a transfer is sent and a time point when an activation request is received is measured and stored in a memory 48. When the high-speed port receives an activation request from a high-speed channel, the activation time in the memory measured with respect to the low-speed port is read out and during this activation time an input/output request for the low-speed port is preferentially accepted. To provide the activation time for the low-speed port the minimum time, average time and maximum time are obtained from the result of the measurement. Any of these three times can be selected as the activation time in order substantially to equalize the busy ratios of the high-speed and low-speed ports. Allocation can also be made in alternative ways, for instance by reference to the number of requests which meet with a busy signal.

Description: The invention relates to methods and apparatus for processing input/output requests by connecting a host computer and an input/output control unit by a plurality of channel buses and, more particularly, to method and apparatus for processing input/output requests by using channel buses of different transfer speeds. Fig. 1 shows an example of an input/output (I/O) subsystem using magnetic tape apparatuses. The input/output subsystem is constructed by: a magnetic tape control unit 410 which functions as an input/output control unit; and a plurality of magnetic tape drive units 412-1 to 412-4 each of which functions as an input/output unit. Devices ID #1 to #4 are defined for the magnetic tape drive units 412-1 to 412-4. The magnetic tape control unit 410 has, for example, two input/output (I/O) ports 420-1 and 420-2. Port numbers (A) and (B) are defined for the I/O ports 420-1 and 420-2. Channel units 416-1 and 416-2 of host computers 414-1 and 414-2 are connected to the I/O ports 420-1 and 420-2 through channel buses 418-1 and 418-2. Channel numbers (A) and (B) are defined for the channel units 416-1 and 416-2. In the following description, the above components are merely expressed as channels (A) and (B) and ports (A) and (B). A processing operation for an input/output request from the host computer will now be briefly described. For example, it is now assumed that an input/output request such as a write request for a magnetic tape loaded in the magnetic tape drive unit 412-1 was generated by the host computer 414-1. The channel (A) of the host computer 414-1 first generates a start I/O request (activation request) which designates a device machine No. #1 of the magnetic tape drive unit 412-1 to the I/O port (A). In response to the start I/O request from the port (A), the magnetic tape control unit 410 discriminates whether the port (B) has been coupled to the channel (B) or not. When the port (B) is not coupled, the magnetic tape control unit 410 accepts the start I/O request for the port (A) and is coupled with the channel (A) and responds a normal end of the start I/O request and executes a transferring process of a command sequence. When the start I/O request from the channel (A) is received by the port (A), if the channel (B) has been coupled, a busy response is returned. When the transferring process by the coupling of the channel (B) and the port (B) is finished, a status response of a unit end is performed from the port (B) to the channel (B) and they are disconnected. In association with the disconnection, a busy end indicative of a busy cancellation is also performed from the port (A) to the channel (A). An activation request is again performed from the channel (A) in the waiting state to the port (A) by the busy response. In the input/output control unit for processing input/output requests from such a plurality of channels, it is necessary to equivalently execute services for the input/output request of each channel. However, in the case where transfer speeds of the channel buses differ or a different transfer protocol is used in dependence on the channel like an electric channel bus or an optical channel bus, there is a tendency such that the services are one-sided to the high speed channel by all means, so that there is a problem of reduction of the services to the low speed channel. As a system environment, in many cases, the high speed host computer and the low/middle speed host computer mixedly exist. Further, the high speed host computer and the middle/low speed host computer are connected so that they can be cross-called. In such a case, a problem similar to that mentioned above occurs. This point will now be described with reference to Fig. 1. For instance, it is now assumed that the channel (A) is a low speed channel and the channel (B) is a high speed channel. An input/output control in this case is executed as shown in, for example, a time chart of Fig. 2. When a start I/O request 500 is sent from the high speed channel (B) to the port (B) and a coupling completion response 502 by the normal end is obtained, transferring processes 504 and 506 of a command sequence between the high speed channel (B) and the port (B) are executed. Now, assuming that a start I/O port request 508 is generated from the low speed channel (A) to the port (A) for periods of time of the transferring processes 504 and 506, since the port (B) has been coupled, a busy response 510 is returned. After completion of the transferring process 506, a unit end 512 is returned from the port (B) to the high speed channel (B) and the coupling is disconnected. In association with the unit end 512, a busy end 514 indicative of the busy cancellation is subsequently returned from the port (A) to the low speed channel (A) in the waiting state of the busy cancellation. When it is now assumed that the next input/output request has been generated from the high speed channel (B) which received the unit end 512, a start I/O request 516 as an activation request is immediately outputted from the high speed channel (B) to the port (B). After a coupling completion response 518 was performed, transferring processes 520 and 522 are again executed. On the other hand, the low speed channel (A) which received the busy end 514 recognizes the busy cancellation and generates a start I/O request 524 to the port (A). However, it takes a time until the start I/O request 524 is received by the port (A) after the busy end 514 was outputted. For such a period of time, the port (B) has been coupled by the start I/O request 516 from the high speed channel (B). Therefore, for the start I/O request 524 from the low speed channel (A), a busy response 526 is again outputted from the port (A) and the low speed channel (A) again waits for a busy cancellation. Therefore, so long as the input/output request is continuously performed to the high speed channel (B), a loop process of the start I/O request, busy response, and busy end is repeated for the low speed channel (A). The input/output request is not accepted and the services deteriorate. In the worst case, since such a loop process is executed for a long time, there is a problem of the occurrence of a check condition such that the host computer of the low speed channel (A) judges that some abnormality occurred in the channel unit or input/output subsystem. In dependence on a control method, when the input/output request from the high speed channel is continuously performed, there is also no time to respond the busy end in association with the end of the coupling on the high speed channel side for the low speed channel (A). In such a case, the low speed channel in the busy cancellation waiting state cannot obtain the busy end even if it waits for the busy cancellation for a long time. A situation such that the busy cancellation waiting times out and the input/output request of the low speed channel is finished as an error occurs. As a method of solving the above problem such that the services of the input/output control apparatus are one-sided to a specific channel as mentioned above, there is a method of time-divisionally changing the priority of the route so that the services are equivalently given to each input/output port. Fig. 3 shows the case where eight channels of ports (A to H) are provided for the input/output control unit. Priorities are sequentially allocated to the ports (A to H) by clocks in accordance with that order. It is now assumed that, for example, there are activation requests to all of the input/output ports (A to H) at time t0. In this instance, there is a clock in a slot of the I/O port (C), the priority is set, and the coupling at the I/O port (C) is accepted. With respect to the other I/O ports, the busy response is automatically reported. Now, assuming that there are two activation requests of the I/O ports (B and E) at time t0, the coupling of the I/O port (E) is accepted to a slot of the I/O port (E) at time t1 when the clock changes. With respect to the I/O port (B), the busy response is automatically reported. Such a method of changing the priority of the route time-divisionally is effective in the case where each channel bus has the same performance and also has the same protocol such as electric channel bus or optical channel bus. However, in the case where the transfer speeds are different or the protocols in which an electric channel and an optical channel mixedly exist are different, the above method is not so effective. EP 287301 (Tandem Computers Inc.) discloses a versatile computer system with a plurality of host processors, system buses and I/O ports, but it does not address the question of equalising use of channels of differing speeds. According to the present invention, there are provided method and apparatus in which even if speeds of a plurality of channel buses for connecting a channel of a host computer and input/output ports of an input/output control unit are different, processes for input/output requests can be equivalently executed without one-siding to a specific input/output port. First, the invention provides an input/output control unit in which a plurality of channels on the upper apparatus side are connected to a plurality of input/output ports through channel buses of different transfer speeds. Specifically speaking, the invention provides an input/output control unit having a high-speed input/output port and a low-speed input/output port connected respectively to a high-speed channel unit and a low-speed channel unit on the host side through channel buses of different transfer speeds. A first aspect of the invention is defined in apparatus claim 1 and method claim 5. An embodiment of the first aspect of the invention further has a busy ratio measurement storing section for measuring a busy ratio of each of the input/output ports and recording it. In this case, each time the activation times T1 and T2 of the input/output ports (A and B) are measured, the activation time measurement storing section produces a maximum time Tmax, an average time Tav, and a minimum time Tmin and stores. The route control section selects the maximum time, average time, or minimum time so as to equalize busy ratios R1 and R2 of the input/output ports (A and B) stored in the busy ratio measurement storing section and sets the waiting time T1 of the activation request of the low speed input/output port (A). A busy ratio (R) has a value obtained by dividing the measured number of busy response times by the number of input/output times from the channel every input/output ports (A and B). When setting the waiting time based on the busy ratios, when the busy ratio R1 of the low speed input/output port (A) is larger than the busy ratio R2 of the high speed input/output port (B), the maximum time Tmax is selected. When the busy ratio R1 of the low speed input/output port (A) is equal to the busy ratio R2 of the high speed input/output port (B), the average time Tav is selected. Further, when the busy ratio R1 of the low speed input/output port (A) is smaller than the busy ratio R2 of the high speed input/output port (B), the minimum time Tmin is selected. A further embodiment of the first aspect of the invention is constructed as follows. First, an activation time measuring section to measure an activation time from a time point when a busy cancellation is responded from the low speed input/output port (A) to the low speed channel (A) to a time point when an activation request is received is provided for the input/output control unit. At the time of a response of the busy cancellation from the low speed input/output port (A), the route control section allows a processing request from the high speed channel (B) for the high speed input/output port (B) to be waited for the measured activation time and accepts the processing request from the low speed channel (A) for the low speed input/output port (A) for such a period of time. It is also possible to provide a waiting time setting section for varying the waiting time of the route control section on the basis of the measurement time of the activation time measuring section. Further, a waiting time setting section for setting the waiting time of the route control section by an input operation of an operator can be also provided. The first aspect of the invention as mentioned above can be regarded as a learning system. As one factor contributing to the phenomenon that the services of the input/output control are one-sided to the high speed channel unit, there can be mentioned a speed which is required from a time point when the channel in the busy cancellation waiting state receives a notification (busy end) of the busy cancellation to a time point when it generates an activation request. Generally, such a time is short in the high speed channel and is long in the low speed channel. Therefore, a timer is provided for each of the input/output ports, thereby dynamically measuring an activation time until the activation request is received after the busy cancellation was responded and storing. The measurement result of the activation time is divisionally calculated and stored with respect to the maximum value, minimum value, and average value. For example, even when the high speed input/output port continuously accepts the activation request after the unit end, an acceptance response is not immediately executed but the I/O control unit waits for the activation request of the low speed port for only the activation time. When there is an activation request from the low speed input/output port, which one of the high speed port and the low speed port is accepted is judged, thereby preventing that the services are prejudiced to only one side. A busy ratio is used as one index indicative of a one-sided state of services. The busy ratio is obtained by dividing the number of busy responses obtained by a busy response counter by a value of an activation number counter for counting the number of activation times from the channels. The waiting time is determined so as to set the busy ratio of each input/output port to a value as small as possible and so as not to increase differences of the values of the busy ratios of the input/output ports. After the response of the busy cancellation, for example, when the busy ratio of the input/output port which responded is high, the apparatus waits at a value near the maximum value of the activation time. On the contrary, when the busy ratio of the input/output port is low and the busy ratio of the other input/output port is high, the apparatus waits at a value near the minimum value. As mentioned above, according to the first form of the invention, the services of each channel can be uniformed by a self learning. A second aspect of the invention is defined in apparatus claim 10 and method claim 11. According to the second aspect of the invention, when a loop such that a busy response to the activation request and a response of a busy cancellation (busy end) in association with the end of the transfer of the other input/output ports are repeated occurs in any one of a plurality of input/output ports, the number of occurring times of such a loop is counted and when a judging section judges that such a number exceeds a predetermined value, an acceptance of the activation request is preferentially allocated to the input/output port judged by the route control section. That is, the route control section accepts only the activation request for the input/output port to which the acceptance of the activation request was preferentially allocated and makes a busy response to the activation request to the other input/output ports. According to the second aspect of the invention as mentioned above, when the loop process of the busy response and busy end response continues for a long time, a check condition occurs on the host side. Therefore, such a state is prevented. Namely, the number of loop processing times of the activation request, busy response, and busy end response is detected by the counter. The services are preferentially given to the input/output port in which a count value exceeds a predetermined value. A busy signal is responded to the other I/O ports. After completion of the preferential process at the input/output port, the counter of such an input/output port is reset. Thus, the check condition which occurs when the busy response and the busy end response are looped can be avoided. A third aspect of the invention is defined in apparatus claim 12 and method claim 14. According to the third aspect of the invention, a busy response time storing section stores a time at which a busy response is performed for an activation request with respect to each of a plurality of input/output ports (A and B). A processing port deciding section decides the input/output port having the oldest response time among the busy response times to the next processing port every completion of the process for the activation request. The route control section preferentially allocates the acceptance of the activation request to the decided input/output port. Such a third aspect of the invention can be regarded as a time series processing system. Namely, the time at which the busy response was performed at each input/output port is stored and when the process with the channel is finished, a busy response time of each input/output port is examined. A busy end is reported to the input/output port indicative of the oldest time and the services are preferentially executed. The above and other objects, features, and advantages of the present invention will become more apparent from the following detailed description with reference to the drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a conventional apparatus; Fig. 2 is a time chart of a circulation of a busy - unit end which occurs in a conventional input/output control; Fig. 3 is an explanatory diagram of a conventional control in which a time slot synchronized with a clock is allocated to an input/output port; Fig. 4 is a block diagram of a system to which the invention is applied; Fig. 5 is a block diagram of an input/output control unit of the invention; Fig. 6 is a block diagram of the first aspect of the invention; Fig. 7 is a time chart for a process to measure an activation time in Fig. 6; Fig. 8 is a time chart for an input/output process in Fig. 6; Fig. 9 is a flowchart for the input/output process in Fig. 6; Fig. 10 is a flowchart for a process to measure the activation time in Fig. 6; Fig. 11 is a flowchart for a process to set a waiting time timer in Fig. 6; Fig. 12 is a block diagram of an embodiment of the first aspect of the invention; Fig. 13 is a block diagram of the second aspect of the invention; Fig. 14 is a flowchart for an input/output process in Fig. 13; Fig. 15 is a block diagram of the third aspect of the invention; Fig. 16 is a flowchart for an input/output process in Fig. 15; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS [System construction] Fig. 4 shows a system construction of the invention using magnetic tape apparatuses as drive units. In Fig. 4, in the embodiment, eight magnetic tape drive units 12-1 to 12-8 are connected to a magnetic tape control unit 10 which functions as an input/output (I/O) control unit through a device interface (I/F) 25. Drive IDs #1 to #8 are preset to the magnetic tape drive units 12-1 to 12-8. In the embodiment, the magnetic tape control unit 10 has eight input/output ports 20-1 to 20-8. Port numbers (A to H) are defined for the I/O ports 20-1 to 20-8. In the following description, the port numbers (A to H) are simply expressed as ports (A to H). Channel units 16-1 to 16-8 provided for host computers 14-1 to 14-8 are connected to the ports (A to H) of the magnetic tape control unit 10 through channel buses 18-1 to 18-8, respectively. Channel numbers (A to H)) are defined for the channel units 16-1 to 16-8. In the following description, the channel numbers (A to H) are simply expressed as channels (A to H). The channels (A to H) of the host computers 14-1 to 14-8 and the channel buses 18-1 to 18-8 between the ports (A to H) of the magnetic tape control unit 10 have peculiar transfer speeds, respectively. For example, the channel bus 18-1 connecting the channel (A) and the port (A) is an electrical channel bus and its transfer speed is set to 4.5 MBs. A block multiplex channel interface (BMC) made by IBM corporation can be used as an electric channel bus 18-1. The channel bus 18-2 connecting the channel (B) and the port (B) is, for instance, an optical channel bus and its transfer speed is so high to be 9 MBs. For example, an ESCON channel made by IBM corporation can be used as an optical channel bus 18-2. With respect to the remaining channel buses 18-3 to 18-8, channel buses each having a peculiar transfer speed are used. In the invention, it is sufficient to provide at least two channel buses of a high transfer speed and a low transfer speed. For example, the electric channel bus 18-1 of the transfer speed of 4.5 MBs becomes the low speed channel bus. On the other hand, the channel bus 18-2 using the optical channel bus becomes the high speed channel bus because the transfer speed is equal to 9 MBs. In the following description, the channel (A) of the low speed channel bus 18-1 is referred to as a low speed channel. The channel (B) of the high speed channel bus 18-2 is referred to as a high speed channel. Similarly, with respect to the ports (A and B) as well, the port (A) is referred to as a low speed input/output port and the port (B) is referred to as a high speed input/output port. Fig. 5 shows a hardware construction of the magnetic tape control unit 10 in Fig. 4. The magnetic tape control unit 10 is constructed by a host interface section 24, a buffer memory 26, a formatter section 28, and a communication information memory table 30. The host interface section 24 has an MPU 32, a firmware 34, and an interface processor 36. The ports (A to H) which are realized by the input/output port units 20-1 to 20-8 to which the channel buses from the host computers are connected are provided for the interface processor 36. An MPU 38, a firmware 40, and a format processor 42 are provided for the formatter section 28. Input/output controls of the invention are executed by the MPU 32, firmware 34, and interface processor 36 provided for the host interface section 24. Data which is transmitted and received between the host computers and the magnetic tape drive units is temporarily stored in the buffer memory 26. By the data transfer via the buffer memory 26, the transfer between the I/O control unit 10 and the channel and the transfer between the I/O control unit 10 and the magnetic tape drive unit side are asynchronously executed. When an activation request is received to any one of the ports (A to H) of the interface processor 36, the MPU 32 provided for the host interface section 24 accepts the activation request under a condition such that the other ports are not coupled, couples with the channel bus, and executes a transferring process of a channel command word based on an input/output request from the host computer. The channel command generally includes a command chaining as continuous different command words to realize a series of command sequences and a data chaining to repetitively transfer a read command or a write command in order to transfer the data on a block unit basis. Each time the data transfer by the channel command is executed once, the channel unit generates a start I/O request (start I/O command) to the corresponding port of the magnetic tape control unit 10, thereby executing an activation request. At the time of the activation request, any one of the drive IDs #1 to #8 of the magnetic tape drive units is ordinarily designated. The interface processor 36 monitors the start I/O requests from the channel buses to the ports (A to H). When the start I/O request is recognized, the interface processor 36 returns a coupling completion response indicative of a normal end for the start I/O command under a condition such that the other ports are not coupled. In the case where another port is coupled when the start I/O request is received, the interface processor 36 fundamentally returns a busy response. The MPU 32 decodes the command from the channel side received through the interface processor 36 and writes various kinds of information such as parameters and the like which are necessary to control the magnetic tape drive units into the communication information memory table 30. The data transferred to write to the magnetic tape drive units is written into the buffer memory 26. The MPU 38 of the formatter section 28 cyclically refers to the communication information memory table 30 asynchronously with the MPU 32. When the information necessary for the control of the magnetic tape drive units or the data transfer is recognized, the MPU 38 instructs a processing operation for various kinds of controls and the data transfer for the magnetic tape drive unit having the designated drive ID via the format processor 42. The MPU 38 cyclically detects states of the magnetic tape drive units 12-1 to 12-8 and writes the detection results into the communication information memory table 30. Therefore, when a sense command to confirm the states of the magnetic tape drive units is received by the host interface section 24 from the channel side, the MPU 32 recognizes the states of the magnetic tape drive units by referring to the communication information memory table 30 and can respond to a status command. Further, a function as a compressing and expanding section for compressing the transfer data from the channel bus, for thereafter writing the compressed transfer data into the buffer memory 26, for expanding the compressed read data read out from the magnetic tape drive unit to the buffer memory 26 to the original data, and for sending the expanded original data to the channel bus is provided for the interface processor 36. As for the data compressing and expanding process, whether the data is expanded or compressed or is processed as it is can be designated by a bit flag of a set command which is sent at the first of a read or write request. On the other hand, a CRT 35 and a keyboard 45 are provided as optional devices through a device interface 25. The operator, consequently, can set various kinds of parameters necessary for the input/output controls of the MPU 32 of the host interface section 24 from the outside. Control parameters of the MPU 32 can be also set by using a CRT and a keyboard on the host computer side. [Learning process] Fig. 6 shows an embodiment of the first form of the invention and relates to an example in the case where two ports (A and B) are provided for the magnetic tape control unit 10. A route control section 46 is provided for the magnetic tape control unit 10 and functions as a channel switch to select either one of the ports on the basis of an activation request from the channel bus to the port (A) or port (B). Timers 52 and 58 are provided for the ports (A and B), respectively. The timers 52 and 58 are activated when a busy end is responded to the channel buses from the ports (A and B) and are stopped when the activation requests are received from the channel buses after that. More accurately speaking, the activation time which is measured by each of the timers 52 and 58 is a time from a time point when the busy end is responded in association with the end of the coupling of the other ports after the busy response was performed to the channel bus to a time point when the activation request from the channel in a busy cancellation waiting state which received the busy end is received by the port. Therefore, the activation time itself shows a time at which the channel receives a unit end in the busy cancellation waiting state and again generates an activation request. The activation time depends on a transfer speed of the channel bus. The port (A) is a low speed port connected to the low speed channel bus 18-1. The port (B) is a high speed port connected to the high speed channel bus 18-2. Therefore, an activation time T1 of the low speed port (A) which is measured by the timer 52 is longer than an activation time T2 of the high speed port (B) which is measured by the timer 58. An activation time measurement storing section 48 stores the activation time T1 of the low speed port (A) and the activation time T2 of the high speed port (B) which were measured by the timers 52 and 58. Further, a busy ratio measurement storing section 50 is provided for the magnetic tape control unit 10. The busy ratio measurement storing section 50 calculates and stores busy ratios R1 and R2 every ports (A and B) by using count values of an activation number counter 54 and a busy number counter 56 provided for the port (A) and count values of an activation number counter 60 and a busy number counter 62 provided for the port (B), respectively. For example, when considering the port (A), the activation number counter 54 is counted up each time there is an activation request from the channel bus 18-1 to the port (A) and its count value indicates the total number of activation requests during the operation for the port (A). The busy number counter 56 counts the number of times of the busy response executed by the other port (B) which has already been coupled among the activation requests to the port (A). Each time the activation number counter 54 counts up, namely, whenever there is an activation request, the busy ratio measurement storing section 50 divides the count value of the busy number counter 56 by the count value of the activation number counter 54, thereby calculating the busy ratio R1 of the port (A). This point shall also similarly apply to the activation number counter 60 and busy number counter 62 of the port (B). Each time the activation request is received, the value of the busy number counter 62 is divided by the value of the activation number counter 60, thereby calculating the busy ratio R2 of the port (B) and storing. Further, the activation time measurement storing section 48 doesn't store the activation times T1 and T2 of the ports (A and B) measured by the timers 52 and 58 as they are but stores them separately with respect to a maximum time Tmax, a minimum time Tmin, and an average time Tav because the activation time differs in dependence on a situation at that time. When storing the maximum time Tmax, the maximum time Tmax obtained until the preceding time is compared with an activation time (T) obtained at this time. When the activation time (T) is larger, the maximum time Tmax so far is updated. When the activation time (T) is smaller, the maximum time Tmax so far is left. The minimum time Tmin is also updated in a manner similar to that mentioned above. The average time Tav can be obtained by dividing the sum of the activation times until the present time point by the number of activation request times. When the sum of all of the activation times is obtained, since a data bit length is too long, it is desirable to calculate a moving average of every predetermined number of activation times. When the activation request is received to the high speed port (B), the route control section 46 doesn't immediately perform a coupling completion response even when the port (A) is in a non-coupling state but compares the busy ratios R1 and R2 of the ports (A and B) and executes a route control so as to equalize the busy ratios R1 and R2 with reference to the busy ratio measurement storing section 50. Generally, the busy ratio R1 on the low speed port (A) side is large and the busy ratio R2 of the high speed port (B) is small. Therefore, the activation time T1 of the low speed port (A) of a large busy ratio is read out from the activation time measurement storing section 48. For the activation time T1 of the low speed port (A) which was read out, the port (B) sets a waiting time of the activation request to the low speed port (A). When there is an activation request to the low speed port (A) for the waiting time T1 of the activation request to the port (A), the route control section 46 couples the port (A) to the channel bus 18-1 and executes the transferring process and returns the busy response to the high speed port (B) to which the activation request has already been performed. Thus, the low speed port (A) side of the high busy ratio preferentially accepts the activation request and can almost equalize the busy ratio with that of the high speed port (B). Since the maximum time Tmax, average time Tav, and minimum time Tmin have been stored into the activation time measurement storing section 48 as an activation time T1 of the low speed port (A), the waiting time of the activation request for the low speed port (A) is set as follows, for example, from the relation between the busy ratios R1 and R2 of the ports (A and B). I. When R1 > R2, the maximum time Tmax is set to the waiting time. II. When R1 = R2, the average time Tav is set to the waiting time. III. When R1 < R2, the minimum time Tmin is set to the waiting time. Fig. 7 is a time chart for an activation time measuring process in Fig. 6. Now, when the host computer 14-2 generates a start I/O request 100 to the port (B), since the port (A) is not used in this instance, a coupling completion response 102 indicative of the normal end is returned and the channel (B) and port (B) execute transferring processes 104 and 106. Now, assuming that a start I/O request 108 is generated from the low speed channel (A) for periods of time of the transferring processes 104 and 106, a busy response 110 is returned from the low speed port (A). After completion of the transferring process, a unit end 112 is reported from the high speed port (B) to the high speed channel (B). Subsequently, a busy end 114 is outputted from the low speed port (A) to the low speed channel (A) in the busy cancellation waiting state. In response to the busy end 114, the low speed channel (A) recognizes the busy cancellation and generates a start I/O request 116. The timer 58 in Fig. 6 measures the time T1 from the response of the busy end 114 at the low speed port (A) to the reception of the start I/O request 116 as an activation time. The low speed port (A) which received the start I/O request 116 generates a coupling completion response 118 indicative of the normal end. Transferring processes 120 and 122 are executed at the low speed channel (A) and low speed port (A). Now, assuming that a start I/O request 124 is generated from the high speed channel (B) for periods of time of the transferring processes 120 and 122, a busy response 126 is returned from the high speed port (B). After completion of the transferring process, a unit end 128 is reported from the low speed port (A) to the low speed channel (A). Subsequently, a busy end 130 is outputted from the high speed port (B) to the high speed channel (B) in the busy cancellation waiting state. In response to the busy end 130, the high speed channel (B) recognizes the busy cancellation and generates a start I/O request 132. The timer 58 in Fig. 6 measures a time T2 from the response of the busy end 130 at the high speed port (B) to the reception of the start I/O request 132 as an activation time. Fig. 8 shows input/output controls by the route control section 46 using a storage time of the activation time measurement storing section 48 in Fig. 6. Now, assuming that a start I/O request 142 is generated from the high speed channel (B) to the high speed port (B) and there is a start I/O request 148 from the low speed channel (A) for periods of time during which transferring processes 145 and 146 are executed by a coupling completion response 144, a busy response 150 is executed. When the transferring processes 145 and 146 are finished in the busy cancellation waiting state of the low speed channel (A) and a unit end 152 is outputted and a busy end 154 is generated from the low speed port (A) in association with it, the waiting time (T) based on the activation. time T1 is set. During a waiting time T0, a start I/O request 156 is first executed from the high speed channel (B) to the high speed port (B). However, since such a request is performed in the waiting time T0, the start I/O request 156 is not accepted but is waited. Subsequently, the low speed channel (A) generates a start I/O request 158 after the elapse of a time T1' from the reception of the busy end 154. In this instance, the magnetic tape control unit 10 lies within the waiting time (T) during which the activation request to the low speed port (A) is preferentially performed by the setting of the waiting time (T), the control unit 10 accepts the start I/O request 158 and returns a coupling completion response 160 and executes transferring processes 162 and 164. Subsequently, a busy response 166 to the start I/O request 156 is returned from the high speed port (B) to the high speed channel (A). After completion of the transferring processes 162 and 164, a unit end 168 is generated and a busy end 170 is also generated. Transferring processes 174 and 176 by the coupling of the high speed channel (B) and high speed port (B) are executed. As mentioned above, when the activation request to the high speed port (B) is accepted, the waiting time (T) over the activation time on the low speed port (A) side is provided and the activation request to the low speed port (A) is preferentially processed. Even if the activation request to the high speed port (B) continues, so long as there is an activation request to the low speed port (A), it can be normally accepted and processed. A situation such that the services are one-sided to the high speed port (B) side can be prevented. The flowchart of Fig. 9 relates to an input/output control process using the activation times and busy ratios in Fig. 6. When there is an activation request in step S1, the processing routine advances to step S2 and a check is made to see if the port is the high speed port or not. If YES, step S3 follows. For example, the activation time T1 measured at the low speed port is set as a waiting time (T) into the timer. Until the activation time T1 times out in step S4, the activation request to the low speed port is checked in step S5. When it is judged in step S5 that there is an activation request at the low speed port during the activation time T1, step S6 follows and the low speed port is coupled to the low speed channel and the transferring process is started. At the same time, a busy response is performed from the high speed port to the high speed channel in step S7. When the completion of the transferring processes on the low speed side is judged in step S8, a unit end is outputted from the low speed port in step S9 and the next busy end is outputted from the high speed port. Therefore, the activation request is again performed from the high speed port in the busy cancellation waiting state. The processing routine is again returned to the process in step S1. When the activation request from the low speed port is judged in step S2, step S10 follows and the low speed port is coupled to the channel and the transfer control is executed under a condition such that the high speed port is not coupled. If the high speed port has been coupled, there are executed ordinary processes such that a control unit end is responded from the low speed port and the apparatus waits for the response of the control unit end by the end of the coupling of the high speed port and the activation request is again executed to the low speed port. The flowchart of Fig. 10 relates to the processing operation of the activation time measurement storing section 48 in Fig. 6. The processing operation is independently executed every port (A or B). For example, in case of the port (A), a check is made in step S1 to see if there is a busy end response or not. If YES, the timer is started in step S2. In step S3, a check is made to see if an activation request to the port (A) has been received or not. When the activation request is received, step S4 follows and the timer activated in step S2 is stopped. In step S5, the time held in the timer is fetched as an activation time and stored. In step S6, the average time Tav including the activation time measured at this time is calculated. When a condition of the minimum time is satisfied, the present minimum time Tmin is updated in step S7. When a condition of the maximum time is satisfied, the maximum time Tmax is updated in step S8. The flowchart of Fig. 11 shows the details when the activation time T1 of the low speed port is set to the timer in step S3 in Fig. 9. First in step S1, the busy ratio R2 of the high speed port (B) which received the activation request and the busy ratio R1 of the low speed port (A) in the waiting state of the request are calculated. The busy ratios R1 and R2 are set to the values which were obtained by dividing the count values of the busy number counters 56 and 62 provided for the ports (A and B) in Fig. 6 by the count values of the activation number counters 54 and 60 and which were stored in the busy ratio measurement storing section 50. Subsequently in step S2, a check is made to see if the busy ratio R1 of the low speed port (A) is equal to or larger than the busy ratio R2 of the high speed port (B) or not. When the busy ratio R1 of the low speed port is larger than the busy ratio R2 of the high speed port, step S3 follows and the maximum time Tmax in the activation time of the low speed port (A) stored in the activation time measurement storing section 48 is set as a waiting time. When the busy ratio R1 of the low speed port is equal to the busy ratio R2 of the high speed port, the average time Tav of the activation time of the low speed port is set to a waiting time in step S4. Further, when the busy ratio R1 of the low speed port is smaller than the busy ratio R2 of the high speed port, step S5 follows and the minimum time Tmin in the activation time of the low speed port is set to the waiting time. The invention is not limited to a method of setting the activation time to the waiting time on the basis of the busy ratios of the high and low speed ports in Fig. 11 but any other proper method of deciding the waiting time so as to almost equalize the busy ratio of the high speed port with the busy ratio of the low speed port can be also used. For example, it is also possible to use only the average time Tav as an activation time of the low speed port and to obtain the time in which the average time is multiplied with a predetermined weight coefficient and to set such a time in place of the maximum time or minimum time in steps S3 or S5. Fig. 12 shows a modified embodiment of the first form of the invention. This modification is characterized in that at the time of the unit end of the high speed port (B), the activation time (T) from a time point when a busy end is responded from the low speed port (A) to the low speed channel (A) to a time point when the activation request is received is measured, and the activation request from the high speed channel (B) to the high speed port (B) after that is waited for the measured activation time (T), and the processing request from the low speed channel (A) to the low speed port (A) is accepted for such a waiting time. In Fig. 12, an activation time measuring section 230 is provided for the low speed port (A). In a manner similar to the time chart of Fig. 7, the activation time measuring section 230 measures the activation time (T) from a time point when the busy end is responded to the low speed channel (A) from the low speed port (A) to a time point when the start I/O request (activation request) is received. On the basis of the measured time (T) measured by the activation time measuring section 230, a waiting time deciding section 232 sets the waiting time T0 in the route control section 46. The waiting time T0 can be also set to the same time as the measured time (T). Or, the waiting time T0 can be also variably set in accordance with the measured time (T). Generally, when the actual waiting time T0 is set to be longer than the measured time (T), the services can be more effectively allocated to the low speed side. Therefore, the waiting time T0 in which the measured time (T) is multiplied with, for example, a predetermined coefficient (K) of 1 or more is variably set. Further, the waiting time T0 can be also set by the inputting operation of the operator. For this purpose, a display section 234 and an input section 236 are provided on the outside for the waiting time deciding section 232. Functions of the display section 234 and input section 236 are realized by the device interface 25, CRT 35, and keyboard 45 in Fig. 5. The operator reads out the present waiting time T0 set in the waiting time deciding section 232 and displays to the display section 234 by the operation of the input section 236 and inputs an arbitrary waiting time T0 and sets into the waiting time deciding section 232 in consideration of a busy state of each channel at that time and an operation style of the host computer. When responding a unit end by the end of the transfer of the high speed port (B), the route control section 46 generates a busy response even when there is an activation request to the high speed port (B), thereby waiting for the activation for the waiting time T0 that is given from the waiting time setting section 232. When there is an activation request to the low speed port (A) for such a waiting time T0, it is soon accepted and a transferring process is executed. When the waiting time T0 times out or the unit end is responded by the end of the transfer of the low speed port (A), a busy end is generated from the high speed port (B), thereby allowing the high speed channel to again generate the activation request and accepting it. [Circulation checking process of busy response/ busy end] Fig. 13 shows an embodiment of the second form of the invention. The embodiment is characterized in that a circulating state of a busy response and a busy end (busy cancellation response), such that by a continuous activation request at a high speed port the low speed port side repeats a busy response for the activation request based on the busy end, is detected and an acceptance of an input/output request is preferentially allocated to the low speed port. Counters 64 and 66 are provided for each of the low speed port (A) and high speed port (B) of the magnetic tape control unit 10. The counters 64 and 66 are counted up by "1" when the busy end is responded and a busy response for the activation request based on the responded busy end is executed. Namely, the counters 64 and 66 count up by detecting a circulation of one busy response and the busy end. A circulation number judging section 68 judges whether count values of the counters 64 and 66, namely, the number of circulating times of the busy response and the busy end have reached a predetermined value or not. When it is judged by the circulation number judging section 68 that the count value of the counter 64 or 66 has reached the predetermined value, by receiving such a judgment output, the route control section 46 controls so as to preferentially accept the activation request for the port (A) or (B) in which the number of circulating times exceeds the predetermined value. The flowchart of Fig. 14 relates to the processing operation in Fig. 13. First in step S1, the presence or absence of an activation request to the port (A) or (B) is discriminated. When there is an activation request, the port is coupled to the channel under a condition such that it is not being coupled to the other port, and the transferring process is executed. When the transferring process is finished in step S3, a unit end is responded in step S4. In this instance, when there is a port which performed a busy response, a busy end is responded from this port. Therefore, if the activation request was performed by the other port during the transfer by the coupling in step S2 and the busy response was executed, the corresponding counter in Fig. 13 counts up the number of circulating times of the busy response and the busy end by "1" by the busy end in step S4. In step S5, a check is made to see if there is a port in which the number of circulating times of the busy response and busy end exceeds a predetermined value or not. When there is a port in which the circulating number exceeds the predetermined value, step S6 follows and a preferential process of the activation request is allocated to the port in which the circulating number exceeds the predetermined value. In step S7, when the presence of the activation request is judged, a check is made in step S8 to see if the port is the port to which the preferential process was allocated or not. If NO, a busy response is returned in step S12. Thus, only the activation request for the preferential allocating port is accepted. The transferring process is executed by the coupling with the channel bus in step S9. After completion of the transferring process of the preferential allocating port in step S10, the circulation number counter provided for the preferential allocating port is reset in step S11 and a unit end is responded. In this instance, if there is another port in a waiting state by the busy response in step S12, a busy end is generated from such a port, thereby allowing the activation request to be generated. [Time sequential process] Fig. 15 relates to an embodiment of the third form of the invention. The embodiment of the third form is characterized in that the time of a busy response of the other port is stored during the coupling of a certain port and, at the end of the coupling, services are preferentially allocated to the port of the oldest busy response time. In addition to the ports (A and B) and the route control section 46, a busy response time storing section 70 and a processing port deciding section 72 are provided for the magnetic tape control unit 10. During the coupling of the port (A or B), the busy response time storing section 70 stores the time at which the activation request was performed to the other port and the busy response was executed. Since there are two ports (A and B) in the embodiment, the response time of the port (B) is stored during the coupling of the port (A), while the response time of the port (A) is stored during the coupling of the port (B). When the transferring process of the port during the coupling is finished and the unit end response is performed, the processing port deciding section 72 refers to the busy response time storing section 70, decides the port having the oldest time among the busy response times stored as a port for subsequently preferentially processing the activation request, and notifies to the route control section 46. The route control section 46 preferentially processes the activation request from the port decided by the processing port deciding section 72. In the embodiment, since there are only the two ports (A and B), when the port (B) performs the busy response during the coupling of the port (A), the processing port deciding section 72 decides the port (B) as a port which subsequently preferentially accepts the activation request. The route control section 46 executes the busy response for the activation request from the port (A) and accepts only the activation request from the port (B). Thus, even if the port (A) is the low speed port and the port (B) is the high speed port, the route control section 46 can alternately accept the activation request for each of the continuous activation requests. The busy ratios of the low speed port (A) and high speed port (B) can be almost equalized. Actually, as shown in the system construction of Fig. 4, eight ports (A to H) are provided for the magnetic tape control unit 10. In this case, during the coupling of a certain port, if there is an activation request to any one of the remaining seven ports, the busy response time at that time is stored. When the present transferring process is finished and the unit end occurs, by generating the busy end from the port having the oldest time among a plurality of busy response times, the acceptance of the activation request is allocated. The flowchart of Fig. 16 relates to the processing operation of Fig. 15. In step S1, the presence or absence of an activation request for the plurality of ports is checked.' When there is an activation request to a specific port, the port is coupled to the channel bus and the transferring process is executed in step S2. A check is made in step S3 to see if the transferring process has been finished or not. After completion of the transfer, a unit end is responded from the port during the coupling in step S4. In steps S1 to S4, during the coupling of a certain port, when there is an activation request from another port, the response time is stored in the busy response time storing section 70. After the unit end was responded, the port of the oldest time among the busy response times is determined as a processing port in step S5. A busy end is generated from the decided port in step S6. The busy cancellation waiting channel which received the busy end again generates the activation request. In step S7, the presence or absence of an activation request is discriminated. When there is an activation request, a check is made in step S8 to see if the port is a preferential allocating port or not. If NO, a busy response is returned in step S12. Thus, only the activation request for the preferential allocating port is accepted. In step S9, the port is coupled to the channel bus and the transferring process is executed. When the transferring process is finished in step S10, the busy response time of the processing port is reset and the unit end is responded in step S11. The processing routine is returned to step S13. If the record of the busy response times remains, the processing routine is again returned to step S5. The processes such that the port having the oldest time among the remaining busy response times is determined as a processing port and the busy end is generated are repeated. When no busy response time remains, the processing routine is again returned to step S1.

Claims: An apparatus for processing input/output requests from several host computers (14-i) using a plurality of channel buses (18-i) of different transfer speeds, comprising: at least a high-speed input/output port (20-2) and a low-speed input/output port (20-1) respectively connected to a high-speed channel unit (16-2) and a low-speed channel unit (16-1) of several host computers through the channel buses; an activation time measurement storing section (48, 230), for measuring and storing for every input/ output port an activation time (T1, T2) from the time point when a busy end is signalled in association with the end of transfer at another input/output port, to the time point when an activation request is received; and a route-control section (46) for setting a waiting time (T0) after the completion of a transfer on the high-speed channel, if a request is issued to said low-speed input/output port during said transfer on the high-speed channel, said waiting time (T0) being determined by the activation time (T1) of said low-speed input/output port, stored in the activation time measurement storing section (48,230), and for coupling said low-speed input/output port to said low-speed channel unit and executing a transfer on the low-speed channel if an activation request is issued to said low-speed input/output port during said waiting time (T0), and for coupling said high-speed input/output port to said high-speed channel unit and executing a transfer on the high-speed channel if an activation request is issued to said high-speed input/output port during said waiting time (T0) and if no activation request is issued to said low-speed input/output port during said waiting time (T0); whereby input/output requests can be equivalently executed without one-siding to a specific input/output port. An apparatus according to claim 1, further comprising a busy ratio measurement storing section (50) for measuring and recording the busy ratio of each input/output port by dividing the measured number of times a busy response is recorded by the number of input/output activation times from the channel unit for every input/output port and storing it; wherein the activation time measurement storing section (48) produces and stores a maximum time, an average time, and a minimum time each time the activation time of each input/output port is measured, and the route control section (46) selects one of the maximum time, the average time, and the minimum time and sets the waiting time of the activation request of the low-speed input/output port (20-1) so as to equalize the busy ratios of the input/output ports stored in the busy ratio measurement storing section. An apparatus according to claim 2, wherein the route control section (46) selects the said maximum time (T max ) when the busy ratio of the low-speed input/output port (20-1) is larger than the busy ratio of the high-speed input/output port (20-2), the average time (T av ) when the busy ratio of the low-speed input/output port is equal to the busy ratio of the high-speed input/output port, and the minimum time (T min ) when the busy ratio of the low-speed input/output port is smaller than the busy ratio of the high-speed input/output port. An apparatus according to any preceding claim, in which the activation time measurement storing section is provided for each input/output port (20-i). A method of processing input/output requests to input/output ports from several host computers (14-i) using a plurality of channel buses of different transfer speeds, in such a way that the input/output requests can be equivalently executed without one-siding to a specific input/output port, the method comprising: an activation time measurement storing step of measuring and storing an activation time (T1) from the time point when a busy end is signalled in association with the end of transfer at another input/output port to the time point when an activation request is received, with respect to each of a high-speed input/output port and a low-speed input/output port connected respectively to a high-speed channel unit and a low-speed channel unit on the upper unit side through the channel buses; a step of setting a waiting time (T0) after the completion of a transfer on the high-speed channel, if a request is issued to said low-speed input/output port during said transfer on the high-speed channel, said waiting time (T0) being determined by the activation time (T1) of said low-speed input/output port, stored in the activation time measurement storing section (48,230), and a route control step of coupling said low-speed input/output port to said low-speed channel unit and executing a transfer on the low-speed channel if an activation request is issued to said low-speed input/output port during said waiting time (T0), and of coupling said high-speed input/output port to said high-speed channel unit and executing a transfer on the high-speed channel if an activation request is issued to said high-speed input/output port during said waiting time (T0) and if no activation request is issued to said low-speed input/output port during said waiting time (T0). A method according to claim 5, further having a busy ratio measuring step of measuring and recording a busy ratio for each of said input/output ports, calculated by dividing the measured number of busy response times by the number of input/output activation times from the channel unit and storing them for every input/output port; and wherein in the activation time measurement storing step, each time the activation time of each of the input/output ports is measured, a maximum time, an average time, and a minimum time are produced and stored, and in the activation request waiting step, one of the maximum time, average time, and minimum time is selected and the waiting time of the activation request of the low-speed input/output port is set so as to equalize the busy ratios of the input/output ports obtained in the busy ratio measurement storing step. A method according to claim 6, wherein in the route control step, the maximum time is selected when the busy ratio of the low-speed input/output port is larger than the busy ratio of the high-speed input/ output port, the average time is selected when the busy ratio of the low-speed input/output port is equal to the busy ratio of the high-speed input/output port, and the minimum time is selected when the busy ratio of the low-speed input/output port is smaller than the busy ratio of the high-speed input/output port. An apparatus according to claim 1, wherein the route-control section (46) causes a processing request from the high-speed channel unit to the high-speed input/output port to wait for a preset waiting time when a busy end is transmitted from the low-speed input/output port to the low-speed channel unit and to accept a processing request from the low-speed channel unit to the low-speed input/output port for the duration of the waiting time; the apparatus further including a waiting time setting section (232) for varying the waiting time of the route control section on the basis of the time measured by the activation time measuring section (230). An apparatus according to claim 1, in which at least a high-speed input/output port (20-2) and a low-speed input/output port (20-1) are respectively connected to a high-speed channel unit (16-2) and a low-speed channel unit (16-2) of several host computers through the channel buses, and in which the route-control section (46) causes a processing request from the high-speed channel unit to the high-speed input/output port to wait for a preset waiting time and to accept a processing request from the low-speed channel unit to the low-speed input/output port during the waiting time when a busy end signal is transmitted from the low-speed input/output port; the apparatus further including a waiting time setting section (232) for setting the waiting time of the route control section by an input operation from an operator. An apparatus for processing input/output requests from several host computers (14-i) using a plurality of channel buses (18-i) of different transfer speeds, comprising: a plurality of input/output ports (20-i) connected to a plurality of channel units on the host computer side through a plurality of channel buses; a judging section (68) for counting the number of times of a loop state in which a busy response for an activation request and a response of a busy end associated with the end of transfer of another input/output port are repeated in one of the plurality of input/output ports and for judging whether the number of loop times exceeds a predetermined value; and a route-control section (46) for preferentially processing the activation request of an input/output port when the judging section determines that the number of loop times at that input/output port exceeds the said predetermined value; whereby input/output requests can be equivalently executed without one-siding to a specific input/output port. A method of processing input/output requests to input/output ports from several host computers using a plurality of channel buses of different transfer speeds, in such a way that the input/output requests can be equivalently executed without one-siding to a specific input/output port, the method comprising: a judging step of counting for each input/output port the number of times of a loop state in which a busy response for an activation request and a response of a busy end associated with the end of transfer at another input/output port are repeated in one of a plurality of input/output ports connected to a plurality of channel units on the host computer side through the channel buses and judging whether the number of loop times exceeds a predetermined value; and a route control step of preferentially processing the activation request of an input/output port when the number of loop times at that input/output port is judged to exceed the said predetermined value. An apparatus for processing input/output requests from several host computers (14-i) using a plurality of channel buses (18-i) of different transfer speeds, comprising: a plurality of input/output ports (20-i) connected to a plurality of channel units on the host computer side through the plurality of channel buses; a busy response time storing section (70) for storing the time when a busy response for an activation request is performed with respect to each input/output port; a processing port deciding section (72) for designating the input/output port having the oldest of the busy response times as a preferential processing port each time a transfer process for the said activation request is finished; and a route-control section (46) for preferentially processing the activation request of the preferential processing port decided by the processing port deciding section; whereby input/output requests can be equivalently executed without one-siding to a specific input/output port. An apparatus according to claim 10 or 12, wherein the route-control section accepts the activation request only for the said preferential processing port and performs a busy response in response to the activation request of the other input/output port or ports. A method of processing input/output requests to input/output ports from several host computers using a plurality of channel buses of different transfer speeds, in such a way that the input/output requests can be equivalently executed without one-siding to a specific input/output port, the method comprising: a busy response time storing step of storing the time when a busy response for an activation request is performed with respect to each input/output port connected to a plurality of channel units on the host computer side through the plurality of channel buses; a processing port deciding step of deciding the input/output port having the oldest busy response time as a preferential processing port each time a transfer control for the said activation request is finished; and a route control step of preferentially processing an activation request of the said preferential processing port decided in the processing port deciding step. A method according to claim 11 or 14, wherein in the route-control step only the activation request for the said preferential processing port is accepted and a busy response is performed in response to the activation request of the other (or another) input/output port. An apparatus or method according to any preceding claim, wherein the channel buses are connected to respective magnetic storage apparatuses.

Inventors: KOYAMA SUSUMU, KOYAMA, SUSUMU, Koyama, Susumu, c/o Fujitsu Limited
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1995
Main classification: G06F13
IPC codes: G06F13