UNIVERSITY OF ILLINOIS LIBRARY AT URBMA-CHAMPu^. r <— > / r JX*r /now UIUCDCS-R-79-976 UILU-ENG 79 1723 A STUDY OF DATA MANIPULATION ALGORITHMS IN MAGNETIC BUBBLE MEMORIES by KIN-MAN CHUNG June 1979 A STUDY OF DATA MANIPULATION ALGORITHMS IN MAGNETIC BUBBLE MEMORIES BY KIN-MAN CHUNG A.B. University of California, 1971 M.A. State University of New York, 1973 THESIS Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate College of the University of Illinois at Urbana-Champaign, 1979 Urbana, Illinois Digitized by the Internet Archive in 2013 http://archive.org/details/studyofdatamanip976chun Ill ACKNOWLEDGMENT I wish to express my sincere thanks to my advisor Professor C. L. Liu for his guidance and encouragement during the course of study at the university. I wish to thank Dr. C. K. Wong of IBM Coporation, whose interest and enthusiasm in this subject has greatly shaped the development of this thesis. Thanks also to Dr. F. Luccio of University of Pisa for several stimulating conversation. I also wish to thank IBM Watson Research Center for the finacial support during my stay at Yorktown Heights in Summer 1978, where part of the thesis was initiated. Lastly, I wish to thank my wife Mei for her unfailing understanding and support, in ways more than one. IV TABLE OF CONTENTS Page 1. INTRODUCTION 1 2. BACKGROUND 5 3. PERMUTATION 22 3.1 Basic Model 24 3.2 Model 3.1 26 3.3 Separation Algorithm 33 3.4 Model 3.2 37 3.5 Model 3.3 44 3.6 Model 3.4 49 3.7 Summary and Conclusion 55 4. SORTING 5 8 4.1 Basic Model 59 4.2 Model 4.1 62 4.3 Model 4.2 66 4.4 Bitonic Sorting 68 4.5 Model 4.3 71 4.6 Model 4.4 84 4.7 Summary and Conclusion 92 5. TREE STORAGE SCHEME 95 5.1 Physical Model 97 5.2 The Switch 97 5.3 Storage of Data 99 5.4 First Ordering Scheme of Loops 104 5.5 Movement of Records in the Memory Structure . . 106 5.6 Searching 116 5.7 Insertion of Records 120 5.8 Deletion of Records 123 5.9 Tree Structured Memories with Simpler Control . 124 5.10 Tree Searching 133 5.11 Unloading, Loading, Insertion and Deletion of Records 136 5.12 Conclusion 139 REFERENCES 141 VITA 143 CHAPTER INTRODUCTION The last few years have seen great advances in magnetic bubble technologies [1,2], Due to its high density, low cost and high reliability, magnetic bubble memories are expected to replace conventional mass storage devices (such as disks and tapes) used in a majority of applications. It is of course possible that they be used to simulate magnetic disks, so that the change to the existing software as well as hardware would be minimal. Early design indeed reflected such use [2] . But to do so would not fully utilize the powers of the bubble memories. Ey arranging the bubbles into loops, and by using special switches that permit control of the passage of the bubbles, the bubble memories can have a lot more intelligence than the conventional magnetic devices. It is now possible to perform operations that are conventionally done by the CPU in the bubble memories. Operations, such as data rearrangement, data sorting etc. can now be done in the bubble memories, thus relieving the CPU for other more useful processing. The main purpose of this thesis is to study data manipulation operations in bubble memories within the domain of algorithms. New bubble memory structures are explored and the corresponding algorithms designed and analysed. Three aspects in the management of data are studied in details: data rearrangement, sorting, and information retrieval and update. Algorithms connected with these operations have of course been studied extensively in the existing literature. But since the data access and routing mechanisms in the bubble memories differ from the way data are fetched and stored in random access memories, conventional algorithms cannot be applied directly to the bubble memories. Moreover, conventional algorithms usually use the number of comparisons as the unit of measure for their complexity, whereas in bubble memories, a more appropiate unit of measure would be the time it takes to move the records around. Therefore there is a need for studying new algorithms. Of course, in designing bubble memory structures and their corresponding data manipulation algorithms, the time complexity is hardly the only important factor. There are physical constraints that must also be considered. We distinguish three important parameters that should be taken into consideration: (1) Number of switches in bubble memories. (2) Number of control states needed to carry out the operations. (3) The time the operations take. It is desirable to limit the number of switches in bubble memories, since they take up space, and too many of them would decrease the amount of usable space for storing information. It is also desirable to limit the number of control lines (and hence number of control states) required, since physically there is a limit to the number of pins one can have on a chip. The time it takes to perform the operations is of course affected by the choice of these two numbers, i.e. there is a trade-off among these three parameters. All the results presented in this thesis are of course equally applicable to other shift register memories. The physical constraints imposed on bubble memories are usually more stringent than any other shift register memories. For instance, bubble memories usually require that all bubbles be circulating at the same speed and that loops must be physical realizable in a two-dimensional plane. Such physical constraints make the design of efficient algorithms more difficult. In Chapter 2 basic models for magnetic bubble memories are described and some of the previous work in this area briefly surveyed. Chapter 3 studies the problem of rearranging records within the bubble memories. An algorithm for permuting data in a memory using only one switch is described and analysed in details. Some other memory structures are also presented, demonstrating the trade-offs among the three parameters. In Chapter 4, sorting in the bubble memories is studied. To enable real sorting be done within the memories, a new kind of switch is introduced. Such switches not only can route bubble streams, but can also do so according to their contents, i.e. they can also do comparisons. The problem of trade-offs among the three parameters are again studied. In Chapter 5 , we turn to another important aspect in data management: that of storing , retrieving and updating records in a tree storage scheme. Vie propose two memory structures for storing records in the form of binary trees, and show how the records can be retrieved and updated efficiently. CHAPTER 2 BACKGROUND We present now a basic model for magnetic bubble memories. We shall not describe the hardware of the magnetic bubble devices in details. We shall only give a conceptual model of bubble memories that we shall use for the rest of the thesis. We shall also discuss briefly some previous work that is related to our interests. The most primitive bubble memory can be visualized as bubbles circulating around a loop (Figure 2.1a). Each bubble is used to represent a bit of information. Depending upon the Permalloy patterns that are used to guide the bubbles, bubbles can be made to circulate in a clockwise or counter-clockwise direction by the application of an external rotating field (in addition to the constant biased field which keeps the bubble stable) . In some bubble memories, the bubbles can also be detector generator J replicator/annihilator (a) access port -4 •-•- (b) Figure 2.1. Simplified Views of Bubble Memories circulated in the other direction by reversing the direction of the rotating field. Bubbles can be created, annihilated, and deleted by the use of special gates. Bubbles can be introduced into the loop by the use of a generator; they can be destroyed or duplicated by the use of a replicator/ annihilator, and can be detected by a detector. In general the input operation involves the use of the generator while the non-destructive read operations involves the replicator/annihilator and the detector. Since these gates are usually physical close to one another, we would group them together into what we would conceptually call "access ports" or "read/write ports" (Figure 2.1b). It is through these ports that data can be read from or written into the bubble memories. A buble memory with a single loop is essentially a simple shift register memory. The average time to access a bit in a memory of n bits is n/2 propagate steps (the time to move a bubble from one place to the next) . It can be reduced to n/4 if bidirectional circulation of the bubbles in the loop is allowed. To reduce the access time, a major/minor loop organization of the bubble memory was introduced [3,4]. In this scheme (Figure 2.2), a set of minor loops of equal size are connected to a major loop that is used for communication. Through the action of tranfer gates, bits of information, one from each minor loops, can be transferred from the minor loops to the major loop in parallel and then be shifted serially to the access port. The average bit access time for an n bit memory is then improved to /n. Beausoleil, Brown and Phelps [5], and Bonyhard and Nelson [6] independently proposed a new bubble structure that allows two modes of operation, as shown in Figure 2.3. This memory shall be referred to as Model 2.1. Here a node in the graph denotes a record. Operation (a) is the usual bubble propagation operation that cyclically moves the bubbles forwards. In operation (b) , the direction of propagation is reversed, and the bubble at the access port is also bypassed. With the added second mode of operation, the average access time can be improved by implementing dynamic ordering in the bubble memory. The dynamic ordering of a file of items is the reordering of the items in the file such that the more recently referenced items are placed closer to the access port. Figure 2.4 shows such an ordering for 9 items before and after item 3 is accessed. Such an ordering can be achieved by the following algorithm: access port *-'-•--• major loop ^N^N " a ^■s • • • minor loops Figure 2.2. Bubble Memory with Major/Minor Loops. 10 /\ -M operation (a) operation (b) Figure 2.3. Two Operations in Model 2.1 7 o 6 - 1 2 "3 < 4 initial 8 74 1 6<' o 2 i 4 final Figure 2.4. Example of Dynamic Odering, 11 ALGORITHM 2 . 1 To access an item at a distance k from the access port, maintaing the dynamic ordering, for Model 2.1 1. Apply operation (a) k times. 2. Apply operation (b) k times. Notice these 2 modes of operation of the bubble memory can be thought to be caused by the action of a two-input two-output switch, placed between 2 loops of sizes 1 and (n-1) respectively. Such a switch has 2 modes of operation, as described schematically in Figure 2.5. Figure 2.6 shows a memory of 9 records for Model 2.1, nov; using the switch. Operation (a) is achieved by setting the switch to mode (a) ; operation (b) is achieved by setting the switch to mode (b) while reversing the direction of propagation. Such a switch was proposed by Tung, Chen and Chang [7] . (Actually their switch has two slightly different modes of operation: a cross over mode and a bypass mode; but it is functionally equivalent to the one we has just described.) Based on these switches, they proposed a memory structure which is essentially a linear array of shift-register loops with two adjecent loops linked by a switch. The loops are of equal size except the one at the access port, which is half the size of the other loops. If we take a loop to contain 2 records, then a memory of 9 records can be schematically described by 12 \=/ Mode (a) "through" Mode (b) "closed" Schematically represented as £