📄 p1
字号:
.wh -1i fo.sp 1.25i.wh 0 hd.ps 16.ft B.ceThe U\s14NIX\s16 Time-Sharing System.ft I.sp .3i.ce 2\*nDennis M. RitchieKen Thompson.ce 2Bell LaboratoriesMurray Hill, N. J. 07974.fi.ft B.sp .5i.ceABSTRACT.sp.ft RU\*sNIX\*n is a general-purpose, multi-user, interactiveoperating system for the Digital Equipment Corporation\*sPDP\*n-11/40, 11/45 and 11/70 computers.It offers a number of featuresseldom found even in larger operatingsystems, including.br.tr |.de dl.sp .3.ti -\w'1.|'u...in .5i.dl1.|A hierarchical file system incorporatingdemountable volumes,.dl2.|Compatible file, device, and inter-process I/O,.dl3.|The ability to initiate asynchronous processes,.dl4.|System command language selectable on a per-user basis,.dl5.|Over 100 subsystems including a dozen languages..sp .3.in 0.tr ||This paper discusses the natureand implementation of the file systemand of the user command interface..sp 2.0.ft B1. Introduction.esThere have been three versions of \*sUNIX\*n.The earliest version (circa 1969-70) ran onthe Digital Equipment Corporation \*sPDP\*n-7 and -9 computers.The second version ran on the unprotected\*sPDP\*n-11/20 computer.This paper describes only the \*sPDP\*n-11/40, /45 and /70\*r system,since it is more modern andmany of the differences between it and older \*sUNIX\*n systems result fromredesign of features found to be deficient or lacking..pgSince \*sPDP\*n-11 \*sUNIX\*n became operationalin February, 1971,about 100 installations have been put into service;they are generally smallerthan the system described here.Most of them are engaged in applications such asthe preparation and formatting of patent applicationsand other textual material,the collection and processing of trouble datafrom various switching machines within the Bell System,and recording and checking telephone serviceorders.Our own installation is used mainly for researchin operating systems, languages,computer networks,and other topics in computer science, and also fordocument preparation..br.sp\l'2i'.ps 8.vs 9p.pgCopyright \(co 1974,Association for Computing Machinery, Inc.General permission to republish,but not for profit,all or part of this materialis granted provided that \s7ACM\s8's copyrightnotice is given and that reference is made to the publication,to its date of issue,and to the fact that reprinting privileges were granted bypermission of the Association for Computing Machinery..pgThis is a revised version of an articleappearing in the Communications of the \s7ACM\s8,Volume 17, Number 7 (July 1974) pp. 365-375.That article is arevised version of a paper presentedat the Fourth \s7ACM\s8 Symposium on OperatingSystems Principles,\s7IBM\s8 Thomas J. Watson Research Center,Yorktown Heights,New York,October 15-17, 1973..br.ps 10.vs 12p.bp.pgPerhaps the most important achievement of \*sUNIX\*n is to demonstratethata powerful operating system for interactive useneed not be expensive either in equipment or in humaneffort:\*sUNIX\*n can run on hardware costing as little as $40,000, andless than two man-years were spent on the main systemsoftware.Yet \*sUNIX\*n contains a number of featuresseldom offered even in much larger systems.Hopefully, however, the users of \*sUNIX\*n will find that themost important characteristics of the systemare its simplicity, elegance, and ease of use..pgBesides the system proper, the major programsavailable under \*sUNIX\*n are.sp 1.0.ne 3.in .75i.ne 3.ti .5iassembler,.ti .5itext editor based on \*sQED\*n\*r,.ti .5ilinking loader,.ti .5isymbolic debugger,.ti .5icompiler for a language resembling \*sBCPL\*n\*r with types and structures (C),.ti .5iinterpreter for a dialect of \*sBASIC\*n,.ti .5iphototypesetting and equation setting programs.ti .5iFortran compiler,.ti .5iSnobol interpreter,.ti .5itop-down compiler-compiler (\*sTMG\*n\*r),.ti .5ibottom-up compiler-compiler (\*sYACC\*n),.ti .5iform letter generator,.ti .5imacro processor (M6\*r),.ti .5ipermuted index program..sp .5.in 0.fiThere is also a host of maintenance, utility, recreation and novelty programs.All of these programs were written locally.It is worth noting that the system is totally self-supporting.All \*sUNIX\*n software is maintained under \*sUNIX\*n;likewise, this paper and all other \*sUNIX\*ndocumentswere generated and formatted by the \*sUNIX\*n editor and text formattingprogram..s12. Hardware and software environment.esThe \*sPDP\*n-11/45 on which our \*sUNIX\*n installation is implemented is a 16-bitword (8-bit byte) computer with 112K bytes of core memory;\*sUNIX\*n occupies 53K bytes.This system, however, includes a very large number ofdevice driversand enjoys a generous allotmentof space for I/O buffers and system tables;a minimal system capable of running the softwarementioned above canrequire as little as 64K bytesof core altogether..pgOur \*sPDP\*n-11 has a 1M byte fixed-head disk, usedfor file system storage and swapping,four moving-head disk drives which each provide 2.5M byteson removable disk cartridges,and a single moving-head disk drive whichuses removable 40M byte disk packs.There are also a high-speed paper tape reader-punch,nine-track magnetic tape,and \*sDEC\*ntape (a varietyof magnetic tape facility in which individual recordsmay be addressed and rewritten).Besides the console typewriter, there are 30 variable-speedcommunications interfacesattached to 100-series datasetsand a 201 dataset interface usedprimarily for spooling printout toa communal line printer.There are also several one-of-a-kinddevices including a Picturephone\(rg interface,a voice response unit,a voice synthesizer,a phototypesetter,a digital switching network,and a satellite \*sPDP\*n-11/20which generates vectors, curves, and characters on a Tektronix611 storage-tube display..pgThe greater part of \*sUNIX\*n software is written in theabove-mentioned C language\*r.Early versions of the operating system were written in assembly language,but during the summer of 1973, it was rewritten in C.The size of the new system is about one third greaterthan the old.Since the new system is not only much easier tounderstand and to modify but alsoincludesmany functional improvements,including multiprogramming and the ability toshare reentrant code among several user programs,we considered this increase in size quite acceptable..s13. The File system.esThe most important role of \*sUNIX\*n is to providea file system.From the point of view of the user, thereare three kinds of files: ordinary disk files,directories, and special files..s23.1 Ordinary files.esA filecontains whatever information the user places on it,for example symbolic or binary(object) programs.No particular structuring is expected by the system.Files of text consist simply of a stringof characters, with lines demarcated by the new-line character.Binary programs are sequences of words asthey will appear in core memory when the programstarts executing.A few user programs manipulate files with morestructure;for example, the assembler generates, and the loaderexpects, an object file in a particular format.However,the structure of files is controlled by
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -