Run Length Limited (RLL)
An improvement on the MFM encoding technique used in earlier hard disks and used on all floppies is run length limited or RLL. This is a more sophisticated coding technique, or more correctly stated, “family” of techniques. I say that RLL is a family of techniques because there are two primary parameters that define how RLL works, and therefore, there are several different variations. (Of course, you don’t really need to know which one your disk is using, since this is all internal to the drive anyway).
FM encoding has a simple one-to-one correspondence between the bit to be encoded and the flux reversal pattern. You only need to know the value of the current bit. MFM improves encoding efficiency over FM by more intelligently controlling where clock transitions are added into the data stream; this is enabled by considering not just the current bit but also the one before it. That’s why there are is a different flux reversal pattern for a 0 preceded by another 0, and for a 0 preceded by a 1. This “looking backwards” allows improved efficiency by letting the controller consider more data in deciding when to add clock reversals.
RLL takes this technique one step further. It considers groups of several bits instead of encoding one bit at a time. The idea is to mix clock and data flux reversals to allow for even denser packing of encoded data, to improve efficiency. The two parameters that define RLL are the run length and the run limit (and hence the name). The word “run” here refers to a sequence of spaces in the output data stream without flux reversals. The run length is the minimum spacing between flux reversals, and the run limit is the maximum spacing between them. As mentioned before, the amount of time between reversals cannot be too large or the read head can get out of sync and lose track of which bit is where.
The particular variety of RLL used on a drive is expressed as “RLL (X,Y)” or “X,Y RLL” where X is the run length and Y is the run limit. The most commonly used types of RLL in hard drives are “RLL (1,7)”, also seen as “1,7 RLL”; and “RLL (2,7)” (“2,7 RLL”). Alright, now consider the spacing of potential flux reversals in the encoded magnetic stream. In the case of “2,7”, this means that the the smallest number of “spaces” between flux reversals is 2, and the largest number is 7. To create this encoding, a set of patterns is used to represent various bit sequences, as shown in the table below (“R” is a reversal, “N” no reversal, just as with the other data encoding examples):
The controller these patterns by parsing the bit stream to be encoded, and matching the stream based on the bit patterns it encounters. If we were writing the byte “10001111” (8Fh), this would be matched as “10-0011-11″ and encoded as “NRNN-NNNNRNNN-RNNN”. Note that the since every pattern above ends in “NN”, the minimum distance between reversals is indeed two. The maximum distance would be achieved with consecutive “0011” patterns, resulting in “NNNNRNNN-NNNNRNNN” or seven non-reversals between reversals. Thus, RLL (2,7).
Comparing the table above to the ones for FM and MFM, a few things become apparent. The most obvious is the increased complexity: seven different patterns are used, and up to four bits are considered a time for encoding. The average number of flux reversals per bit on a random bit stream pattern is 0.4635, or about 0.50. This is about a third of the requirement for FM (and about two thirds that of MFM). So relative to FM, data can be packed into one third the space. (For the example byte “10001111” we have been using, RLL requires 3 “R”s; MFM would require 7, and FM would need 13.)
Due to its greater efficiency, RLL encoding has replaced MFM everywhere but on floppy disks, where MFM continues to be used for historical compatibility reasons.
Data recovery Salon welcomes your comments and share with us your ideas, suggestions and experience. Data recovery salon is dedicated in sharing the most useful data recovery information with our users and only if you are good at data recovery or related knowledge, please kindly drop us an email and we will publish your article here. We need to make data recovery Salon to be the most professional and free data recovery E-book online.