. . Unix

("THE DESIGN OF THE UNIX OPERATING SYSTEM" by Maurice J. Bach)
. .
  • ......................................................... 3
  • 1
    1.1 ......................................................... 6
    1.2 ............................................... 8
    1.3 .............................. 10
    1.3.1 .......................................... 10
    1.3.2 ................................ 14
    1.3.3 ........................... 16
    1.4 ................................... 17
    1.5 ................................ 18
    1.5.1 .............................. 19
    1.5.2 .............................. 20
    1.5.3 ...................................... 20
    1.6 ......................................................... 21
  • 2
    2.1 UNIX.......................... 22
    2.2 ............................ 24
    2.2.1 .......... 24
    2.2.2 .................................................. 26
    2.2.2.1 .................................... 31
    2.2.2.2 ................................... 31
    2.2.2.3 .................... 31
    2.2.2.4 "" .................................. 34
    2.3 .......................................... 35
    2.4 ............................................ 36
    2.5 ................................ 37
    2.6 ..................................................... 38
  • 3
    3.1 .............................................. 39
    3.2 ( ).................... 41
    3.3 ........................................ 42
    3.4 ............................... 52
    3.5 ...................... 55
    3.6 ........................................................ 56
    3.7 .................................................... 57
  • 4
    4.1 ....................................................... 59
    4.1.1 .............................................. 59
    4.1.2 ..................................... 62
    4.1.3 .................................... 64
    4.2 ................................. 64
    4.3 ...................................................... 70
    4.4 ( )
    ....................................... 71
    4.5 ..................................................... 73
    4.6 ............................... 73
    4.7 ..................................... 80
    4.8 ............................................ 83
    4.9 ........................................................ 83
  • 5
    5.1 OPEN.......................................................... 86
    5.2 READ.......................................................... 90
    5.3 WRITE......................................................... 95
    5.4 ......................................... 96
    5.5 , - -LSEEK 96
    5.6 CLOSE......................................................... 97
    5.7 ................................................ 99
    5.8 .................................. 100
    5.9 .......................... 102
    5.10 .................... 103
    5.11 STAT FSTAT................................................ 103
    5.12 ...................................................... 104
    5.12.1 pipe................................. 104
    5.12.2 ......................... 106
    5.12.3 .................... 106
    5.12.4 ....................................... 108
    5.12.5 ................................................ 109
    5.13 DUP......................................................... 110
    5.14 ............... 111
    5.14.1 .. 115
    5.14.2 ........................... 118
    5.15 LINK........................................................ 120
    5.16 UNLINK...................................................... 123
    5.16.1 .............................. 125
    5.16.2 .................................... 126
    5.17 ................... 129
    5.18 .............................. 130
    5.19 ...................................................... 131
    5.20 .................................................. 131
  • 6
    6.1 ..................... 137
    6.2 ........................................ 141
    6.2.1 ................................................. 141
    6.2.2 .............................. 143
    6.2.3 ......................................... 145
    6.2.4 ................................... 146
    6.3 ............................................ 147
    6.4 ................................ 150
    6.4.1 ............................ 151
    6.4.2
    ....................................... 153
    6.4.3 .................................. 156
    6.4.4 .... 158
    6.4.5 -
    .................... 159
    6.5 ................... 159
    6.5.1 .................. 160
    6.5.2 ....................................... 160
    6.5.3 ........................ 161
    6.5.4 ............................... 162
    6.5.5 ........................................ 163
    6.5.6 .................................... 167
    6.5.7 ........................ 168
    6.5.8 ......................... 169
    6.6 ...................................... 170
    6.6.1 , , .. 171
    6.6.2 ........ 173
    6.7 ....................................................... 175
    6.8 ................................................... 176
  • 7
    7.1 ............................................ 179
    7.2 ...................................................... 187
    7.2.1 ...................................... 190
    7.2.2 ........................................ 197
    7.2.3 ............................. 197
    7.3 ............................... 198
    7.4 ...................... 200
    7.5 ........................................ 204
    7.6 ...................... 213
    7.7 ................................... 215
    7.8 SHELL.................................... 218
    7.9 ......................... 220
    7.10 ...................................................... 223
    7.11 .................................................. 224
  • 8
    8.1 ............................ 232
    8.1.1 ................................................ 233
    8.1.2 ............................... 233
    8.1.3 ....................... 237
    8.1.4 ................................. 238
    8.1.5 ............ 239
    8.1.6 ....................... 241
    8.2 , .................... 241
    8.3 ....................................................... 243
    8.3.1 ........................................ 245
    8.3.2 -.......................... 246
    8.3.3 ...................................... 247
    8.3.4 ....................................... 250
    8.3.5 ........................... 251
    8.4 ....................................................... 251
    8.5 ................................................... 251
  • 9
    9.1 ...................................................... 253
    9.1.1 ......... 253
    9.1.2 ...................................... 257
    9.1.2.1 fork........ 259
    9.1.2.2 ................................ 260
    9.1.3 () ........................... 260
    9.2 .......................................... 265
    9.2.1 , - ..267
    9.2.1.1 fork ........ 270
    9.2.1.2 exec ........ 272
    9.2.2 "" ....................................... 274
    9.2.3 ....................... 277
    9.2.3.1 - 278
    9.2.3.2 ...... 282
    9.2.4 ..... 285
    9.3 .. 286
    9.4 ....................................................... 287
    9.5 ................................................... 287
  • 10 -
    10.1 .. 290
    10.1.1 ................................... 291
    10.1.2 ........ 293
    10.1.2.1 Open.............................................. 294
    10.1.2.2 Close............................................. 297
    10.1.2.3 Read Write...................................... 298
    10.1.2.4 .......................... 299
    10.1.2.5 Ioctl............................................. 300
    10.1.2.6 , 300
    10.1.3 ......................... 301
    10.2 ........................................... 301
    10.3 ....................................... 305
    10.3.1 ...................................... 307
    10.3.2 ............. 310
    10.3.3 ... 315
    10.3.4 ........................................ 318
    10.3.5 ..................... 318
    10.3.6 ........................... 319
    10.3.7 ......................................... 319
    10.4 ...................................................... 320
    10.4.1 ................... 324
    10.4.2 ......................................... 326
    10.5 ...................................................... 327
    10.6 .................................................. 327
  • 11
    11.1 ....................................... 330
    11.2 V ................. 334
    11.2.1 .............................................. 335
    11.2.2 ...................................... 341
    11.2.3 ............................................... 344
    11.2.4 ........................................ 353
    11.3 ....................................... 354
    11.4 ...................................................... 355
    11.5 ...................................................... 360
    11.6 .................................................. 360
  • 12
    12.1 , .......... 362
    12.2 ............................ 363
    12.3 .................................................... 365
    12.3.1 .................................. 366
    12.3.2 ................................... 367
    12.3.3 ..................................... 374
    12.3.3.1 .................................. 374
    12.3.3.2 Wait.............................................. 377
    12.3.3.3 .......................................... 377
    12.3.3.4 ................................ 378
    12.4 TUNIS............................................... 378
    12.5 ..... 379
    12.6 .................................................. 379
  • 13
    13.1 ..................................... 382
    13.2 NEWCASTLE........................................ 390
    13.3 "" ................ 393
    13.4 ............ 396
    13.5 ...................................................... 397
    13.6 .................................................. 398

  • ............................................... 400
    access....................................................... 400
    acct......................................................... 400
    alarm........................................................ 400
    brk.......................................................... 401
    chdir........................................................ 401
    chmod........................................................ 401
    chown........................................................ 401
    chroot....................................................... 401
    close........................................................ 402
    creat........................................................ 402
    dup.......................................................... 402
    exec......................................................... 402
    exit......................................................... 402
    fcntl........................................................ 403
    fork......................................................... 404
    getpid....................................................... 404
    getuid....................................................... 404
    ioctl........................................................ 404
    kill......................................................... 404
    link......................................................... 405
    lseek........................................................ 405
    mknod........................................................ 405
    mount........................................................ 406
    msgctl....................................................... 406
    msgget....................................................... 407
    msgsnd msgrcv.............................................. 407
    nice......................................................... 408
    open......................................................... 408
    pause........................................................ 409
    pipe......................................................... 409
    plock........................................................ 409
    profil....................................................... 410
    ptrace....................................................... 410
    read......................................................... 410
    semctl....................................................... 411
    semget....................................................... 412
    semop........................................................ 412
    setpgrp...................................................... 413
    setuid....................................................... 413
    shmctl....................................................... 413
    shmget....................................................... 414
    shmop........................................................ 414
    signal....................................................... 415
    stat......................................................... 416
    stime........................................................ 416
    sync......................................................... 416
    time......................................................... 416
    times........................................................ 417
    ulimit....................................................... 417
    umask........................................................ 417
    umount....................................................... 418
    uname........................................................ 418
    unlink....................................................... 418
    ustat........................................................ 418
    utime........................................................ 419
    wait......................................................... 419
    write........................................................ 419
    ..................................................... 420

  • Cpio + GZIP? .
  • zip-