13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

152 Transput Chapter 5Many operating systems place an initial record on the tape that describes the tape,including a serial number, owner, and other information. This record is called a label.Such tapes also have header and trailer records surrounding files to aid in identifying andseparating them.Tapes can be read either forward or backward. When they read backward, thebuffer in main store is filled from the end to the start. The operating system (or applicationsprogrammer) must remember one essential rule about magnetic tape: Never write inthe middle of the tape. If the tape is positioned somewhere in the middle — that is, ifthere are records ahead of the current position — then any write operation destroys thoserecords, because the new record written out will be followed by an inter-record gap.Since the gaps are not of reproducible sizes, that gap may overwrite some data from thenext record on the tape. When the tape is then read, there may or may not be an extrarecord. Since it is not possible to assure reproducibility, writing in the middle of the tapeis assumed to destroy any further contents.Winding latency, the time needed to wind the tape to the desired place, is muchlonger than rotational or seek latency on a disk, although once the tape is spinning, dataarrive in main store at about the same rate (about 2 megabits per second). Typical applicationsuse tape in a strictly sequential sense, writing an entire tape before trying to readany of it and reading the entire tape from start to finish.1.3 DrumsIn the 1950s, drums were used for main store. (The IBM 650 computer worked thisway.) Later they were used for secondary store (that is, files). They are principally usednow for backing store (that is, swapping). A drum is shaped like a cylinder and isdivided into circular tracks, each with its own read/write head. Like a disk, the drum isconstantly in motion. There is no seek latency, but there is still rotational latency. Evenrotational latency can be avoided for writing by always writing an entire track and startingat any point in the rotation. More often, each track is divided into sectors, and theoperating system must wait for an available sector to come around. For swapping pages,one sector is as good as another; the first free sector to appear (on any track) may bechosen. Figure 5.3 shows how drums are arranged. Drums are not used very much anymore. Disks and ‘‘solid-state drums,’’ which are banks of memory chips behaving likedrums, have replaced them.1.4 Communication linesCommunication lines are devices used to connect computers to terminals and to eachother. Since the operating system must deal with these lines, it is important to understandsome of their hardware details. In simplex lines, data travel in only one direction. Halfduplexlines allow data in both directions, but not at the same time. Duplex lines are liketwo simplex lines tied together; they allow simultaneous communication in both

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!