METHOD OF OPERATING A DISK STORAGE SYSTEM

Abstract: A method for operating a disk storage system, comprising a disk and forming part of a communications network, simultaneously maintains the continuity of a plurality of data streams. Typically, each stream transfers video data to or from the disk storage system. Illustratively, each of the data streams is produced in the network at a rate of Wbase bits/sec and consumed by the disk storage system or produced by said disk storage system and consumed inthe network at a rate of Wbase bits/sec. One I/O transaction is performed for each stream in each of a plurality of I/O cycles of duration S/Wbase, wherein in each I/O transaction a segment of S bits is retrieved from or stored in the disk. The number of streams whose continuity can be maintained in this manner is limited by the number of I/O's which can be performed in a cycle of duration S/Wbase. More generally, when a stream has a bit rate (A/B)Wbase bits/sec where A and B are integers chosen independently for each stream, then for this stream A I/O transactions are performed in B cycles of duration S/Wbase. If the number of disks is Nd,Nd>/=1, then the I/O cycles have a duration NdS/Wbase and then A I/O transactions are performed in each disk for each stream in B I/O cycles.

Description: METHOD OF OPERATING A DISK STORAGE SYSTEM Field of the Invention The present invention relates to a method for operating a storage system such as a disk storage system. In accordance with the invention, I/O transactions for the disk storage system are scheduled so that the continuity of a plurality of streams is simultaneously maintained. In a network, the inventive method allows a plurality of users to independently and simultaneously access the disk storage system to store and retrieve stream oriented data such as that found in digital video and audio applications. The invention is also applicable to a stand-alone system wherein a disk storage system is accessed to retrieve or store data belonging to a plurality of streams. The streams, for example, are retrieved from the disk storage system for display locally on a monitor or received from an external source for storage in the disk storage system. Background of the Invention One application of the inventive method for operating a disk storage system is in a network such as a local area network. A Local Area network (LAN) for handling video data is illustrated in FIG 1. The network 10 comprises a shared transmission medium 12 and a plurality of stations 14 connected to the shared transmission medium. In addition, a server 16 is connected to the shared transmission medium. A disk storage system 20 for storing a plurality of video files is connected to server 16. A plurality of the stations 14 typically wish to access the disk storage system simultaneously to retrieve video files stored in the disk storage system or to write video files into the disk storage system. As indicated above, the invention is also applicable to a stand-alone system wherein a disk storage system is accessed to retrieve streams for display on a local monitor or a disk storage system is accessed to store streams received from an external source. Streaming data differs from transactional data as follows. With transactional data applications, the data rate associated with the traffic source is highly variable, i.e, it exhibits a high peak-to-average ratio. In contrast, the data rate associated with the transmission of a stream is relatively constant and is generally higher than the average rate associated with a transactional source. In stream oriented applications such as video, the process according to which data is produced by a source (e.g., a disk storage system) and consumed by a destination (e.g., a decoder at an end-user station) is relatively continuous and steady. As far as the storage system is concerned, two distinct but similar operations are of interest: (i) the recording of streams produced by sources in which case the storage system is the consumer, (ii) the playback of previously recorded stream-oriented files in which case the storage system is the source. These processes are schematically illustrated in FIG 2 and FIG 3, respectively. The storage requirements for streaming data such as video and multimedia data are different than the storage requirements for typical LAN data which is transactional in nature. The size of the files is an order of magnitude greater or more. Even with compression techniques, the physical storage needs are large. While laser disks and CD ROMs provide cost effective storage, they are awkward for providing simultaneous access to multiple users. A preferred storage medium for video files is the magnetic disk storage system. A magnetic disk storage system 20 is illustrated in FIG 4A. The disk storage system 20 comprises a plurality of disk drives 200. Each disk drive 200 comprises a disk 21 and a controller 210. The disk drive 200 is shown in greater detail in FIG 4B. As shown in FIG 4B, the disk 21 of the disk drive 200 comprises a plurality of platters 22. Each platter 22 has one or two magnetic surfaces, a bottom surface 23 and/or a top surface 24, for recording. Associated with each recording surface 23 or 24 is a read/write head 26. In the disk 21 of FIG 4B, let h denote the number of heads, and thus, usable surfaces. The heads 26 are moved to particular locations on the platter surfaces 23,24 by the actuator 28 which is controlled by a controller 210. Thus, the controller 210 controls the proper positions of the read/write heads 26 and the transfer of data in both directions between the magnetic surfaces and a local buffer 30 which forms part of the control 210. The control 210 also manages the transfer of data across the SCSI bus 220 (see FIG 4A) into and out of a buffer internal to the adapter 230. The adapter 220 is then in charge of the transfer of data, via the system bus 250, into and out of the server computer system 16 which includes the memory of 260, CPU 270, and network interface 280. In the case of a stand-alone system, the computer system 16 may not be a server and may not include a network interface. As shown in FIG 5, each recording surface 23, 24 is divided into a number of concentric tracks. Tracks on all surfaces which are located at the same radius form a cylinder. The number of tracks in a cylinder is thus equal to h. Let c denote the number of tracks per surface (and thus also the number of cylinders) , and consider the tracks (and thus cylinders) to be numbered sequentially l, ...,c, starting with the outer track (cylinder) . Each track is divided into a number of fixed size sectors. Due to the circular geometry of the surface, the number of sectors in a track is not the same for all tracks; there being more sectors in outer tracks than in inner tracks. As shown in FIG 6, the cylinders in the disk are divided into subsets of contiguous cylinders called zones, such that the number of sectors per track in a zone is the same for all tracks in the zone. We let Z denote the number of zones, and consider the zones to be numbered sequentially from 0 to Z-l starting with the outer zone on the disk. In FIG 6, the number of sectors in a track of zone i is designated σ s and the number of cylinders in zone i is designated k,. Note that not all disks are organized into zones . The disk rotates permanently at a constant speed of R rotations per minute, and the read/write heads are moved all together from one cylinder to another, as needed. All I/O transactions are for an integral number of sectors, the specific number of which depends on the application. To limit the overhead caused by head movement when writing or reading a block of data, the sectors on the disk are used consecutively and sequentially, going from sector to sector on a given track, from track to track in a given cylinder, and from cylinder to cylinder. An example of a disk drive is the HP C2240 drive which has h=13 read/write heads, a total of c=2051 cylinders, and a rotational speed of R=5400 rotations/minute. The 2,051 cylinders comprise 1981 data cylinders, 69 spares, and one for logs and maintenance information. They are organized into eight zones. When a request for an I/O operation is placed in the disk storage system (say a read or write operation for some number of consecutive sectors) , the heads are first moved to the cylinder where the first sector is located; the delay incurred in this operation is referred to as the seek time (X seek ) . The head corresponding to the appropriate track then waits until the first sector appears under it, incurring a delay referred to as the rotational latency (X ro ) . Once the first sector is located, the head begins reading or writing the sectors consecutively at a rate determined by the rotational speed; the time to read or write all sectors constituting the block is referred to as the transfer time (X t - a ^ fer ) • Note that if the block of data spans sectors located on more than one track in a given cylinder, then a switch from one head to the next is made at the appropriate time, thus incurring a so-called head switch time. If the block spans sectors located on multiple cylinders, then a head movement from one cylinder to the next takes place, thus incurring a track-to-track seek time each time this occurs. Accordingly, in performing an I/O operation, a certain amount of time is required. To asses the performance of a disk supporting an application, an analysis of the time required in each transaction must be undertaken. The total time required in performing a read or write operation for a block T 1/0 (block), is the sum of seek time, rotational latency, and transfer time. T I/0 (block) =X seek +X ro +X trans FIG 7 shows how the total time T I/0 for a block is divided into, seek time, rotation latency, and transfer time. As shown in FIG 7, the transfer time includes some head switch times and/or track-to-track seek times. It should be noted that seek times, rotational delays and transfer times may be random and not known a priori. Note that to get the total time required to get the data transferred into the system's memory, one should also account for any additional time that may be incurred in contending for the SCSI bus, in transferring the data from the controller's buffer to the system's memory. However, as these operations take place to a large degree simultaneously with the transfer of data off the disk into the controller's memory, such additional delay is negligible and may be ignored. The most important requirement on the storage system in supporting an active stream is to maintain the continuity of the stream. In the case of playback, data must be retrieved from the disk and made available to the consumer (e.g., a decoder) no later than the time at which it is needed so as to avoid letting the decoder underflow. Similarly, when a stream is getting recorded, the writing of data on the disk must keep up with the rate at which it is getting produced so as to avoid letting the buffer (e.g., the buffer 30 of FIG 4B) overflow and thus losing data. Thus, to maintain continuity, every I/O operation must be completed within some stringent time constraint. In view of the foregoing, it is an object of the present invention to provide a method for performing I/O transactions in a disk storage system so that the continuity of a plurality of streams is simultaneously maintained. Summary of the Invention The present invention is directed to a method for operating a disk storage system comprising one or more disks. The disk storage system is operated so as to simultaneously maintain the continuity of a plurality of data streams. Typically, the streams transport video data to or from the disk storage system. The disk storage system may be located in a network such as a local area network and maintain the continuity of a plurality of streams in the network. Alternatively, the disk storage system may be part of a stand¬ alone system in which a plurality of video streams are retrieved from storage and displayed locally on a monitor, or received from an external source and locally stored in the disk storage system. Thus, the invention is described below in connection with a network such as a LAN, but it should be understood that the inventive method for operating a disk storage system is not restricted to use in such a network. In accordance with the invention, I/O transactions take place in I/O cycles. For streams produced by the disk storage system, the data is consumed by the network in consumption cycles which follow one another without gaps. For streams produced by the network, the data is produced in production cycles which follow one another without gaps. In an illustrative embodiment of the invention, the disk storage system comprises one disk. Each data stream is either produced by the network (e.g., produced by a video coder in the network) at a constant basic rate of W base bits per second and consumed by the disk, or produced by the disk and consumed by the network (e.g., consumed by a video decoder in the network) at a constant basic rate of W basc bits/sec. One I/O transaction is performed for each stream in each of a plurality of successive I/O cycles of duration S/W base =T p | av . In each I/O transaction, a segment of S bits is stored in or retrieved from the disk. Illustratively, W base =1.2 Mbits/sec and S=40 Kbytes. It should be noted that T I/0 , the total time for each I/O transaction (T I/0 =X seek +X ro +X trans ) , is much shorter than T play which is the time it takes the network to produce or consume a segment of S bits of a stream. The number of streams whose continuity can be simultaneously maintained is limited by the number of I/O transactions which can be performed in an I/O cycle of duration T play . This depends on the locations of the retrieved and stored segments in the disk (as T I/0 for each transaction depends on the location) as well as the order in which the I/O transactions are scheduled. In accordance with the present invention, two modes of operation can be considered. The first mode of operation, known as the synchronous mode operates as follows. The I/O transactions for the active streams are scheduled in a particular predetermined order in each I/O cycle, but the production or consumption cycles of duration T p)av in which the data segments of the active streams are produced or consumed by the network are not necessarily aligned with each other. The start of consumption or production cycles for each stream are delayed or advanced appropriately to maintain continuity over the lifetime of each stream. The later the start of the first consumption cycle or the earlier the start of the first production cycle for each stream, beyond the minimum necessary, the larger is the buffer requirements. Consider a stream i produced by the disk and consumed by the network. The first I/O transaction for the stream i takes place in an I/O cycle at time T*. Consumption of the fetched segment of size S bits takes place in a consumption cycle of duration S/W base which begins after T*. The time after T* at which the first consumption cycle for the stream i begins is determined so that all the other streams complete their I/O transactions and stream i completes its second transaction before the end of the first consumption cycle of the stream i, as the second consumption cycle for stream i must begin immediately after the first consumption cycle or the stream i will not be continuous. Similarly, each of the other streams must complete their next I/O transactions and stream i must complete its third I/O transaction before the end of the second consumption cycle for stream i. This same condition holds for each succeeding cycle for which the stream i is active. The reason for this condition is that the I/O transactions of the streams take place in a non-varying predetermined order. Now consider the case of a stream j produced by the network. The first production cycle for the stream j produced in the network is timed to end so that an I/O transaction for the stream j and an I/O transaction for all other streams can take place before the end of the second production cycle for the stream j which immediately follows the first production cycle. Then, to maintain the continuity of the stream j , before the end of each succeeding production cycle of the stream j , one I/O transaction is performed for the stream j and one I/O transaction is performed for each of the other active streams. The second mode of operation is known as gated operation. In the gated operation, the order of I/O transactions for the active streams may vary from one I/O cycle to the next. In order to be able to let the order of I/O's to vary from cycle to cycle, it is important not to allow the consumption of segments fetched in a given I/O cycle to take place earlier than the end of the given I/O cycle or to allow the production of segments to be stored in a given I/O cycle to take place later than the beginning of the given I/O cycle. If consumed (produced) at the earliest (latest) time, then the consumption (production) cycle for a segment fetched (stored) in a given I/O cycle for a given stream would coincide with the following (preceding) I/O cycle. If this is the case for all streams, then the consumption and production cycles for all streams are aligned with each other, as well as with the I/O cycles. But it is also possible to delay the consumption of a segment fetched for a given stream in a given I/O cycle beyond the start of the next I/O cycle, and for this delay to be different from stream to stream. Similarly, it is possible for the production of a segment to be stored in a given I/O cycle to be advanced so that it ends before the start of the given I/O cycle and for this advance to be different from stream to stream. In this case, however, the buffer requirement is larger. One way of implementing a gated operation is as follows: a sequence of cycles of duration T p ι ay is defined, i.e., ... In each cycle T' play , each stream has one I/O transaction. In addition, in each cycle T' p ι ay , for each stream, one data segment S is consumed or produced by the network. Segments which are consumed by the disk in cycle T' play are produced by the network in cycle T' "1 ,,,^. Segments which are produced by the disk in cycle T' play are consumed by the network in cycle T i+1 play . The advantage of this technique is that the order of the I/O transactions may vary from cycle to cycle. For example, the I/O transactions to be performed in a cycle may be sorted according to their locations on the disk so as to minimize the total I/O overhead. To achieve a performance which is not dependent on the particular selection of files being played back or recorded (as pertaining to the location of the files on the disk) , the locations of the segments belonging to each file can be randomized over the entire disk. The advantage of this is that the total I/O time (T I/0 ) for any segments fetched in a cycle of duration T play is a random variable which is independent of the I/O time of all other segments to be fetched in the same, as well as in other, I/O cycles of duration T play . As a result, the sum of the I/O times for all segments is the sum of independently and identically distributed random variables . Alternatively, the most popular files could be recorded on the outer zones of the disk, and the least popular files could be recorded in the inner zones, as the average I/O time is smaller for segments in the outer zones than the inner zones. In the case where some streams have a bit rate different from the base bandwidth W base , then zero, one, or more than one I/O transactions may be performed for that stream in particular I/O cycles of duration T play . For example, if a stream has a bit rate of 2W base , two I/O transactions will be performed in each I/O cycle of duration T p)ay . If a stream has a bit rate of 1.5 W base , the I/O transactions are alternated between one transaction in each I/O cycle of duration T p ι ay and two transactions in each I/O cycle of duration T p , ay . If a stream has a bit rate 0.5 W base , then there is one I/O transaction in alternate cycles. In general, for a stream having a bit rate which is (A/B)W base , where A and B are integers determined separately for each stream, A I/O transactions are performed within B I/O cycles of duration T p)ay . In some cases, B is set to a fixed value N super for all streams. The present invention is also applicable to a disk array comprising N d disks. In this case, when all the streams have a bandwidth (A/B)W base , the I/O cycle has a duration of N d S/W base and there are A I/O transactions for each stream for each disk within B I/O cycles. It should be noted that requests to service a new stream are accepted or rejected depending on the capacity of the disk storage system and the current load. Once a request to service a new stream has been accepted, the bandwidth needed for it has been reserved. This way, the storage system can maintain the continuity of the streams which are accepted. This principle holds for the case of uniform data rates and multiple data rates and the case of a single disk or multiple disks. In the case of multiple data rates, the number of I/O's scheduled in any cycle should not exceed the maximum number of I/O's that can be performed in a cycle. Brief Description of the Drawings FIG 1 schematically illustrates a local area network comprising a server, disk storage system, transmission medium and a plurality of end-user stations. FIG 2 and FIG 3 illustrate the production and consumption of data by a disk storage system in the local area network of FIG 1. FIG 4A illustrates a disk storage system. FIG 4B illustrates one disk drive in the storage system of FIG 4A. FIG 5 illustrates the surface of a platter in the disk drive of FIG 4B. FIG 6 illustrates how the surface of a platter is organized into zones. FIG 7 illustrates the overhead time (T, /0 ) for an I/O transaction in the disk storage system of FIGs 4A and 4B. FIG 8 shows how the continuity of a plurality of streams is maintained simultaneously in accordance with the synchronous mode of the present invention. FIG 9 shows how the continuity of a plurality of streams is maintained simultaneously in accordance with the gating mode of the present invention. FIG 10 shows how data segments are located in a disk. FIG 11 shows how data segments are located in a disk array of N d disks . FIG 12 shows I/O, production and consumption cycles for G groups of streams having production and consumption cycles offset from one another. Detailed Description of the Invention FIG 8 shows how a disk storage system comprising one disk operates in accordance with the synchronous mode of the present invention. The case of three streams is considered, wherein the streams are labeled Stream 1, Stream 2, and Stream 3. Stream 1 and Stream 2 are produced by the disk and consumed by the network at a rate of W base bits/second. Stream 3 is produced by the network and consumed by the disk at the rate of W base bits per second. The streams 1 and 2 are divided into consumption cycles. In each consumption cycle of duration one segment of S bits is consumed by the network at the rate of W base bits/sec. The Stream 3 is divided into production cycles of duration T play =S/W base . In each production cycle, one segment of S bits is produced by the network at a rate of W basc bits/sec. Note that the consumption and production cycles for the Streams 1, 2, 3 are not aligned in time. I/O transactions take place in I/O cycles. Each I/O cycle has a duration of T play =S/W. In each I/O cycle, there is one I/O transaction for each stream, wherein a segment of S bits, is retrieved from or written into the disk. In each I/O cycle, the I/O transactions for the streams take place in a predetermined order, i.e, Stream 1, Stream, 2, Stream 3. Each I/O transaction has a duration T I/0 and the maximum number of streams for which continuity is maintained is determined by the number of I/O transactions which can be accommodated in an I/O cycle of duration S/W. The number of I/O transactions which can be accommodated in one I/O cycle of duration S/W base is not easily determined due to the fact that I/O is random on a priori unknown. Thus the number of transactions in an I/O cycle is determined probabilistically (e.g., the probability that a certain number of transactions exceeds the cycle length is equal to 10 "6 ) . Note that the I/O transactions are scheduled in the I/O cycles to maintain the continuity of the streams. Thus a segment produced by the disk in an I/O transaction in an I/O cycle is consumed by the network in a later starting consumption cycle for the particular stream. Similarly, a segment consumed by the disk in an I/O transaction in an I/O cycle is produced by the network in an earlier ending production cycle. For streams 1, 2, and 3, once the playback or recording has started, the consumption or production cycles are all of the same duration (S/W) and are back-to-back with no interruptions (that is the idea behind continuity) . Now the constraint on the disk scheduling problem is to get or store the next or previous segment prior to the completion of the current consumption or production cycle. It is always possible to start the first consumption or production cycle immediately following the end of or before the start of the first I/O transaction; once .this is started, then the next deadline for preforming the next I/O is S/W base sec from that time, and the one after is 2S/W base after, and so on. Furthermore, it is possible to start the first consumption cycle or complete the first production cycle, respectively, a certain time after or a certain time before the completion or start of the first I/O transaction. The bigger the delay or advance, the later (and thus more relaxed) is the deadline for future I/O transactions. For example, as shown in FIG 8, in I/O cycle I, a segment is produced by the disk for stream 1 which is consumed by the network in consumption cycle I which starts after this I/O transaction. Similarly, in I/O cycle II, a segment is produced by the disk for stream 1 which is consumed by the network in consumption cycle II which starts after this I/O transaction is complete. With respect to Stream 2, a segment is produced by the disk in I/O cycle I that is consumed by the network in a consumption cycle I which starts after this I/O transaction. Similarly, a segment is produced for the Stream 2 by the disk in I/O cycle II which is consumed by the network in consumption cycle II. For stream 3, a segment produced by the network in production cycle I is stored in the disk in I/O cycle I, a segment produced by the network in production cycle II is stored in the disk in I/O cycle II, etc. Note that in each case for stream 1 or 2, the next I/O transaction must take place before the start of the consumption cycle for that stream wherein the fetched data is to be consumed. The greater the delay between an I/O transaction and a consumption cycle in which the data is consumed, the greater are the buffer requirements. Note that a production cycle must end before the start of the I/O transaction in which the produced segment will be stored. The greater the delay between the end of a production cycle and the start of the corresponding I/O transaction, the greater is the buffering requirement. FIG 10 illustrates the operation of the disk storage system in the gated mode according to the present invention. Again there are three streams, Stream 1, Stream 2, Stream 3. Streams 1 and 2 are produced by the disk. Segments of S bits are consumed by the network at a bit rate of W base bits/sec in consumption cycles of duration T p ι ay =S/W basc . Stream 3 is produced by the network in segments of S bits at a bit rate of W basc bits/sec in production cycles of duration T play =S/W base . I/O transactions take place in I/O cycles of duration S/W. In the gated mode, illustrated in FIG 10, the I/O cycles and the production and consumption cycles are time aligned. These aligned cycles are labeled T i_1 p , ayr T^, T i+1 p . ay , etc. A segment of Stream 3 produced by the network in cycle T 1_I p ι ay is stored in the disk in an I/O transaction which takes place in cycle T' p|ay and a segment produced by the network in cycle T' p ι ay is stored in the disk in an I/O transaction which takes place in cycle T l+1 play . Similarly, a segment of Stream 1 or Stream 2 which is produced by the disk in an I/O transaction in cycle T' play is consumed by the network in cycle T ,+1 p ι ay and a segment which is produced by the disk in an I/O transaction in cycle T 1+1 p | ay is consumed by the network in cycle T' +2 p , ay . Note that the order of the I/O transactions may vary from one I/O cycle to another. For example, in cycle T' p . ay the order is Stream 1, Stream 3, Stream 2 and in cycle T 1+1 play the order is Stream 3, Stream 2, Stream 1. The schedule of I/O transactions within a cycle time should be ordered to minimize total overhead, i.e. the sum of T I/0 for all active streams, so as to maximize the number of streams for which continuity can be simultaneously maintained. Thus, I/O's within an I/O cycle should be scheduled in accordance with their location on a disk. One way to schedule I/O's is to move the heads from the outer cylinder to the inner cylinder in one cycle and then from the inner cylinder to the outer cylinder in the alternate cycle. Note that in the gated mode as illustrated in FIG 10, the requirement for continuity is maintained. The consumption or production cycles of streams 1, 2 and 3 are back-to-back with no interruptions (the idea behind continuity) . For each of the streams the next or previous segment is retrieved or stored prior to the completion of the current consumption or production cycle. If the segments of a stream file are placed in particular locations, then the assessment as to whether a new stream maybe accepted or rejected will require knowledge of the locations of all the segments that may be required in the lifetime of the stream, since the location of a segment affects the transfer time of that segment, and hence the number of I/O transactions that can be performed in a cycle. This argument is also valid when the segments of the various files are located in contiguous locations. To achieve a performance which is not dependent on the particular selection of files being played back or being recorded (as pertaining to their locations on the disk) and to achieve a performance which is consistent over all scenarios, the location of segments belonging to each file may illustratively be randomized over the entire disk . As shown in FIG 10, consider the disk to be divided into segment length bins. Data segments for each file are allocated to the segment bins on a random basis. The advantage of this arrangement is that the transfer time for any segment fetched in an I/O cycle is a random variable which is distributed over the entire range, and is independent of the transfer times of all other segments in the same as well as in other I/O cycles (unless, of course, multiple streams are playing back the same file and are time- synchronized with each other such that in each cycle they are all fetching the same segment, in which case it is sufficient to fetch a single copy.) As a result, the sum of transfer times for all segments being fetched in a cycle is the sum of independently and identically distributed random variables, and is independent of such sums in all other cycles. Furthermore, by the law of large numbers, as the number of segment fetched per cycle increases, the variance of the sum of transfer time decreases. Alternatively, the most popular files could be recorded in the outer zones of the disk and the least popular files could be recorded in the inner zones of the disk. It should also be noted that not all disks are zoned. When all tracks contain the same number of sectors, all segments transfer times are equal, there is no need for randomization and all segments of a file may be stored contiguously. In order to increase the number of streams beyond that which is possible with a single disk, an array of multiple disks may be utilized. The number of disks in the array may be designated by N d . All of the disks in the array are operated in the manner described above. In order to achieve good performance, it is desirable to insure that all N d disks have the same load, i.e., in each I/O cycle, there are an equal number of I/O transactions for each disk. One simple way to accomplish this is to consider the segments of S bits in a file to be grouped into data stripes of N d consecutive segments each. It is also useful to consider the segment bins in corresponding locations on each of the N d disks to form bin stripes of N d bin segments each. The bin stripes for N d disks are illustrated in FIG 11. The data stripes for a particular file are allocated randomly to the bin stripes. The striping of the data on the disk need not be horizontal, although the most natural case to consider is the horizontal striping. (Figure 11 indicates the striping to be horizontal . ) What is most desirable however is the fact that the allocation of segments to the disks should be according to a regular cyclic pattern, i.e., consecutive segments should be placed in order on disk 1 then 2 then 3, ... until N d then 1, 2, etc. This way, regardless of where in its file each stream starts, the load on all disks is balanced; indeed, in each cycle and for each stream, a stripe worth of segments is fetched, and all segments in that stripe are guaranteed to be on different disks. When N d disks are used to serve a plurality of streams, each of which is produced or consumed by the network in segments of S bits and at a bit rate of W base bits/sec, the I/O cycle length is now N d S/W base =N d T play . In each I/O cycle, N d segments are retrieved or recorded for each stream, one segment from each disk, thus guaranteeing that all disks are accessed equally. The number of streams where continuity can be simultaneously maintained is determined by the number of I/O transactions which can be performed on a disk in an I/O cycle of duration N d T p . ay . In addition, it should be noted that the N d segments fetched for a stream in an I/O cycle could come from one (e.g., horizontally) stripe or adjacent portions of two chronologically consecutive stripes. This permits a stream to stop and resume anywhere and not be restricted to stopping at stripe boundaries without jeopardizing the uniform loading of the disk. The inventive method for operating a disk storage cycle is applicable to a conventional RAID (Redundant Array of Inexpensive Disks) Assume the maximum number of allowed streams is ,*. Then, the maximum number of I/O transactions to be performed in a cycle time N d S/W base is N j N,*, i.e, . each of the N d streams has one transaction in each of N d disks. There are a number of ways in which this number of I/O transactions can be scheduled within each I/O cycle. Consider the gated operation described above, wherein the consumption and production cycles of all streams are time aligned. If the segment buffers used for a stream in the buffer 30 are separate from those for other streams, then each stream needs 2N d segment buffers. This can be understood as follows. There is no a priori order in which the I/O's are carried out and it is possible for all N d I/O transactions for a given stream to take place at one time. At the beginning of every I/O cycle, each stream has N d segments produced by the disk storage system during the previous cycle and waiting to be consumed by the network or N d segments produced by the network in the previous cycle and waiting to be consumed by the disk storage system. In the case of a stream produced by the disk storage system and consumed by the network, it is not known when during the cycle (e.g., beginning or end) the next N d segment will be produced by the disk storage system. Similarly, in the case of a stream produced by the network and consumed by the disk, it is not known when during the cycle the N d segments will be consumed by the disk, but it is known with certainty that by the end of the cycle an additional N d segments will be produced by the network. Thus, in either type of stream, to be sure no segments are lost, 2N d segment buffers are required for each stream. With buffer sharing among the streams, the number of segment buffers required for all streams can be substantially reduced. An alternate scheduling technique, involves dividing the streams into G groups. The size of each group may be for example N aI /G. The consumption and production cycles of the streams in each group are time aligned with each other, but the consumption and production cycles of each successive group are offset by one (l/G)* of an I/O cycle of duration N d S/W base . FIG 12 shows the production and consumption cycles for G=8 groups of streams, for the case N d =4 disks. As shown in FIG 12, the I/O cycle is divided into G subcycles. In each subcycle of length N d S/W base G, the I/O transactions are performed for the group of streams whose production/consumption cycles begin at the end of the particular I/O subcycle. The group of I/O transactions performed in each subcycle is sorted separately, for example, alternating between increasing and decreasing order of cylinders so as to minimize seek overhead. As N d =4, the number of I/O transactions for a stream served in each subcycle is four. For example, as shown in FIG 12, for a stream in Group 2, which is served in I/O subcycle #2, there is one segment retrieved from each of the four disks. It should be noted that G can be larger than or smaller than N d . This scheduling technique also reduces the amount of buffers utilized. It should also be noted that in the operation described above, all disks experience the same load. In yet another technique for scheduling I/O transactions in each I/O cycle of duration N d S/W base , the streams are again divided into G groups and the size of each group is again, for example, N a ^G. I/O transactions are performed in subcycles of length N d S/W basc G, however, instead of retrieving or storing N d segments for each stream in an entire group of size N a! /G, there is retrieved or stored one segment for each stream in N d groups. The segments retrieved or stored are those which begin consumption immediately following the subcycle or which were produced immediately preceding the subcycle. This scheduling technique also leads to reduced buffer size requirements. In order to keep the load on all disks balanced during each I/O subcycle, it is desirable to guarantee that the segments to be retrieved or stored for each of the N d groups served in a subcycle come from separate disks. This imposed structure on the order in which segments are fetched for various streams from the various disks has implications on the initial delay incurred by new streams joining the system, and places limitations on the ability to vary the disk access pattern for streams. Consideration is now given to how the disk storage system is able to support streams with different production/consumption rates. While dividing the I/O cycle into subcycles can lower buffer requirements, grouping multiple consecutive I/O cycles into a supercycle can accommodate streams with diverse bandwidth requirements. Consider a disk storage system consisting of N d disks which can support N al streams, each of nominal rate W base bits/sec. The basic scheduling algorithm of fetching one stripe per stream per I/O cycle of duration N d S/W base is now modified to allow fetching multiple stripes per stream per supercycle where a supercycle comprises N super consecutive I/O cycles. The number of stripes to be fetched in a supercycle depends on the stream rates. This scheduling algorithm can support streams of different rates ranging from a minimum of W basι ./Nsuper bit/sec to a maximum of N^W^.,. bits/sec with increments of W base /N supcr bits/sec. Streams that require rates that do not belong to the above denominations will be assigned a bandwidth of the next higher allowable rates, in which case certain I/O bandwidth is wasted. For example, let N super = 16, then a stream with rate 1.25W base bits/sec is allowed to fetch 20 stripes per supercycle, a stream with rate 0.125W base bits/sec is allowed to fetch 2 stripes per supercycle, and a stream with rate 0.3W base bits/sec is allowed to fetch 5 stripes per supercycle (although this stream may need to fetch fewer than 5 stripes in some supercycles) . To define the scheduling in more precise terms, let C, be the i" 1 I/O cycle of a typical supercycle where i=l, 2, ... , N supcr . For a particular stream, numbered j , L tJ stripes are allowed to be fetched in the i" 1 I/O cycle. Clearly, L (J must be an integer between 0 and N j ,. To satisfy the disk I/O bandwidth constraint for C, within a supercycle, the sum of L, d over all j must not exceed N,*. To satisfy the continuity constraint for stream j, the sum of L, d over i=l, 2, ... ,N super must be greater than or equal to the amount of data, normalized by the stripe size, produced/consumed by stream j in a supercycle. To minimize latency and buffer requirements, it is desirable, for each stream j , to minimize the variance among the set of numbers {L, d } as well as to minimize variance of the ∑L for all cycles i. The j above criteria serve as the basis for admitting and scheduling the data retrieval of a stream. The choice of N super depends on a number of considerations . A large value of N super provides fine resolution of the streams and hence efficient use of I/O bandwidth. However, it increases start-up latency as well as the complexity of the scheduler. Thus, N super must be carefully selected for the anticipated mixture of stream rates and tolerable start-up latency. Another way to view the supporting of streams with different bit rates is as follows : Consider a disk storage system comprising N d (N d ≥l) disks. Each stream has a bit rate of (A/B)W base where A and B are integers chosen separately for each stream. The I/O cycles have a duration of N d S/W base . For each stream, within each B I/O cycle there are A I/O transactions for each of the N d disks. Preferably, for each stream, the A I/O transactions for each disk are equally spaced over the B I/O cycles as this balances the load across the disks. Illustratively, the value of B is set to N supcr for all streams. This makes it relatively simple to keep track of active streams and to solve the scheduling problem. In this case, B=N super I/O cycles is equal to one supercycle as described above. Consideration is now given to how the disk storage system is able to serve new streams. Start-up latency is the time elapsed from a request to initiate a new stream until the stream may begin to consume or produce its data. Two factors contribute to this latency. First, a stream requires a certain amount of data to be made available before it is able to begin data consumption or production; (this is referred to as the start-up data) . Secondly, once the start-up data is available (e.g., is retrieved from memory), a stream has to wait for the beginning of its next cycle before it can begin consuming its start-up data; (Recall that in the gated mode of operation, all streams may have their cycles time-aligned) . A stream is said to be in the start-up phase when its start-up data is being fetched. Consider a disk storage system consisting of N d disks supporting streams of bandwidth W base bits/s, operating in the gated mode. As indicated above, the maximum number of streams N--^ that can be supported simultaneously is equal to the maximum number ln max of I/O's that can be performed in one disk in a period of time equal to one I/O cycle of duration N d S/W base , where S is the segment size. When configuring a system, however, the maximum number of streams that may be allowed to be active simultaneously may be limited to some number, denoted by N α so that the number of I/O transactions allowed for one disk in an I/O cycle for transactions related to data streams is M^. At any given time, the number of active streams is denoted N^,.. This corresponds to M^*^ I/O transactions related to streams for one disk in each I/O cycle. In general, M maX >M a ι≥M activc . The excess disk access capacity (i.e., M^ - M.,-,*^) is then used for I/O transactions to support storage management functions, and to prefetch start-up data more quickly (thus decreasing the start-up latency) . N j is enforced by means of a call control processor which rejects a request for a new stream to become active if the number of currently active streams, N^^, is equal to N al (or if the number of I/O transactions for active streams in an I/O cycle M^^ is equal to M al ) . Such a call control processor may be implemented in the server 16 of FIG 1. Consider the case . The start-up latency incurred by a new stream is dependent on many factors; namely, • the amount of start-up data needed for that stream; • the number of streams that are active at the time of request, as this directly affects the available disk access capacity at the time of arrival; • the number of streams which are in the start-up phase at the time of request, and the amount of residual start-up data for each, • the number of other new streams which arrive during the start-up period of the new stream, and possibly the arrival process according to which these streams arrive, • the service discipline according to which the new streams are served, • the scheduling discipline according to which active stream I/O's and new stream I/O's are scheduled in a cycle. There is now described some scenarios for the arrival of new streams, and examples of possible service disciplines and I/O scheduling disciplines. Consider that there already are N^ e streams in the active state, and a certain number, N new , of requests to initiate new streams, where N new ≤N al -N active . The following two arrival scenarios are considered: a) Uniform arrival process: The N new requests are uniformly distributed during a period of time equal to K cycles. The average rate at which the requests arrive is equal to N new W base /KS arrivals/second. b) Poisson arrival process: The N ncw requests arrive according to a Poisson process with a constant rate equal to N new W basc ./KS arrivals/second. Given a certain number of streams presently in their start-up phase, the service discipline defines the specific algorithm according to which the excess disk access capacity is allocated to these streams. Two such service disciplines are First-Come-First-Served and Round Robin. Other service disciplines can also be envisioned, such as Last-Come-First- Served with or without preemption, whereby the entire disk's excess capacity is entirely allocated to the new stream which arrived last, and Shortest-Job-First, again with or without preemption, whereby the entire disk's excess capacity is allocated to the stream with the smallest start-up data requirement. The I/O scheduling discipline specifies the order within a cycle in which the I/O's for the active streams and the I/O's for the selected new streams in the start-up phase are performed. Two disciplines are considered: a) Fully-Sorted Scheduling: At the beginning of each I/O cycle and for each disk, all M^^ segments needed for the active streams, and up to M^- ^^ start-up segments, selected according to the service discipline in use, are fully-sorted and executed in that cycle. Should the total number of fully-sorted I/O's to be performed in a cycle be less than a predetermined maximum, then the remaining available disk access capacity can be used to serve any potential new start-up stream which may have arrived during the cycle. One way is to perform the scheduled fully-sorted I/O's first, and then serve the newly arrived streams in a subsequent sub-cycle, ensuring that the number of I/O's selected for service in the subsequent sub-cycle does not exceed the maximum number that can be performed in the remaining cycle time. The same arguments can then be applied recursively to create further sub-cycles, if the need arises. It should be clear that with multiple subcycles the total number of I/O's that can be performed in a cycle time is smaller than that which can be performed with a single fully- sorted cycle. Accordingly, it may prove advantageous to consider the following modification: as soon as knowledge of new segments to be fetched is acquired, those segments which lie ahead of the current position of the disk's head are selected and merged with the remaining portion of the originally sorted list, Separate subcyles: The I/O's corresponding to the active streams are performed first, sorted among themselves; then in the remaining cycle time, as many start-up I/O's as possible are scheduled for streams in the start-up phase, these too sorted among themselves. Just as with the fully-sorted case, the creation of subsequent subcycles beyond the first to serve newly arriving streams may be used. The method for serving new streams may be summarized as follows. The maximum number of I/O transactions for a disk in an I/O cycle of a particular duration is M πax . By this it is meant that the probability of M ^ I/O transactions not fitting within a particular I/O cycle is less than a predetermined small number such as 10 "6 . However, the number of I/O transactions for active streams may be limited to M.,* for each disk in an I/O cycle. The number of I/O transactions for active streams for each disk in an I/O cycle is M^^, where M ma χ>M a ,≥M active . The excess capacity M ^ - ,^ may be used for non- streaming data such as storage management functions, and to prefetch start-up data for new streams. If the number of M.^ ^ I/O transactions for active streams for each disk in an I/O cycle is less than M a *, new streams may be activated. The new streams may be activated in a manner so that the number of I/O transactions in a disk for active streams does not exceed M al in an I/O cycle. New streams may be selected for activation from all waiting streams according to a discipline such a first-come, first-served or round robin. Once one or more new streams are selected for activation, the I/O transactions for the start-up data of the new streams are scheduled within each I/O cycle to occupy the excess capacity M ^ -M a; .,^ for each disk using a particular algorithm. For example, the I/O transactions for the start-up data of new streams and the I/O transactions of already active streams may be sorted together or there may be separate subcycles for start-up data of new streams and already active streams. In short, a method for operating a disk storage system to simultaneously maintain the continuity of a plurality of streams has been disclosed. Finally, the above-described embodiments of the invention are intended to be illustrative only. Numerous alternative embodiments may be devised by those skilled in the art, without departing from the spirited scope of the following claims.

Claims: CLAIMS 1. A method for operating a disk storage system comprising a disk comprising the step of : maintaining simultaneously the continuity of a plurality of data streams, each of which is either produced at a rate of W base bits/sec and consumed by said disk storage system or produced by said disk storage system and consumed at a rate of W base bits/sec, by performing one I/O transaction for each stream in each of a plurality of successive I/O cycles of a predetermined duration T p ι ay , wherein in each I/O transaction for each stream a segment of S bits is retrieved from or stored in said disk, and wherein T play =S/W base . 2. The method of claim 1 wherein said disk storage system is located in a network and each of said streams is either produced or consumed in said network. 3. The method of claim 1 wherein the number of streams whose continuity can be simultaneously maintained is limited by the number of I/O transactions which can be performed in said disk storage system in a period of duration T p , ay . 4. The method of claim 1 wherein said I/O transactions for each stream are performed in a predetermined order in each I/O cycle. 5. The method of claim 1 wherein the order in which said I/O transactions are performed for each of said streams in each of said I/O cycles is determined individually for each I/O cycle. 6. The method of claim 5 wherein production and consumption cycles of said streams are aligned with said I/O cycles and further comprising the steps of : during the i m cycle of duration T p * ay , storing in said disk storage system segments of S bits belonging to particular streams and produced by said network in the (i-1)" 1 cycle and retrieving from said disk storage system segments of S bits belonging to particular streams and consumed by said network in the (i+l)" 1 cycle. 7. The method of claim 1 or 5 wherein said disk is organized into bins of size S bits and segments are allocated to bins randomly. 8. The method of claim 1 or 5 wherein segments belonging to often-accessed files are located in outer zones in said disk and segments belonging to rarely-accessed files are located in inner zones of said disk. 9. The method of claim 1 or 5 wherein segments are stored in the outer zones of said disk when said disk is not full. 10. The method of claim 1 or 5 wherein segments belonging to particular files are stored contiguously on said disk. 11. The method of claim 2 wherein said network is a local area network. 12. The method of claim 1 wherein said streams contain video data. 13. The method of claim 1 wherein said streams include audio data. 14. The method of claim 1 wherein said streams have a bit rate of (A/B)W base bits/sec, where A and B are integers chosen separately for each stream, wherein said disk storage system comprises N d ,N d ≥l, disks, each I/O cycle has a duration of N d T play and for each stream, A I/O transactions take place for each disk in B I/O cycles. 15. A method for operating a disk storage system comprising an array of N d disks comprising the steps of maintaining simultaneously the continuity of a plurality of data streams, each of which is produced at a rate of W base bits per second and consumed by said disk storage system or produced by said disk storage system and consumed at a rate of W basc bits/sec, by performing one I/O transaction for each stream in each of said N d disks in each of a plurality of I/O cycles of duration N d S/W basc , wherein in each I/O transaction a segment of S bits is retrieved from or stored in a particular disk. 16. The method of claim 15 wherein N d =l. 17. The method of claim 15 wherein segments are grouped into data stripes of N d consecutive segments, wherein said array is organized into bin stripes comprising corresponding locations in each of said N d disks, and wherein data stripes are allocated to bin stripes randomly. 18. The method of claim 15 wherein the N d I/O transactions for a stream in each I/O cycle of duration N d S/W base comprises retrieving or storing some segments from a first bin stripe and some segments from a second bin stripe. 19. The method of claim 15 wherein the total number of I/O transactions for active streams for each disk does not exceed a predetermined number in each I/O cycle. 20. The method of claim 15 wherein consecutive segments ' of said streams are allocated to the disks in said array in a regular cyclic pattern. 21. A method for operating a disk storage system comprising an array of N d (N d ≥l) disks comprising the steps of: maintaining simultaneously the continuity of a plurality of data streams, each of which is produced at a rate of (A/B)W base bits/sec and consumed by said disk storage system or produced by the disk storage system and consumed at rate of (A/B)W base bits/sec, where A and B are integers, chosen independently for each stream, by performing for each stream A I/O transactions in B I/O cycles of duration N d S/W basc in each of said N d disks, wherein in each I/O transaction, a segment of S bits is retrieved from or stored in a particular disk. 22. The method of claim 21 wherein said disk storage system is located in a communications network. 23. The method of claim 21 wherein the network produces or consumes W base bits/sec for each of the streams. 24. The method of claim 21 wherein said streams share buffer capacity. 25. The method of claim 23 wherein said streams are divided into G groups, wherein the production or consumption cycles of the streams within each group are aligned with each other, but the production and consumption cycles of successive groups are offset from the production and consumption cycles of the previous group by (l/G)" 1 of an I/O cycle, and wherein each I/O cycle is divided into G I/O subcycles of duration N d S/W basc G. 26. The method of claim 25 wherein in each I/O subcycle there is one I/O transaction performed in each disk for each stream in the group whose production or consumption cycle begins immediately after the subcycle. 27. The method of claim 25 wherein in each subcycle, one I/O transaction is performed for each stream in each of N d groups. 28. The method of claim 21 wherein the number of I/O transactions performed in each I/O cycle for each disk for active streams does not exceed a predetermined number. 29. The method of claim 28 further comprising the step of activating one or more new streams if the number of I/O transactions preformed in each I/O cycle for each disk for active streams is less than said predetermined number. 30. The method of claim 29 wherein excess capacity for I/O transactions in said disks is used for start-up data for said newly activated streams. 31. The method of claim 29 wherein new streams are activated according to a predetermined service discipline. 32. The method of claim 31 wherein the predetermined service discipline is chosen from the group comprising first-come- first-served, round robin, last-come-first-served, and shortest job first. 33. The method of claim 30 wherein in each I/O cycle, the I/O transactions of previously active streams and I/O transactions for the start-up data of newly activated streams are sorted together. 34. The method of claim 30 wherein in each I/O cycle, the I/O transactions of previously active streams are sorted and performed in one subcycle and the I/O transactions for the start-up data of newly activated streams are separately sorted and performed in a separate subcycle. 35. The method of claim 21 wherein said network is a local area network. 36. The method of claim 21 wherein said streams contain video data. 37. The method of claim 21 wherein I/O transactions for said streams have a predetermined order which does not change from one I/O cycle to the next. 38. The method of claim 21 wherein the I/O transactions have an order which is separately determined for each I/O cycle. 39. The method of claim 21 wherein the disk storage system is a Redundant Array of Inexpensive Disks. 40. The method of claim 21 wherein B has a fixed value for all streams N super , where N super is an integer. 41. The method of claim 21 wherein segments of said streams are allocated to the disks in said array in a regular cyclic pattern. 42. The method of claim 21 wherein for each stream the A I/O transactions for each disk are uniformly spread in B I/O cycles. 43. The method of claim 40 wherein N super I/O cycles form a supercycle, wherein in each I/O cycle of a supercycle, for each stream L stripes are fetched from or written into said disk storage system, wherein each stripe comprises one segment of S bits fetched from or written into each of said N d disks, and wherein for each stream the variance of the number L over the cycles of a supercycle is minimized. 44. The method of claim 43 wherein the variance of the total number of stripes fetched from or written into said disk storage system, for all of said streams in each cycle of a supercycle is minimized. 45. A method for operating a disk storage system including one or more disks comprising the steps of maintaining the continuity of a plurality of active streams by performing a certain number of I/O transactions in each of said disks in each of a sequence of I/O cycles, the number of I/O transactions performed in each disk in each I/O cycle being less than or equal to a predetermined allowed number of I/O transactions, and activating new streams whose continuity is to be maintained so that when the I/O transactions of the newly active streams are added to .the I/O transactions of the already active streams, the number of I/O transactions in each of said disks in said I/O cycles does not exceed said allowed number. 46. The method of claim 45 wherein excess capacity for I/O transactions in said disks is used for start-up data for said newly selected streams when they are in the start-up phase. 47. The method of claim 45 wherein in each I/O cycle, the I/O transactions of previously active streams and I/O transactions for the start-up data of newly activated streams are sorted together. 48. The method of claim 46 wherein in each I/O cycle, the I/O transactions of previously active streams are sorted and performed in one subcycle and the I/O transactions for the start-up data of newly activated streams are separately sorted and performed in a separate subcycle. 49. The method of claim 45 wherein said disk storage system comprises N d disks where N d is larger than or equal to one and wherein each of said streams for which continuity is maintained has a bit rate of (A/B) W base bits/sec, where A and B are integers chosen separately for each stream, said method comprising the step of performing for each active stream A I/O transactions in B I/O cycles of duration N d S/W base in each of said N d disks, wherein in each I/O transaction a segment of S bits is retrieved from or stored in a particular disk. 50. The method of claim 49 wherein said B I/O transactions are equally spaced over said A I/O cycles. 51. The method of claim 50 wherein B has the same value for all streams.

Inventors: BAIRD RANDALL B, GANG JOSEPH M, MCFADDEN MARTIN J, PANG JOSEPH W M, TOBAGI FOUAD A, BAIRD, RANDALL, B., GANG, JOSEPH, M., MCFADDEN, MARTIN, J., PANG, JOSEPH, W., M., TOBAGI, FOUAD, A.
Applicants: STARLIGHT NETWORKS INC, STARLIGHT NETWORKS, INC.
Application year: 1993
Main classification: G06F15
IPC codes: G06F3, G06F17, G11B27, H04N5, H04N7