📜 ⬆️ ⬇️

Unix Birth and Development


Thompson (sitting) and Ritchie work on the PDP-11, 1972.

Period 1968-69 was very uncertain for Bell Labs: the Multics (Multiplexed Information and Computing Service) operating system project, developed since 1964 for the expensive 36-bit GE-645 computer, did not have clear perspectives and goals, but only grew in size and complexity , his apparent failure was more and more visible. In the end, American Telephone & Telegraph left a project in which millions of dollars were invested in five years.

However, some of the engineers who worked on Multics - Ken Thompson, Dennis Ritchie, Malcolm Douglas McIlroy, Joseph Ossanna - felt the need to continue working on such a project, and did not want to lose the cozy working atmosphere that had already formed. Therefore, in 1969, they began to look for an alternative to Multics: Ossanna, Thompson, Ritchie tried to push through the purchase of a machine of average power, for which the group promised to write an operating system. The order for the proposed DEC PDP-10 and Sigma 7 computers was never made, and although the situation was on the verge of getting the right equipment several times, it was quite obvious that the team was asking for too much money for a project with a vague plan, especially since The failure of Multics operating systems has become a less attractive area. Therefore, Thompson (mostly his idea), Kanaday and Ritchie (who introduced the idea of ​​file devices) developed on ordinary black educational boards and paper a file system device, which later became the heart of Unix.
')

Beginning of work


Thompson wrote for Multics a simulation of the performance of the proposed file system and the paging behavior of programs, began the implementation of a new operating system for GE-645. He developed an assembler for the machine and a rudimentary system core that can only display a welcome message. The complexity of the equipment made Thompson's achievement noticeable, but as soon as it turned out that due to the withdrawal from the Multics project, the 645th series at Bell Labs would continue to work for several months, the work was discontinued.

Also in 1969, Thompson wrote the game Space Travel for Multics, still had access to it, and then rewrote it in Fortran for GECOS, the operating system of the GE-635 machines. The game contained only a simulation of the movement of the main bodies of the Solar System, among which the player was asked to navigate the ship and land on the planets and their moons. The game in the GECOS version had two major drawbacks: the high price of computational time ($ 75 per game) and the slowdown of graphics. After searching, Ken found a little-used PDP-7 with an excellent screen, previously bought the car as a Graphic-II terminal for a circuit analysis project.

Ritchie and Thompson rewrote Space Travel to run on this computer. Working on a small game was much more important than it might seem: since they ignored the existing software, they had to write a package for handling floating-point numbers, specifications for graphic symbols and a debugging system on their own. All of this was written on GECOS on a cross-assembler for the PDP-7, and the process of transferring the assembler code to punch cards was later used to implement the file system whose project had already been developed.

In the summer of 1969, Ken's wife went to his parents to show her newborn son, and Thompson plunged into work. Together with the file system of the new operating system, a small set of user programs has appeared: copying, printing, deleting, editing and, of course, the command interpreter, the command processor. After completion of the assembler, there was no need to write to GECOS and transfer files with a punched tape. Although the name Unix as a reference to Miltics appeared only in 1970 as a joke of Brian Kernighan on the fact that the new system supported only the user Thompson, and therefore should be called Un-multiplexed Information and Computing Service, the operating system was already born and lived.



The Unix file system for the PDP-7 had a linear array of inodes, each of which described a file, directories (a special file containing names and an associated index), special files describing devices. The file system calls are also not too different from today's: read, write, open, creat, close. The difference was that the input-output unit in the PDP-7 was a machine word, not a byte. Primitive by today's standards, the operating system provided a more convenient development environment than the existing analogues. It became increasingly obvious that the outdated PDP-7, which imposes many annoying restrictions on the operation of the new operating system, would not be able to meet the needs for further development, as the entire PDP-7 series of machines, and the management will hardly be able to allow the purchase of new equipment.

Ossanna, who until the end of his days was keen on text processing, suggested cheating and asking the authorities for the latest DEC PDP-11 microcomputer to create text editing and formatting tools. And the fact that to create these tools would require writing an operating system was almost like a footnote. The requested amount was much less than before - only 65 thousand dollars.

Previous vague sentences met with disapproval, it was too narrow. Not immediately, but the authorities pecked, in May 1970, thanks to the efforts of McMahon, an order was made for the PDP-11. The car arrived at the end of the summer, but the product was so new that the storage disk had to wait until December. All this time, Thompson, Ritchie and the rest continued to work on Unix on the PDP-7. At this time, a new PDP-11 cheated the moves of a chess knight on a 6 Ă— 8 board for three months.

Only after installing the PDP-11 drive, the increasingly complex operating system was rewritten to a new machine. The Unix version of the PDP-11 did not have any particular advantages over the version for the PDP-7. For example, there was still no multitasking: only one user program could be in the kernel. The system sizes were small: 24 kilobytes of RAM (16 kilobytes for the operating system and 8 kilobytes for user programs), a disk with a thousand blocks (512 kilobytes). Files were limited to 64 kilobytes.

Then the roff program, a word processor written by Hosann, was rewritten. For the first time, Unix was tested outside of Bell Labs when working in the AT & T patent department, where it was necessary to edit and format patent applications. The Unix system had advantages over the commercial text editing system tested at the same time in the patent department: first, Unix had support for the 37th model of Teletype terminals, which printed all the required mathematical symbols, and second, roff quickly added the ability to page numbers than the competitor did not possess.

During the second half of 1971, the group supported three typists and tried to continue working in their free time. Unix received a good reputation for supporting interesting features on modest hardware, and the system was accepted for use in the AT & T patent department, which enabled the group to convince management to order another machine, another PDP-11 model - PDP-11/45, even more powerful. than already purchased.

In the early years, Unix was constantly changing and evolving, so there was no point in releasing versions or releases, although there were occasional publications of the programmer’s manual, and the first Unix systems were called these titles. The first edition dates back to November 1971.

High Level Programming Languages


Each program for Unix in the PDP-7 version was written in a very weak assembler - for example, there were no macros. The first interesting language was TMG McClure, implemented by McIlroy. Then Thompson decided that it was impossible to offer a computer system without Fortran, so he started writing Fortran in TMG, but the intention to realize it lasted a week. What he did was a compiler for the new language B. The new language was strongly influenced by BCPL, Thompson's taste for the Spartan syntax and the modest size of the compiler, which produced simple and slow, but executable code that made the life of programmers easier. Later, the PDP-7 cross-compiler for PDP-11 was written in B, and gradually the compiler for PDP-7 was transliterated from TMG to B. With the arrival of the PDP-11 almost immediately B. was tuned to it. Even before the drive arrived, machine on the PDP-11 calculator was written.

Over the rewriting of the operating system on B was not particularly thought, even the assembler for the new computer was copied to an assembler, because the interpreted code was too slow. There was also the problem of inconsistency of machine-oriented B and PDP-11 with byte addressing.

Therefore, in 1971, work began on what became the C language. Everyone knows the connection between BCPL → B → C, and it makes no sense to repeat it, it is worth noting that in 1973 the kernel of the operating system was rewritten to C, and Unix purchased features of its modern versions. There were still many external changes, and the internal structure of the system became more rational and simple. The success of the attempt confirmed that C is a useful and practically universal tool for system programming, and not a toy for simple applications. Today, only the most important programs of Unix-like systems are written in assembler, almost all utilities and applications are written in C.

Further development


For years, Unix remained only a Bell Labs research project, but in 1973, the authors presented the system at the Association Association for Computing Machinery, and requests for providing copies began to fall right away. This put AT & T in an extremely uncomfortable position: as early as 1956, the communications monopolist was restricted from selling products and services not directly related to telephones and telecommunications, and therefore Unix could not be sold. It is precisely this that we are obliged to release the source codes of earlier versions to almost everyone without support, advertising and corrections.

And this policy bore fruit: the fans of the operating system had already begun to communicate and get together to exchange experiences, fixes and bugfixes, new tools and system improvements. The popularity of Unix was ultimately brought about not only by the simplicity and elegance of its device, its demand and portability, but also by the formation of a cohesive Usenix community. Communities were formed not only in the USA, but also in Australia (at the University of New South Wales and the University of Sydney), and they all exchanged tapes with new programs and fixes for the system. By the mid-70s, it was this environment that formed the modern traditions of the open-source community.

However, the more popular Unix became, the more closely AT & T lawyers followed the licensees' somewhat frivolous behavior. For example, John Lyons, who teaches at the University of New South Wales, in 1977 published one of the most famous books of all time, "Comments on the Unix Operating System", which included a listing of the OS source codes. Unix licensing terms allowed source sharing, so at first Lion’s book was only sold to licensees. In 1979, AT & T tightened the penalties for using the book in classrooms, and there is nothing surprising in the fact that the book spontaneously began to be copied by samizdat, sometimes photocopies of photocopies had an almost unreadable state.

AT & T lawyers followed Bell Labs. For example, between the release of the sixth edition of Unix in 1975 and the seventh in 1979, Thompson collected from external and internal sources Bell Labs dozens of important fixes for the system that he intended to throw into the user base. Lawyers of the company forbade him to do this, as this would be a form of support. But error correctors became available anyway: Lou Katsu, the founder and president of Usenix, was called once and was told that if he visited a certain place on Mountain Avenue at 2 pm (where Bell Labs is located), he would find something interesting. Katz followed the directions and found a tape with corrections that immediately fell into the hands of countless users.

80s Branches


After the destruction of the Bell System monopoly, AT & T was no longer bound by the 1956 Agreement. At the same time, numerous Unix branches developed, primarily a version of the University of Berkeley, which was thoroughly cleaned of AT & T code to make it freely distributable. After the trial in 1992, AT & T against the University of Berkeley legal status of Unix-clones was confirmed.

If the Unix source code were not available to the public, Linus Torvalds, as he himself says, would hardly have created Linux, which was written from scratch in the early 90s. Today, it is Linux and the BSD family that carry the backed-up Unix and control everything from mobile phones to supercomputers.

By the end of the 70s, Unix was spreading in academic circles like a cheap drug. The peak of her popularity came in the early 90s. For a number of reasons, it has given way to many commercial and non-commercial OSs, but its elegant legacy continues to evolve most actively. Today we can say that Unix was the most popular and influential operating system in history, which formed a new thinking community around itself.

From “ The Evolution of the Unix Time-sharing System ” by Dennis Ritchie and Warren Tomy's articles .

Source: https://habr.com/ru/post/147774/


All Articles