What did the PDP-11 teach us?
CG Bell, WD Strecker, “Computer What We Have Learned From the PDP-11,” “The 3rd Annual Symposium on Computer Architecture Conference Proceedings, pp. l-14, 1976.
This article I chose today is a retrospective of computer design. This is one of a series of articles by Gordon Bell with various collaborators describing the development, growth, and sudden replacement of the company's cult product line, the PDP-11 minicomputers.
- CG Bell, R. Cady, H. McFarland, B. Delagi, J. O'Laughlin, R. Noonan and W. Wulf, “A New Architecture for Mini-Computers - The DEC PDP-11,” Proceedings of the Sprint Joint Computer Conference, pp. 657-675, AFIPS Press, 1970.
- CG Bell, WD Strecker, “Computer What We Have Learned From the PDP-11,” “The 3rd Annual Symposium on Computer Architecture Conference Proceedings, pp. l-14, 1976.
- WD Strecker, “VAX-11/780: A Virtual Addressing of the DEC PDP-11 Family,” Proceedings of the National Computer Conference, pp. 967-980, AFIPS Press, 1978.
- CG Bell, WD Strecker, “Retrospective: What we have learned from the VAX and Alpha,” Proceedings of the 25th Annual International Symposium on Computer Architecture, pp. 6-10, 1998.
This year we celebrate the 60th anniversary of the foundation of the company that produced the PDP-11. It's been 40 years since this article was written, and I thought it would be interesting to do a retrospective of Bell's articles from our modern point of view.
What was Digital Equipment Corporation?
To imagine the time when the article was written, we first need to talk a little about the company that launched PDP-11, Digital Equipment Corporation from Maynard, Massachusetts. More commonly known as DEC.
DEC was founded in 1957 by Ken Olsen and Harlan Anderson. Olsen and Anderson worked together at the Lincoln Laboratory at the Massachusetts Institute of Technology, where they noticed that students queued for hours to use the TX-0 , an experimental interactive computer designed by Wes Clark
Clark continued to develop TX-0 in TX-2 and later joined DEC as head of the LINC
This is TX-0.
Let's compare it with something like the IBM 704, a computer of the time that most students ignored.
После презентации кто-то предположил, что антипатия студентов к IBM может быть основана на недостатке бюджета на компьютерное время этой системы.
What Olsen and Anderson found was that the desire to use an interactive computer was so strong that there was a market for "small" computers designed for this role.
DEC first offered the PDP-1, an efficient commercial version of the TX-0.
Amendment : Michael Chaponis, PDP-1 Recovery Project Head, kindly wrote me the following:
Whirlwind and PDP-1 have a 5-bit opcode, TX-0 started with a 2- or 3-bit opcode, but this value increased with growth TX-2 memory capacity. Comparing the order of the PDP-1 and Whirlwind codes reveals that the PDP-1 is a cheaper and somewhat improved version of the Whirlwind architecture.
- Improvement: indirect addressing added.
- Cheaper: The live register is removed and the subroutine call instruction is added, and the shift counter is removed due to the fact that the instructions for integer multiplication and division are replaced by instructions for the multiplication step and the division step, which make the shift by one bit. The biggest decrease in the price of the PDP-1 compared to Whirlwind was due to a change in the design of logic and design.
The contrast between the PDP-1 and IBM 704 was great, but several years earlier small and slow interactive computers, such as the Librascope LGP-30 and Bendix G-15, had already appeared, and they were sold in similar quantities.
It should also be noted that the name PDP is an acronym for “Programmed Data Processor”, since a computer at that time was understood to be large, complex and expensive machines, and venture capitalists could not support DEC if they produced “computers”
Для PDP-1 была написана одна из первых компьютерных игр, "Spacewar" Стива Рассела
Following the success of the PDP-1, DEC offered several computer families, many of which were designed, at least in part, by Gordon Bell.
The computer is not fully defined by the architecture; it reflects the technological, economic and humanitarian aspects of the time and place where it was designed and built. The finished computer is a product of its era.
Right from the very beginning, Bell lets us know that for the success of any computer project you need not to build the world's best abstract computer, but to build the right computer, taking into account the context.
In this chapter, we will look at the PDP-11: creation goals, architecture, various implementations, and the people who created it. We will study its design, starting with the specifications of the architecture, and consider how they were influenced by technology, organization of development, sales, application, organization of production and the nature of end users.
At this time, in 1976, Bell was the head of the DEC development for almost four years. It is clear that he views the success of the PDP-11 in the broader context of the market, the needs of which they were to satisfy, and which further influenced the evolution of the entire PDP-11 family.
Sustained in the spirit of Bell's words, this presentation focuses on two aspects of the article, on technology and on people.
The Basics: Design Thought
Bell begins with this observation. By its nature, computer engineering is focused on achieving the goal of creating the final product. Therefore, it is difficult to build long-term plans.
These are principles of agile. While. 25 years before Snowbird and writing agile manifest. When it was written, DEC was no longer a start-up struggling for its existence, it was a mature company with several successful product lines on the market, and Bell says that the need to produce a minimum viable product is more important than all other long-term plans.
Like IBM / 360, the PDP-11 was not designed as a single computer model, but as a series of models, with software written for a small PDP-11 compatible with a large one.
“The term“ architecture ”is used here to describe the attributes of a system as seen by a programmer, i.e. conceptual structure and functional behavior, not to describe the organization of data flows and control, logical design and physical implementation. ”- GM Amdahl GA Blaauw and FP Brooks Jr. Architecture of the IBM System / 360, 1964
By virtue of the open nature of the PDP-11, anything that interprets instructions in accordance with the processor specification is PDP-11, and DEC, as soon as the PDP-11 market warmed up, began to build implementations of this architecture, they had several groups, some of which built fast and expensive computers, while others designed slower for a lower price.
Despite the evolutionary planning style, the PDP-11 became successful on the market: over 20,000 pieces were sold in six years, during which they were on the market (1970-1975). Design in this case is not so important: a large and aggressive marketing organization, armed with software to correct architectural flaws and omissions, can save almost any design.
Here, Bell in his article asks the question: did the PDP-11 have a good design, or simply gained an advantage due to hyperactive marketing? In order to answer his own question, Bell examines the product in terms of the design criteria that he and his collaborators identified six years earlier.
The first weakness of microcomputers was the limited address space. The biggest and most common mistake was to make a computer design that does not have sufficient address space for addressing and memory management.
Minicomputers of that era had a 12-bit address space, which made it possible to address only 4096 addresses, each of which stored a 12-bit word.
It should be noted that the word "minicomputer", which later came to denote the physical size, was originally derived from the phrase "minimal computer". A canonical example was the PDP-8, the previous DEC model, which had a total of eight instructions.
The reason for the tiny address space was the price. Memory was extremely expensive in the 60s and early 70s, when every bit consisted of a tiny magnetic core that was woven into a grid of control conductors.
The cores were arranged in a panel, in this case 4096 bits, which were connected in piles to get the word, thus 4096 words of memory consisted of 16 million rings ( here, obviously, an error in the original text, 4096 words * 16 bits = 65536 rings Transl. ), each of which was, at least partially, manually assembled. Now it is clear why the memory was so expensive.
Bell and other PDP-11 designers knew that core prices would continue to fall, and that semiconductor memory, although not as cost effective at that time, would continue to fall in price per stored byte. Thus, the amount of memory that a customer can afford to buy will increase over time, as users tend to buy "systems for the same price in dollars." But still, the
PDP-11 followed this bad tradition of saving on address bits, but it was saved by the principle that good design can survive at least one major change.
Even taking into account the developers' predictions, Bell noted that less than two years have passed since the PDP-11 architecture was launched, as it was necessary to include a memory management module in the architecture to provide access to a larger, 18-bit address space at the cost of increased software complexity . After a few years, another 4 bits were added.
In fairness, although Bell reproached himself for hindsight, the tradition of making insufficient address space continues to this day. Remember the 640K limit in DOS? Remember the battles with himem.sys? Faced a situation where a 32-bit program requires more than 2 GB of data?
So no one is perfect.
Not enough registers
The second weakness of minicomputers was the tendency for an insufficient number of registers. This was corrected in the PDP-11, which had eight 16-bit registers. Later, six 32-bit registers were added for floating point arithmetic. A larger number of registers could increase the task context switching time.
It was not unusual, even for mainframes of the time, to provide only one register - the battery. If additional registers were provided, they were used only as index registers, not as general registers.
It is also interesting to note Bell's remark that redundant registers can be inconvenient for the user. In the early 1970s, the most common was programming machines directly in assembler.
There is a strong relationship between the number of registers in the architecture, the number of address bits, and the size of the instruction. All of these factors are caused by insufficient memory, and it made sense to carefully think through the instruction set.
In Von Neumann's machines (which almost all computers of the 60s were), the program and data share the same, limited address space, and the inefficient program wasted not only computer time, but also memory. A slow program can be tolerated, but if the program does not fit in memory, it was fatal, that is, the method of encoding instructions should be as efficient as possible.
Let's consider a very common case of moving from one memory location to another. How many bits do you need to describe this operation? Here is one of the possible implementations:
MOV addr addr
You need 16 bits for the source address, another 16 for the destination address, and a certain number of bits to encode the MOV instruction itself. Let there be a total of 40 bits, it is not a multiple of 16, which means a complex 2.5-bit encoding of instructions. However, what if we load the address into the register?
MOV (R0), (R1)
In this case, we only need to describe the registers, the PDP-11 has 8 registers, and only 3 bits are enough to describe the register, plus a few bits per operator description. Such a command will easily fit into a 16-bit word, and does not require complex coding of instructions with variable length.
In fact, the PDP-11 uses 6 bits per register, and 4 bits per operation if the instruction has two operands.
The third weakness of minicomputers was insufficient hardware support for the stack. In PDP-11, an auto-increment and auto-decrement address mechanism was implemented. This solution is unique to the PDP-11 and has proven to be extremely useful. (And this solution was copied by developers of other systems.)
Nowadays, it is difficult to imagine equipment that does not have a stack, but in fact the stack is not very important if you are not using recursion.
The design of the PDP-11 dates back to 1969, and if we look at the programming languages of the time, FORTRAN and COBOL, they did not support the recursive function call. The sequence of the function call included storing the return address in the empty word at the beginning of the procedure, which made recursion impossible.
PDP-11 defines the stack pointer as we understand it today as a register controlled by PUSH and POP operations, but the PDP-11 went further and allowed any register to work as a stack pointer by adding an auto-increment / decrement modifier to the operand registers.
For example, one instruction:
MOV R4, -(R6)
reduce the value in R6 by two, then store the value of R4 at the address stored in R6. Thus, in the PDP-11 assembler, we place the value on the stack. If any of you programmed under ARM, this should be familiar to you.
This means that there is no need for dedicated PUSH or POP instructions, it saves instruction space, allows you to use any register as a stack pointer, although traditionally the stack pointer is R6, and is used by the hardware when making a subroutine call.
The fourth weakness of minicomputers of the time is limited interrupt support and slow context switching, and this problem was solved using the UNIBUS vector interrupt controller with direct connection of device interrupts.
At this point in the life of DEC, almost all of its products had a PDP-10 architecture, the DEC mainframe, which was designed for interactive applications, laboratories, and process control. The response to interrupts, the delay between the activation of the interrupt signal and the start of interrupt processing, is key to achieving high real-time performance.
In the PDP-11, the interrupt device provides the address of the interrupt handler. Bell honestly writes about this:
The main mechanism is very fast, it requires only four memory access cycles from the time when the interrupt was requested to the moment the first interrupt handler instruction was executed.
The fifth weakness of most minicomputers was the poor support for strings, which was solved in PDP-11 by the ability to directly address bytes.
The importance of supporting lines and characters began to increase during the 1960s, when solutions for science and business began to appear. The dominant encoding method at that time was a 6-bit character set, which provided enough space for uppercase letters, numbers from 0 to 9, a space and a few punctuation enough to print financial reports.
Since the memory was very expensive, placing one character in a 12-bit or 18-bit word was simply unacceptable, and the characters were packed into words.
This improves storage efficiency, but is difficult for operations such as moving, comparing, and merging, which must take into account that the character may be in the lower or upper part of the word, which increases the amount of expensive memory occupied by the program.
The problem was solved in the PDP-11, the machine could operate with both 16-bit words and the gaining popularity of 8-bit bytes. Expanding the character length by two bits simplified string operations and made it easier to adapt to the increasingly popular 7-bit ASCII standard, which DEC was at the time. Bell ends this paragraph as follows:
Despite the fact that the string processing instructions were missing from the hardware, the usual string operations (movement, comparison, concatenation) could be programmed as a very short cycle.
And this is actually the case. It was possible to write a copy procedure in just two instructions, assuming that the source address and the destination address are in the registers.
loop: MOVB (src)+, (dst)+ BNE loop
This code takes advantage of the fact that the MOV command sets flags. The cycle will continue until the value in the source address becomes zero, and in this place the control will proceed to the next instruction. That is why C lines end in zero.
The sixth weak point of minicomputers was the inability to use ROM, and the PDP-11 did not have this drawback. Most of the code written for the PDP-11 was “clean” and allowed the programmer to re-enter without special efforts, which allowed using the ROM directly.
In process control applications, in which programs are relatively fixed, they must load the program each time from magnetic tape or punched tape, which is expensive. You must purchase and maintain rarely used I / O devices. More convenient when the program is always present in the computer. However, due to the strong memory limits and the lack of hardware support for the stack, self-modifying code was often unavoidable, which seriously limited the use of the ROM. Bell with deserved pride says that the PDP-11 has changed the situation.
Primitive I / O Capabilities
The seventh weakness of minicomputers was the primitive I / O capabilities.
During the late 60s, when the PDP-11 was developed, I / O devices were very expensive. Mainframes of the time used the so-called channel I / O, in which the CPU sent a small program to the channel controller, which executed the program and reported the result. The program could, for example, download data from a magnetic tape or punch a punched card.
Channel I / O was important, it allowed us to unload the processor from I / O operations, and to perform I / O actions at the same time, which increases processor utilization. The downside was that channel I / O required a separate CPU in each channel controller, which increased the cost of the entire system quite significantly.
In the minicomputer world, I / O was usually performed directly on the CPU, usually with the help of specialized instructions, hard-coded for each specific device, such as a tape drive or a console printer.
The PDP-11 introduced something unusual, memory mapped I / O. It was not such memory-mapped I / O, which you can use with the mmap (2) system call, but simply the convention that some memory addresses are not just memory cells, and their contents are mapped onto boards inserted into the backplane, which in DEC was called UNIBUS.
For example, the value recorded in 777566
fourwill be written to the device connected to the console, usually the printing terminal.
Адреса приведены в восьмиричной системе, как это было принято на предыдущих 12, 18, и 36-битных машинах DEC
If you read the value from the address 777570, you got the value entered by the switches on the front panel. This was often used to configure the bootloader.
Similarly, the RK05 drive was addressed by writing the sector number to which you want to access the address 777412, the address where you want to write the data, to 777410, and the number of words to 777406. Then set the zero bit at 777404 to 1 ( bit GO), and the drive will transfer the required number of words directly into memory.
My favorite device was the KW11-L timer. Writing bit 6 at 777546 triggers an interrupt every 20 ms. Why is it 20 ms? Because this is the frequency period of the AC
Если вы заказывали машину для региона с частотой сети 60 Гц, она имела другой номер (partnumber)
Yes, like a domestic clock, the PDP-11 counted time by periods of mains voltage.
High programming cost
The ninth weakness of minicomputers was the high cost of programming. Many users programmed in assembly language without convenient editors and IDE, file systems and debuggers available on large systems. The PDP-11 was not able to overcome this drawback, although more complex systems were built on the basis of the PDP-11 than on previous models, the PDP-8 and PDP-15.
Because of their minimalistic nature, minicomputers did not provide a convenient environment for developing programs. Often used tedious toggle switches, or, perhaps, editing and assembling programs on another, large computer, and transfer them to paper tape.
It was similar to how microcontrollers are programmed today, we edit the program on a large workstation, compile the target binary file, and transfer it to the microcontroller’s flash memory.
However, it seems that Bell did not know about the work of Thompson and Richie, who were busy building their own software environment on the PDP-11 in New Jersey.
People who built the design
Let's move on to the second section: people
This section is most interesting to me as a history buff, because studying the history of computers, like any other historical subject, is basically studying the history of people and the context in which they made decisions.
Bell notes that although computers are based on technology, they are created by people, and therefore he devoted this section to describing the dynamics of the DEC group during the development of the PDP-11.
Problems faced by computer developers can be divided into two parts: problems due to inexperience and problems of a systemic nature.
Here Bell recalls the words of Fred Brooks from his most recent book, The Mythical Man-Month .
Brooks, the head of the OS / 360 project, has struggled for years to create a unified general-purpose operating system that can work on all IBM / 360 models, which was the goal of the project. Brooks's words were fresh in his memory when he wrote this paragraph.
Chronology of design
This section is a window into the work of the DEC Corporation in the late 1960s.
The internal organization of design teams at DEC for many years has varied between market orientation and product orientation. When the company grew by 30 or 40% per year, there was a need for constant reorganization. At any particular time, about a third of the employees worked for the company for less than a year.
Raise your hands if this is familiar to you.
During the development of the PDP-11, the company was structured around product lines. The company's developers were organized into small groups: PDP-10 group, PDP-15 group (18-bit machine), PDP-8 group, PDP-8 / S subgroup, LINC-8 group. Each group included marketers and engineers responsible for product development, software and hardware. As a result of such an organization, experience in architecture was divided into groups.
Bell devotes some time to reviewing each group, listing its strengths and weaknesses, and their contribution to PDP-11. I will not list all of this here, with one exception.
The PDP-10 group was the strongest in the company. they built big, powerful, time-sharing machines. She was in many ways a separate division of the company, with a minimal amount of interaction with other groups. Although the PDP-10 group as a whole had the best understanding of how the system architecture works, they did not have a clue about the range of systems, it was interesting for them to build only high-speed computers.
Recently, I worked in a software company, in which one or two of the oldest products made almost all the company's profits, and I understand Bell’s position well. The PDP-10 was a DEC version of the mainframe, very fast, and available only at one fixed price.
The first works on the creation of a 16-bit computer began under the management of the PDP-15 manager, a marketer with engineering experience. The first project was called PDP-X, and included the specifications of a number of machines. It was a family of machines, and it was better designed than the later PDP-11, but it was not particularly innovative. Unfortunately, the group manager blamed the management that their project was potentially as complex as the PDP-10 (this was not the case), and that he was confident that the project had failed, and therefore no one else wanted to do other large computers other than a single large computer. the company.
And here Bell gives us a good lesson: if your competencies are in the same chain as the projects of other managers, they have an effective tool to kill your project before it enters the market.
In retrospect, the people involved in the development of the PDP-X appeared to be at the same time working on the development of Data General.
This could not have been noticed by an ordinary reader, but this is a reference to the “treacherous eight” Shockley a decade earlier.
Эта группа включала в себя Роберта Нойса и Гордона Мура, которые через десять лет покинули Fairchild и основали собственную компанию Intel.
Edson de Castro, PDP-8 product manager, and PDP-X project leader left DEC, with several people from his team, to form the Data General. It is not clear from the records whether de Castro left because the PDP-X was discontinued, or his departure was the last straw that killed the project. In any case, the result was obvious, as Bell writes.
When the PDP-X project was closed, the DCM project began (Desk Calculator Machine, the code name chosen for privacy). Design and planning were done erratically, because Data General competed with its very small 16-bit computer.
Data General did not compete with DEC with its 16-bit Nova in the market for which the PDP-8 was developed and which de Castro knew like the back of his hand: rack-mounted laboratory equipment
12-bit PDP-8 vs Data General's 16-bit Nova
The last part of the article compares the PDP-11 with its predecessors, and then Bell proceeds to evaluate the PDP-11 architecture itself. The biggest breakthrough was UNIBUS.
Overall, the UNIBUS tire exceeded all expectations. Hundreds of types of storage devices and peripherals could be connected to it, it became the standard architectural component of systems in the price range from $ 3K to $ 100K (1975).
What is UNIBUS?
The earliest commercial computers were developed as a set of modules connected to the backplane with wired connections. At the time of the lamps, this was necessary because the lamps were unreliable and the modules needed to be replaced quickly.
Later, the desire to build a computer from standard modules led to the construction of generalized logical blocks connected with a complex backplane.
Here is an example of early DEC modules.
You could mount them on a complex backplane with wired connections, and build a computer out of them, in this case the PDP-8.
UNIBUS is a development of previous DEC developments and is an abstraction of an idealized control bus. The availability of medium integration components eliminates the need for a complex backplane and moves the main complexity into modules that are installed in the backplane. This makes it possible to build standard modules that connect to a computer.
The UNIBUS bus, as a standard, was a component of the architecture that allows you to build easily configurable systems. Any company, not only DEC, can easily make components that interact with the bus. Good tires create a good engineering environment in which people can concentrate on structured design. UNIBUS created a secondary industry that offered alternative sources of memory supplies and peripherals. Except for the IBM 360 bus, UNIBUS was the most common bus standard in the computer industry.
Before the advent of UNIBUS, what kind of input-output devices the minicomputer could support was determined only by its developers. How to interact with devices was rigidly defined by the logic circuits of the computer. With the advent of UNIBUS, a wide field was opened for customization of the computer by the end user and a field for experiments.
What did the PDP-11 teach us?
Bell's retrospective is completed at the time when the article was written, i.e. in 1976-77, but from our point of view, forty years later, the influence of the PDP-11 was enormous.
Initially, when the PDP-11 was not yet developed, and, moreover, was not considered as a RISC machine, this term did not exist before it was introduced by John Coke in 1976 with respect to the IBM 801. However, for everyone who had programming experience ARM processors, modern RISC processors, their similarity is obvious. Just as the design of programming languages is a process of both evolutionary development and borrowing, the same thing happens with the design of a system of commands.
Also, the PDP-11 drove a stake right into the heart of the dedicated I / O instructions, approving the model of memory mapped I / O, which is the most common mechanism for today. The only processors that had separate I / O instructions are the Intel 8080 and its cousin Z80.
The PDP-11 greatly influenced the software and operating systems. The PDP-11 was the machine on which Ken Thompson and Dennis Ritchie developed UNIX at Bell Labs
UNIX была изначально создана на PDP-7. В 1970 разработка переместилась на PDP-11/20, а позднее на PDP-11/45.
Prior to PDP-11, UNIX did not exist. Before the PDP-11 C did not exist, it was a computer for which C was developed. If you want to know why in classic C, int has 16 bits, this is because of the PDP-11.
UNIX brought us ideas for pipes (“everything is a file” and interactive calculations).
With interactive computing, memory usage is unlimited, and although the PDP was good at managing processes, the requirements for interactive computing were the reason for creating a replacement for the PDP-11.
In the year of the Bell article, 1977, a follower of the PDP-11, VAX-11 was released, which meant “virtual address extension”.
UNIX came to Berkeley in 1974, Ken Thompson brought the tape, which was the beginning of development on the west coast of BSD - Berkley Systems Distribution.
Berkeley UNIX was ported to VAX in the early 1980s and flourished as a countercultural alternative to the DEC VMS operating system. Berkeley UNIX spawned a new generation of hackers who later founded companies such as Sun Microsystems and languages like Self, which directly led to the emergence of Java.
UNIX was ported to a huge number of computer systems during the 1980s, and as a result of the “UNIX War”, various BSD systems appeared to this day.
4BSD, a derivative of the original Berkeley distribution, became the basis of the operating system of the NeXT family of computers from Steve Jobs. When Apple bought NeXT in 1997, NextSTEP and a BSD derivative became the basis of Darwin, OSX, and iOS.
As we said earlier, speaking about Edison de Castro, there were also traitors in the DEC.
Dave Cutler, the architect of the VAX VMS operating system, after failing to start a new combined project of the operating system and hardware designed to replace the VAX, went to Microsoft in 1988, bringing his entire team with him and took the lead in developing Windows NT. Those who know the insides of Windows and the VMS operating system will probably notice common features.
To complete the de Castro story, the Data General Nova series inspired Charles Tucker and Butler Lampson, Xerox Alto developers, who in turn inspired Apple Macintosh developers.
Data General Nova
The rivalry between Data General and DEC continued into the 32-bit era, as Tracey Kidder, who won the Pulitzer Prize in 1981, was told in the book The Soul of a New Machine .
What have we learned from the PDP-11?
Although its development was sometimes chaotic, and not without flaws, the PDP-11 is the intersection of many threads in history.
The hardware, software, programming languages, operating systems, PDP-11 influenced all of this.
It is worth celebrating
What did devops mean?
Padding is hard