Commit | Line | Data |
---|---|---|
bdf8e557 OB |
1 | .LG |
2 | .B | |
3 | .ce | |
4 | Getting started with... | |
5 | .sp | |
6 | .ce | |
7 | Berkeley Software for UNIX\(dg on the VAX\(dd | |
8 | .br | |
9 | .ce | |
10 | \s-4(The third Berkeley Software Distribution)\s0 | |
11 | .R | |
12 | .NL | |
13 | .sp .75i | |
14 | .PP | |
15 | .FS | |
16 | \(dg\s-2UNIX\s0 is a trademark of Bell Laboratories. | |
17 | .FE | |
18 | .FS | |
19 | \(dd\s-2VAX\s0 is a trademark of Digital Equipment Corporation. | |
20 | .FE | |
21 | A package of software for \s-2UNIX\s0 developed at the Computer | |
22 | Science Division of the University of California at Berkeley is | |
23 | installed on our system. This package includes a new version of the | |
24 | operating system kernel which supports a virtual memory, demand-paged | |
25 | environment. While the kernel change should be transparent to most | |
26 | programs, there are some things you should know if you plan to run | |
27 | large programs to optimize their performance in a virtual memory | |
28 | environment. There are also a number of other new programs which are | |
29 | now installed on our machine; the more important of these | |
30 | are described below. | |
31 | .SH | |
32 | Documentation | |
33 | .PP | |
34 | The new software is described in two new volumes of documentation. The first | |
35 | is a new version of volume 1 of the \s-2UNIX\s0 programmers manual | |
36 | which has integrated manual pages for the distributed software and | |
37 | incorporates changes to the system made while introducing the virtual | |
38 | memory facility. The second volume of documentation is numbered volume | |
39 | 2c, of which this paper is a section. | |
40 | This volume contains papers about programs which are in the distribution | |
41 | package. | |
42 | .SH | |
43 | Where are the programs? | |
44 | .PP | |
45 | Most new programs from Berkeley reside in the directory | |
46 | .B /usr/ucb. | |
47 | A major exception is the C shell, | |
48 | .I csh, | |
49 | which lives in | |
50 | .B /bin. | |
51 | We will later describe how you can arrange for the programs | |
52 | in the distribution to be part of your normal working environment. | |
53 | .SH | |
54 | Making use of the Virtual Memory | |
55 | .PP | |
56 | With a virtual memory system, it is no longer necessary for running programs to | |
57 | be fully resident in memory. Programs need have only a subset | |
58 | of their address space resident in memory, and pages which are not | |
59 | resident in memory will be | |
60 | .I faulted | |
61 | into memory if they are needed. | |
62 | This allows programs larger than memory to run, but also places a penalty | |
63 | on programs which do not exhibit | |
64 | .I locality. | |
65 | It is important to structure large programs so that at any one time | |
66 | they are referring to as small a number of pages as possible. | |
67 | .PP | |
68 | If you are going to create very large programs, then you should know about | |
69 | a new demand load format. This format causes large programs to begin execution | |
70 | more rapidly, without loading in all the pages of the program before execution | |
71 | begins. It is most suitable for programs which are large (say > 50K bytes | |
72 | of program and initialized data), | |
73 | and especially when a program has a large number of facilities, | |
74 | not all of which are used in any one run. | |
75 | To create an executable file with this format, you use the | |
76 | .B \-z | |
77 | loader directive; thus you can say ``cc \-z ...'' or ``f77 \-z ...''. | |
78 | The | |
79 | .I file | |
80 | command will show such files to be ``demand paged pure executable'' | |
81 | files. | |
82 | See the manual page for | |
83 | .I ld | |
84 | in section 1 and | |
85 | .I a.out | |
86 | in section 5 of volume 1 of the manual for more information. | |
87 | .PP | |
88 | If you have or are writing | |
89 | a large program which creates new processes as children, | |
90 | then you should know about | |
91 | .B vfork | |
92 | system call. | |
93 | The | |
94 | .B fork | |
95 | system call creates a new process by copying the data space of | |
96 | the parent process to create a child process. In a virtual environment | |
97 | this is very expensive. | |
98 | .B Vfork | |
99 | allows creation of a new process without copying the parent's address | |
100 | space by letting the parent execute in the child's system context. | |
101 | The parent can set up the input/output for the child and then return | |
102 | to its own context after a call to | |
103 | .B exec | |
104 | or | |
105 | .B _exit. | |
106 | If you use the standard I/O routine | |
107 | .B system() | |
108 | to execute commands from within your programs, then | |
109 | .B vfork | |
110 | will be used automatically. | |
111 | If you have been calling | |
112 | .B fork | |
113 | yourself, | |
114 | you should read the manual page for | |
115 | .B vfork | |
116 | and use it when you can. | |
117 | .PP | |
118 | In order that efficient random access be permitted in a portable way to | |
119 | large data files, a pair of new system calls has been added: | |
120 | .B vread | |
121 | and | |
122 | .B vwrite. | |
123 | These calls resemble the normal \s-2UNIX\s0 | |
124 | .B read | |
125 | and | |
126 | .B write | |
127 | calls, but are potentially much more efficient for sparse and random | |
128 | access to large data files. | |
129 | .B Vread | |
130 | does not cause all the data which is virtually read to be immediately | |
131 | transferred to your address space. Rather, the data can be fetched | |
132 | as required by references, at the systems discretion. At the point of the | |
133 | .B vread, | |
134 | the system merely computes the disk block numbers of the corresponding | |
135 | pages and stores these in the page tables. Faulting in a page from | |
136 | the file system is thus no more expensive than faulting in a page from | |
137 | the paging device. In both cases all the mapping information is immediately | |
138 | available or can be easily computed from incore information. | |
139 | .B Vwrite | |
140 | works with | |
141 | .B vread | |
142 | to allow efficient updating of large data which is only partially | |
143 | accessed, by rewriting to the file only those pages which have been modified. | |
144 | .PP | |
145 | Downward compatibility to non-virtual systems is achieved by the | |
146 | fact that | |
147 | .B read | |
148 | and | |
149 | .B write | |
150 | calls have the same semantics as | |
151 | .B vread | |
152 | and | |
153 | .B vwrite | |
154 | calls; only the efficiency is different. | |
155 | If you have programs which access large files, and do so sparsely, | |
156 | read the manual pages for | |
157 | .B vread | |
158 | and | |
159 | .B vwrite | |
160 | in section 2 of volume 1 of the manual. | |
161 | .SH | |
162 | File System blocksize changes | |
163 | .PP | |
164 | The size of blocks in the file system has been changed to improve the | |
165 | throughput of the disks. The constant ``512'' is not the ``best'' size | |
166 | to use when reading/writing the disk; rather you should use ``BUFSIZ'' | |
167 | blocks as defined in the include file <stdio.h>. | |
168 | Because this constant has been changed | |
169 | .B | |
170 | all old \&.o files must be removed and then recreated. | |
171 | .R | |
172 | They will not load successfully, since the distributed | |
173 | library routines assume that BUFSIZ is 1024 (its current value at | |
174 | our installation). | |
175 | Old executable images may be preserved by running the command | |
176 | .DS | |
177 | 1kfix file | |
178 | .DE | |
179 | on each such file. | |
180 | Note that this only works for ``a.out'' type files, not ``.o's.'' | |
181 | It is recommended that all old programs be recompiled to take | |
182 | advantage of the larger disk block size. | |
183 | .SH | |
184 | New Languages for the VAX | |
185 | .PP | |
186 | There are now available interpreters for \s-2APL\s0 and Pascal | |
187 | for the \s-2VAX\s0, and a \s-2LISP\s0 system supporting a dialect of | |
188 | \s-2LISP\s0 compatible with a large subset of \s-2MACLISP\s0. | |
189 | The \s-2APL\s0 interpreter is the \s-211\s0 version, moved to the \s-2VAX\s0, | |
190 | and now has a large workspace capability (but | |
191 | has not been extensively used.) | |
192 | The Pascal system has been used extensively for instruction and research | |
193 | and is the same system which was available on the PDP-11. The only | |
194 | limitations of the Pascal system are a maximum of 32K bytes per stack | |
195 | frame (due to the implementation of the interpreter), and 64K bytes per | |
196 | variable allocated with | |
197 | .I new. | |
198 | Essentially arbitrary sized programs can be run with the system, | |
199 | which supports a very standard Pascal with no language extensions. | |
200 | The Pascal system features very good error diagnostics, and | |
201 | includes a source level execution profiling facility.\(dg | |
202 | .FS | |
203 | \(dg A compiler for Pascal based on this system is currently being developed, | |
204 | but is not part of this distribution. | |
205 | .FE | |
206 | .PP | |
207 | The \s-2LISP\s0 system, ``Franz Lisp'', was developed at Berkeley as part | |
208 | of a project to move the \s-2MIT\s0 \s-2MACSYMA\s0 system from | |
209 | the \s-2PDP-10\s0 to the \s-2VAX\s0. A compiler | |
210 | .I liszt | |
211 | for Franz Lisp, written at Bell Laboratories, is also included with the system. | |
212 | .PP | |
213 | For more information about | |
214 | \s-2APL\s0 refer to its manual page in volume 1 of the manual. | |
215 | The Pascal system consists of the programs | |
216 | .B pi, | |
217 | .B px, | |
218 | .B pix, | |
219 | .B pxp, | |
220 | .B pxref, | |
221 | and | |
222 | .B pic, | |
223 | all of which are documented in section 1 of volume 1 of the manual. | |
224 | There is also a paper introducing the system in volume 2c. | |
225 | The \s-2LISP\s0 system is described in | |
226 | .I "The Franz Lisp Manual" | |
227 | in volume 2c of the manual. | |
228 | .SH | |
229 | A display editor \- \fIvi\fR | |
230 | .PP | |
231 | The system includes the latest version of the display editor | |
232 | .I vi | |
233 | which runs on a large number of intelligent and unintelligent display terminals. | |
234 | This editor runs using a terminal description data base and a library | |
235 | of routines for writing terminal independent programs which is also supplied. | |
236 | The editor has a mnemonic command set which is easy to learn and remember, | |
237 | and deals with the hierarchical structure of documents in a natural way. | |
238 | Editor users are protected against loss of work if the system crashes, | |
239 | and against casual mistakes by a general | |
240 | .I undo | |
241 | facility as well as visual feedback. | |
242 | The editor is quite usable even on low speed lines and dumb terminals. | |
243 | .PP | |
244 | For users who prefer line oriented editing, the | |
245 | .I ex | |
246 | command enters the same editor, but in a line oriented editing mode. | |
247 | For beginners who have never used a line editor before, | |
248 | there is a version of the editor known as | |
249 | .I edit | |
250 | which has a well-written tutorial introducing it. | |
251 | .PP | |
252 | For more information about | |
253 | .I edit | |
254 | see | |
255 | .I "Edit: a Tutorial" | |
256 | in volume 2c of the manual. | |
257 | The line editor features are described in the | |
258 | .I "Ex Reference Manual" | |
259 | which is in volume 2c of the manual. | |
260 | Also in volume 2c are | |
261 | .I "An Introduction to Display Editing with Vi" | |
262 | and a | |
263 | .I vi | |
264 | reference card. | |
265 | .SH | |
266 | Command and mail processing programs | |
267 | .PP | |
268 | There is also a new command processor | |
269 | .I csh | |
270 | which caters to interactive users by providing a history list of | |
271 | recent commands, which can be easily repeated. The shell also | |
272 | has a powerful macro-like aliasing facility which can be used to | |
273 | tailor a friendly command environment. | |
274 | .I Csh | |
275 | is implemented so that both it and the standard shell | |
276 | .B /bin/sh | |
277 | can be run on the same system. | |
278 | .PP | |
279 | The | |
280 | .I "Introduction to the C shell" | |
281 | introduces the shell. If you have used the standard shell, then | |
282 | you should especially read about the | |
283 | .I history | |
284 | and | |
285 | .I alias | |
286 | mechanisms of the shell. | |
287 | .PP | |
288 | In order that the manual distributed with the tape correspond to the | |
289 | commands which are available to you, the default execution search | |
290 | path is | |
291 | .DS | |
292 | PATH=:/usr/ucb:/bin:/usr/bin | |
293 | .DE | |
294 | in the language of | |
295 | .B /bin/sh | |
296 | or | |
297 | .DS | |
298 | setenv PATH :/usr/ucb:/bin:/usr/bin: | |
299 | set path=(. /usr/ucb /bin /usr/bin) | |
300 | .DE | |
301 | in the language of | |
302 | .B /bin/csh. | |
303 | .PP | |
304 | For sending and receiving mail, | |
305 | a new interactive mail processing command provides a hospitable environment, | |
306 | supporting items such as subject and carbon copy fields, and allowing creation | |
307 | of distribution lists. This command also has a mail reading mode which | |
308 | makes it convenient to deal with | |
309 | large volumes of mail. | |
310 | See the manual page for | |
311 | .I mail | |
312 | in section 1, volume 1 of the manual, and the | |
313 | .I "Mail reference Manual" | |
314 | in volume 2c of the manual for more details. | |
315 | .SH | |
316 | Better debugger support | |
317 | .PP | |
318 | A version of the symbolic debugger | |
319 | .I sdb | |
320 | is provided which now can debug | |
321 | FORTRAN 77 programs. The assembler has been rewritten and the C compiler | |
322 | modified to reduce greatly the overhead of using the symbolic debugger, | |
323 | making it much more feasible for heavy use. | |
324 | If you are interested, then you should read the new document for | |
325 | .I sdb, | |
326 | provided in volume 2c. | |
327 | .SH | |
328 | Other software | |
329 | .PP | |
330 | Other new programs include | |
331 | programs to simulate the phototypesetter on 200 bpi plotters, | |
332 | a common system messages facility, routines for data compression, | |
333 | a modified version of the standard I/O library permitting | |
334 | simultaneous reads and writes, a network for connecting heterogeneous | |
335 | UNIX systems at low cost (1 tty port per connection per machine and | |
336 | no system changes), and a new, flexible macro package for n/troff | |
337 | .I \-me. | |
338 | New command | |
339 | .B whatis | |
340 | and | |
341 | .B apropos | |
342 | can be used to identify programs and to locate commands based on keywords. | |
343 | Try | |
344 | .DS | |
345 | cd /usr/ucb | |
346 | whatis * | |
347 | .DE | |
348 | and to find out about Pascal: | |
349 | .DS | |
350 | apropos pascal | |
351 | .DE | |
352 | .SH | |
353 | Monitoring the new system | |
354 | .PP | |
355 | If you want to see what is happening in the new system, you can use the | |
356 | new | |
357 | .B vmstat | |
358 | command, described in section 1 of the manual, which shows the current | |
359 | virtual load on the system. The system recomputes the information printed | |
360 | by | |
361 | .B vmstat | |
362 | every five seconds, so a ``vmstat 5'' is a good command to try. | |
363 | .PP | |
364 | To see what processes are active virtual processes, you can do | |
365 | .DS | |
366 | ps av | |
367 | .DE | |
368 | The command | |
369 | .DS | |
370 | ps v | |
371 | .DE | |
372 | will print only the active processes which you are running. |