The Origin of Concurrent Programming
The Origin of Concurrent Programming
复制标题
并发编程的起源
DOI:
10.1007/978-1-4757-3472-0
复制
发表时间:
2002
影响因子:
1.1
通讯作者:
P. B. Hansen
中科院分区:
文献类型:
--
作者:
P. B. Hansen
concurrent programming had an immediate and dramatic impact on our fundamental understanding of computer operating systems. The implementation techniques of operating systems were reasonably weIl understood in the late 1960s. But most systems were too large and poorly described to be studied in detail. All of them were written either in assembly language or in sequential programming languages extended with assembly language features. Most of the literature on operating systems emphasized low-Ievel implementation details of particular systems rather than general concepts. The terminology was unsystematic and incomplete (Brinch Hansen 2000). Before the invention of abstract concurrent programming, it was impractical to include algorithms in operating system descriptions. Technical writers mixed informal prose with unstructured flowcharts and complicated pictures of linked lists and state transitions. ll In its Cosine Report (1971), the National Academy of Engineering summarized the state of affairs at the time [with emphasis added]: llSee, for example, IBM (1965), Elliott Organick (1972), and Stuart Madnick (1974). 22 PER BRINCH HANSEN The subject of computer operating systems, if taught at all , is typ ically a descriptive study of some specific operating system, with little attention being given to emphasizing the relevant basic concepts and principles. To worsen matters, it has been difficult Jor most university departments to develop a new course stressing operating systems principles . .. There are essentially no suitable textbooks on the subject. I consider myself lucky to have started in industry. The RC 4000 project convinced me that a fundamental understanding of operating systems would change computer programming radically. I was so certain of this that I decided to leave industry and become a researcher. In November 1970 I became a research associate at Carnegie-Mellon University, where I wrote the first comprehensive textbook on operating system principles: P. Brinch Hansen, An Outline of a Course on Operating System Principles {l971) While writing the book I reached the conclusion that operating systems are not radically different from other programs. They are just large programs based on the principles of a more fundamental subject: parallel programming. Starting from a concise definition of the purpose of an operating system, I divided the subject into five major areas. First, I presented the principles of parallel programming as the essence of operating systems. Then I described processor management, memory management, scheduling algorithms and resource protection as techniques for implementing parallel processes. I defined operating system concepts by abstract algorithms written in Pascal extended with a notation for structured multiprogramming. My (unimplemented) programming notation included concurrent statements, semaphores, conditional critical regions, message buffers, and monitors. These programming concepts are now discussed in all operating system texts. The book includes a concise vocabulary of operating system terminology, which is used consistently throughout the text. The vocabulary includes the following terms: concurrent processes, processes that overlap in time; concurrent processes are called disjoint if each of them only refers to private data; they are called interacting if they refer to common data. synchronization, a general term for any constraint on the order in which operations are carried out; a synchronization rule can, for example, specify the precedence, priority, or mutual exclusion in time of operations. THE INVENTION OF CONCURRENT PROGRAMMING 23 monitor, a common da ta structure and a set of meaningful operations on it that exclude one another in time and control the synchranization of concurrent processes. My book Operating System Principles was published in July 1973. Pet er Naur (1975) reviewed it: The presentation is generally at a very high level of clarity, and gives evidence of deep insight. In pursuing his general aim, the establishment of a coherent set of basic principles for the field, the author is highly successful. The principles are supported by algorithms written in Pascal, extended where necessary with carefully described primitives. elose attention is paid to the thorny quest ion of terminology. In my outline of the book I made a prediction that would guide my future research: So far nearly all operating systems have been written partly or completely in machine language. This makes them unnecessarily difficult to understand, test and modify. I believe it is desirable and possible to write efficient operating systems almost entirely in a high-level language. This language must permit hierarchal structuring of data and program, extensive errar checking at compile time, and production of efficient machine code. 7 Structured Multiprogramming P. Brinch Hansen. Structured Multiprogramming (1972) The conditional critical region, proposed by Hoare (1971), had minor notationallimitations and a potentially serious implementation problem: 1. A shared variable is declared as both a variable and aresource. The textual separation of these declarations can be misused to treat the same variable as a scheduled resource in some contexts and as an ordinary variable in other contexts. This would enable a process to refer directly to a variable while another process is within a "critical" region on the same variable. I closed this loophole by using a single declaration to introduce a shared variable (of some type T):