home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: MPTSK.TEX
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Croteam texture file (image/croteamTextureFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CRLF line terminators
| default
| |
100%
| TrID
| LaTeX 2e document (with rem)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CRLF]
| default (weak)
| |
100%
| xdgMime
| text/x-matlab
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |%*******|********|
|00000010| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000020| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000030| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000040| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0d 0a |********|*****/..|
|00000050| 25 2a 20 6d 70 74 73 6b | 2e 74 65 78 20 2d 2d 20 |%* mptsk|.tex -- |
|00000060| 45 44 55 43 41 54 49 4f | 4e 41 4c 20 41 52 54 49 |EDUCATIO|NAL ARTI|
|00000070| 43 4c 45 20 44 45 53 43 | 52 49 42 49 4e 47 20 54 |CLE DESC|RIBING T|
|00000080| 48 45 20 4d 41 49 4c 42 | 4f 58 20 4d 55 4c 54 49 |HE MAILB|OX MULTI|
|00000090| 54 41 53 4b 45 52 20 09 | 20 20 20 20 2a 2f 0d 0a |TASKER .| */..|
|000000a0| 25 2a 20 43 72 65 61 74 | 65 64 3a 20 20 73 65 65 |%* Creat|ed: see|
|000000b0| 20 62 65 6c 6f 77 09 09 | 52 65 6c 65 61 73 65 3a | below..|Release:|
|000000c0| 20 20 73 65 65 20 62 65 | 6c 6f 77 09 56 65 72 73 | see be|low.Vers|
|000000d0| 69 6f 6e 3a 20 20 73 65 | 65 20 62 65 6c 6f 77 20 |ion: se|e below |
|000000e0| 2a 2f 0d 0a 25 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*/..%***|********|
|000000f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000100| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000110| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000120| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000130| 2a 0d 0a 25 28 63 29 20 | 43 6f 70 79 72 69 67 68 |*..%(c) |Copyrigh|
|00000140| 74 20 31 39 38 37 2c 20 | 31 39 38 38 20 62 79 20 |t 1987, |1988 by |
|00000150| 4d 69 63 68 61 65 6c 20 | 42 65 6e 6a 61 6d 69 6e |Michael |Benjamin|
|00000160| 20 50 61 72 6b 65 72 20 | 20 20 20 28 55 53 41 20 | Parker | (USA |
|00000170| 53 53 23 20 35 35 37 2d | 34 39 2d 34 31 33 30 29 |SS# 557-|49-4130)|
|00000180| 0d 0a 25 0d 0a 25 41 6c | 6c 20 52 69 67 68 74 73 |..%..%Al|l Rights|
|00000190| 20 52 65 73 65 72 76 65 | 64 20 75 6e 6c 65 73 73 | Reserve|d unless|
|000001a0| 20 73 70 65 63 69 66 69 | 65 64 20 69 6e 20 74 68 | specifi|ed in th|
|000001b0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 69 6e 63 6c |e follow|ing incl|
|000001c0| 75 64 65 20 66 69 6c 65 | 73 3a 20 2a 2f 0d 0a 25 |ude file|s: */..%|
|000001d0| 23 69 6e 63 6c 75 64 65 | 20 22 6d 70 74 73 6b 2e |#include| "mptsk.|
|000001e0| 63 70 79 22 20 2f 2a 0d | 0a 25 0d 0a 25 44 4f 20 |cpy" /*.|.%..%DO |
|000001f0| 4e 4f 54 20 52 45 4d 4f | 56 45 20 4f 52 20 41 4c |NOT REMO|VE OR AL|
|00000200| 54 45 52 20 54 48 49 53 | 20 4e 4f 54 49 43 45 20 |TER THIS| NOTICE |
|00000210| 41 4e 44 20 49 54 53 20 | 50 52 4f 56 49 53 49 4f |AND ITS |PROVISIO|
|00000220| 4e 53 2e 0d 0a 25 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |NS...%**|********|
|00000230| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000240| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000250| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000260| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000270| 2a 2a 2f 0d 0a 25 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |**/..%**|********|
|00000280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000290| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002c0| 2a 2a 2f 0d 0a 25 20 4f | 56 45 52 56 49 45 57 3a |**/..% O|VERVIEW:|
|000002d0| 0d 0a 25 20 0d 0a 25 0d | 0a 25 20 49 74 20 69 73 |..% ..%.|.% It is|
|000002e0| 20 66 6f 72 6d 61 74 74 | 65 64 20 75 73 69 6e 67 | formatt|ed using|
|000002f0| 20 74 68 65 20 70 75 62 | 6c 69 63 20 64 6f 6d 61 | the pub|lic doma|
|00000300| 69 6e 20 4c 61 54 65 58 | 2c 20 61 6e 20 65 6e 68 |in LaTeX|, an enh|
|00000310| 61 6e 63 65 6d 65 6e 74 | 20 6f 66 0d 0a 25 20 44 |ancement| of..% D|
|00000320| 6f 6e 61 6c 64 20 4b 6e | 75 74 68 27 73 20 54 65 |onald Kn|uth's Te|
|00000330| 58 20 74 65 78 74 20 66 | 6f 72 6d 61 74 74 69 6e |X text f|ormattin|
|00000340| 67 20 73 79 73 74 65 6d | 2e 20 20 20 42 6f 74 68 |g system|. Both|
|00000350| 20 61 72 65 20 69 6e 20 | 74 68 65 20 70 75 62 6c | are in |the publ|
|00000360| 69 63 20 64 6f 6d 61 69 | 6e 2e 0d 0a 25 2a 2a 2a |ic domai|n...%***|
|00000370| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000380| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0d 0a 25 2a 2a 2a |********|*/..%***|
|000003c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000400| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0d 0a 5c 64 6f 63 |********|*/..\doc|
|00000410| 75 6d 65 6e 74 73 74 79 | 6c 65 7b 61 72 74 69 63 |umentsty|le{artic|
|00000420| 6c 65 7d 0d 0a 5c 70 61 | 67 65 73 74 79 6c 65 7b |le}..\pa|gestyle{|
|00000430| 68 65 61 64 69 6e 67 73 | 7d 0d 0a 0d 0a 5c 74 69 |headings|}....\ti|
|00000440| 74 6c 65 7b 0d 0a 42 75 | 69 6c 64 20 41 5c 5c 0d |tle{..Bu|ild A\\.|
|00000450| 0a 50 6f 72 74 61 62 6c | 65 20 4d 75 6c 74 69 74 |.Portabl|e Multit|
|00000460| 61 73 6b 69 6e 67 20 45 | 6e 76 69 72 6f 6e 6d 65 |asking E|nvironme|
|00000470| 6e 74 5c 5c 0d 0a 69 6e | 20 60 60 43 27 27 7d 0d |nt\\..in| ``C''}.|
|00000480| 0a 0d 0a 5c 61 75 74 68 | 6f 72 7b 0d 0a 43 6f 70 |...\auth|or{..Cop|
|00000490| 79 72 69 67 68 74 20 5c | 63 6f 70 79 72 69 67 68 |yright \|copyrigh|
|000004a0| 74 20 31 39 38 38 5c 74 | 68 61 6e 6b 73 7b 0d 0a |t 1988\t|hanks{..|
|000004b0| 54 68 69 73 20 69 73 20 | 61 20 62 65 74 61 20 72 |This is |a beta r|
|000004c0| 65 6c 65 61 73 65 20 6f | 66 20 61 6e 20 61 72 74 |elease o|f an art|
|000004d0| 69 63 6c 65 20 69 6e 74 | 65 6e 64 65 64 20 66 6f |icle int|ended fo|
|000004e0| 72 20 74 68 65 20 4a 75 | 6c 79 20 27 38 38 20 69 |r the Ju|ly '88 i|
|000004f0| 73 73 75 65 0d 0a 6f 66 | 20 42 59 54 45 20 4d 61 |ssue..of| BYTE Ma|
|00000500| 67 61 7a 69 6e 65 2e 20 | 20 44 6f 20 6e 6f 74 20 |gazine. | Do not |
|00000510| 63 6f 70 79 20 6e 6f 72 | 20 64 69 73 74 72 69 62 |copy nor| distrib|
|00000520| 75 74 65 2e 20 20 59 6f | 75 72 20 74 68 6f 75 67 |ute. Yo|ur thoug|
|00000530| 68 74 73 20 61 6e 64 0d | 0a 73 75 67 67 65 73 74 |hts and.|.suggest|
|00000540| 69 6f 6e 73 20 61 70 70 | 72 65 63 69 61 74 65 64 |ions app|reciated|
|00000550| 2e 20 20 28 42 79 20 74 | 68 65 20 77 61 79 2c 20 |. (By t|he way, |
|00000560| 74 68 61 74 20 74 68 69 | 6e 67 20 75 70 20 61 62 |that thi|ng up ab|
|00000570| 6f 76 65 20 69 73 20 73 | 75 70 70 6f 73 65 64 20 |ove is s|upposed |
|00000580| 0d 0a 74 6f 20 62 65 20 | 61 20 6a 75 67 67 6c 65 |..to be |a juggle|
|00000590| 72 21 29 7d 0d 0a 20 4d | 69 63 68 61 65 6c 20 42 |r!)}.. M|ichael B|
|000005a0| 65 6e 6a 61 6d 69 6e 20 | 50 61 72 6b 65 72 2c 20 |enjamin |Parker, |
|000005b0| 4d 49 54 20 27 38 39 20 | 5c 5c 0d 0a 7c 5c 5c 0d |MIT '89 |\\..|\\.|
|000005c0| 0a 45 61 73 74 20 43 61 | 6d 70 75 73 20 2d 20 4d |.East Ca|mpus - M|
|000005d0| 75 6e 2e 20 33 30 33 5c | 5c 0d 0a 33 20 41 6d 65 |un. 303\|\..3 Ame|
|000005e0| 73 20 53 74 72 65 65 74 | 5c 5c 0d 0a 43 61 6d 62 |s Street|\\..Camb|
|000005f0| 72 69 64 67 65 2c 20 4d | 41 5c 5c 0d 0a 36 31 37 |ridge, M|A\\..617|
|00000600| 2d 32 32 35 2d 36 33 30 | 33 0d 0a 7d 0d 0a 0d 0a |-225-630|3..}....|
|00000610| 5c 64 61 74 65 7b 43 72 | 65 61 74 65 64 3a 20 33 |\date{Cr|eated: 3|
|00000620| 2f 32 34 2f 38 38 20 5c | 5c 20 52 65 6c 65 61 73 |/24/88 \|\ Releas|
|00000630| 65 3a 20 30 2e 37 20 5c | 5c 20 56 65 72 73 69 6f |e: 0.7 \|\ Versio|
|00000640| 6e 3a 20 34 2f 31 2f 38 | 38 7d 0d 0a 0d 0a 5c 62 |n: 4/1/8|8}....\b|
|00000650| 65 67 69 6e 7b 64 6f 63 | 75 6d 65 6e 74 7d 0d 0a |egin{doc|ument}..|
|00000660| 5c 6d 61 6b 65 74 69 74 | 6c 65 0d 0a 5c 62 65 67 |\maketit|le..\beg|
|00000670| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0a 0d 0a |in{verba|tim}....|
|00000680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006a0| 2d 4f 20 20 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |-O .. | |
|000006b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006c0| 20 20 20 4f 20 20 20 20 | 20 20 4f 0d 0a 20 20 20 | O | O.. |
|000006d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 4f 2d 20 20 | | O- |
|000006f0| 20 20 20 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 | .. | |
|00000700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000710| 4f 20 20 20 20 5f 20 20 | 20 20 7c 20 20 0d 0a 20 |O _ | | .. |
|00000720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000730| 20 20 20 20 20 20 20 20 | 20 20 7c 20 20 20 2f 20 | | | / |
|00000740| 5c 20 20 20 4f 0d 0a 20 | 20 20 20 20 20 20 20 20 |\ O.. | |
|00000750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000760| 20 20 20 20 20 3c 5e 5f | 5e 3e 20 20 20 20 20 0d | <^_|^> .|
|00000770| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000780| 20 20 20 20 20 20 20 20 | 20 20 20 20 58 20 20 20 | | X |
|00000790| 5c 5f 2f 20 20 20 58 0d | 0a 20 20 20 20 20 20 20 |\_/ X.|. |
|000007a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000007b0| 20 20 20 20 20 5c 20 20 | 20 55 20 20 20 2f 0d 0a | \ | U /..|
|000007c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000007d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 2d 2d | | \--|
|000007e0| 2d 2d 2d 2f 20 20 20 20 | 0d 0a 20 20 20 20 20 20 |---/ |.. |
|000007f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000800| 20 20 20 20 20 20 20 20 | 20 20 55 0d 0a 20 20 20 | | U.. |
|00000810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 55 0d 0a | | U..|
|00000830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000850| 5e 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |^.. | |
|00000860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000870| 20 2f 20 20 20 5c 0d 0a | 20 20 20 20 20 20 20 20 | / \..| |
|00000880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000890| 20 20 20 20 5f 2f 20 74 | 68 65 20 5c 5f 0d 0a 20 | _/ t|he \_.. |
|000008a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 61 69 6c | | mail|
|000008c0| 62 6f 78 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |box.. | |
|000008d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008e0| 6d 75 6c 74 69 74 61 73 | 6b 65 72 0d 0a 0d 0a 5c |multitas|ker....\|
|000008f0| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 0a 0d |end{verb|atim}...|
|00000900| 0a 5c 6e 65 77 70 61 67 | 65 0d 0a 5c 74 61 62 6c |.\newpag|e..\tabl|
|00000910| 65 6f 66 63 6f 6e 74 65 | 6e 74 73 0d 0a 0d 0a 5c |eofconte|nts....\|
|00000920| 73 65 63 74 69 6f 6e 7b | 47 6f 61 6c 73 20 6f 66 |section{|Goals of|
|00000930| 20 74 68 69 73 20 41 72 | 74 69 63 6c 65 7d 0d 0a | this Ar|ticle}..|
|00000940| 0d 0a 7b 5c 62 66 20 4d | 75 6c 74 69 74 61 73 6b |..{\bf M|ultitask|
|00000950| 69 6e 67 7d 2c 20 74 68 | 65 20 61 62 69 6c 69 74 |ing}, th|e abilit|
|00000960| 79 20 74 6f 20 65 78 65 | 63 75 74 65 20 6d 6f 72 |y to exe|cute mor|
|00000970| 65 20 74 68 61 6e 20 6f | 6e 65 20 74 61 73 6b 20 |e than o|ne task |
|00000980| 61 74 20 6f 6e 63 65 2c | 20 69 73 0d 0a 62 65 63 |at once,| is..bec|
|00000990| 6f 6d 69 6e 67 20 69 6e | 63 72 65 61 73 69 6e 67 |oming in|creasing|
|000009a0| 6c 79 20 69 6d 70 6f 72 | 74 61 6e 74 20 69 6e 20 |ly impor|tant in |
|000009b0| 74 68 65 20 73 6d 61 6c | 6c 2d 73 79 73 74 65 6d |the smal|l-system|
|000009c0| 20 77 6f 72 6c 64 2e 0d | 0a 0d 0a 41 20 66 6f 72 | world..|...A for|
|000009d0| 6d 20 6f 66 20 7b 5c 62 | 66 20 74 69 6d 65 20 73 |m of {\b|f time s|
|000009e0| 68 61 72 69 6e 67 7d 2c | 20 6d 75 6c 74 69 74 61 |haring},| multita|
|000009f0| 73 6b 69 6e 67 20 77 61 | 73 20 6f 72 69 67 69 6e |sking wa|s origin|
|00000a00| 61 6c 6c 79 20 69 6e 76 | 65 6e 74 65 64 20 69 6e |ally inv|ented in|
|00000a10| 0d 0a 74 68 65 20 64 61 | 79 73 20 6f 66 20 70 75 |..the da|ys of pu|
|00000a20| 6e 63 68 65 64 20 63 61 | 72 64 73 2c 20 77 68 65 |nched ca|rds, whe|
|00000a30| 6e 20 61 20 63 6f 6d 70 | 75 74 65 72 20 77 61 73 |n a comp|uter was|
|00000a40| 20 73 6f 20 65 78 70 65 | 6e 73 69 76 65 20 74 68 | so expe|nsive th|
|00000a50| 61 74 20 69 74 0d 0a 77 | 61 73 20 69 6d 70 6f 72 |at it..w|as impor|
|00000a60| 74 61 6e 74 20 74 6f 20 | 73 68 61 72 65 20 69 74 |tant to |share it|
|00000a70| 20 65 66 66 69 63 69 65 | 6e 74 6c 79 20 62 65 74 | efficie|ntly bet|
|00000a80| 77 65 65 6e 20 6d 61 6e | 79 20 75 73 65 72 73 2e |ween man|y users.|
|00000a90| 0d 0a 4d 75 6c 74 69 74 | 61 73 6b 69 6e 67 20 61 |..Multit|asking a|
|00000aa0| 73 20 61 20 70 75 72 73 | 75 69 74 20 6f 66 20 72 |s a purs|uit of r|
|00000ab0| 65 73 6f 75 72 63 65 20 | 65 66 66 69 63 69 65 6e |esource |efficien|
|00000ac0| 63 79 20 68 61 73 20 61 | 63 74 75 61 6c 6c 79 20 |cy has a|ctually |
|00000ad0| 6c 65 64 20 74 6f 0d 0a | 6e 65 77 20 75 73 65 73 |led to..|new uses|
|00000ae0| 20 66 6f 72 20 63 6f 6d | 70 75 74 65 72 73 20 28 | for com|puters (|
|00000af0| 61 73 20 45 2d 6d 61 69 | 6c 29 2c 20 6e 65 77 20 |as E-mai|l), new |
|00000b00| 61 70 70 72 6f 61 63 68 | 65 73 20 74 6f 20 74 68 |approach|es to th|
|00000b10| 65 6d 20 28 61 73 0d 0a | 69 6e 74 65 72 61 63 74 |em (as..|interact|
|00000b20| 69 76 65 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 29 |ive prog|ramming)|
|00000b30| 2c 20 61 6e 64 20 6e 65 | 77 20 69 64 65 61 73 20 |, and ne|w ideas |
|00000b40| 6f 66 20 74 68 65 69 72 | 20 6f 70 65 72 61 74 69 |of their| operati|
|00000b50| 6f 6e 0d 0a 28 64 69 73 | 74 72 69 62 75 74 65 64 |on..(dis|tributed|
|00000b60| 20 70 72 6f 63 65 73 73 | 69 6e 67 29 2e 0d 0a 0d | process|ing)....|
|00000b70| 0a 54 6f 64 61 79 2c 20 | 70 65 72 73 6f 6e 61 6c |.Today, |personal|
|00000b80| 20 63 6f 6d 70 75 74 65 | 72 73 20 64 6f 6d 69 6e | compute|rs domin|
|00000b90| 61 74 65 20 74 68 65 20 | 6c 61 6e 64 73 63 61 70 |ate the |landscap|
|00000ba0| 65 2e 20 20 54 68 65 79 | 20 61 6c 6c 6f 77 20 6d |e. They| allow m|
|00000bb0| 69 6c 6c 69 6f 6e 73 0d | 0a 6f 66 20 70 65 6f 70 |illions.|.of peop|
|00000bc0| 6c 65 20 74 6f 20 68 61 | 76 65 20 74 68 65 69 72 |le to ha|ve their|
|00000bd0| 20 6f 77 6e 20 63 6f 6d | 70 75 74 65 72 20 61 74 | own com|puter at|
|00000be0| 20 74 68 65 69 72 20 66 | 69 6e 67 65 72 74 69 70 | their f|ingertip|
|00000bf0| 73 2e 0d 0a 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |s...Unfo|rtunatel|
|00000c00| 79 2c 20 6d 61 6e 79 20 | 6f 66 20 74 68 65 20 67 |y, many |of the g|
|00000c10| 72 65 61 74 20 6d 61 69 | 6e 66 72 61 6d 65 20 63 |reat mai|nframe c|
|00000c20| 6f 6e 63 65 70 74 73 20 | 66 6f 72 20 72 65 73 6f |oncepts |for reso|
|00000c30| 75 72 63 65 0d 0a 6d 61 | 6e 61 67 65 6d 65 6e 74 |urce..ma|nagement|
|00000c40| 20 68 61 76 65 20 62 65 | 65 6e 20 6c 6f 73 74 20 | have be|en lost |
|00000c50| 69 6e 20 74 68 69 73 20 | 70 6f 70 75 6c 61 72 69 |in this |populari|
|00000c60| 7a 61 74 69 6f 6e 20 6f | 66 20 63 6f 6d 70 75 74 |zation o|f comput|
|00000c70| 65 72 73 2e 20 20 42 75 | 74 2c 0d 0a 61 73 20 70 |ers. Bu|t,..as p|
|00000c80| 65 72 73 6f 6e 61 6c 20 | 63 6f 6d 70 75 74 65 72 |ersonal |computer|
|00000c90| 73 20 62 65 63 6f 6d 65 | 20 6d 6f 72 65 20 70 6f |s become| more po|
|00000ca0| 77 65 72 66 75 6c 20 61 | 6e 64 20 74 68 65 69 72 |werful a|nd their|
|00000cb0| 20 75 73 65 72 73 20 77 | 61 6e 74 20 74 6f 20 64 | users w|ant to d|
|00000cc0| 6f 0d 0a 6d 6f 72 65 20 | 77 69 74 68 20 74 68 65 |o..more |with the|
|00000cd0| 6d 2c 20 74 68 65 20 63 | 6f 6e 63 65 70 74 73 20 |m, the c|oncepts |
|00000ce0| 61 72 65 20 62 65 69 6e | 67 20 72 65 64 69 73 63 |are bein|g redisc|
|00000cf0| 6f 76 65 72 65 64 2e 0d | 0a 0d 0a 54 68 65 20 6d |overed..|...The m|
|00000d00| 6f 73 74 20 6e 6f 74 61 | 62 6c 65 20 72 65 64 69 |ost nota|ble redi|
|00000d10| 73 63 6f 76 65 72 79 20 | 6f 6e 20 74 6f 64 61 79 |scovery |on today|
|00000d20| 27 73 20 50 43 20 73 63 | 65 6e 65 20 69 73 20 6d |'s PC sc|ene is m|
|00000d30| 75 6c 74 69 74 61 73 6b | 69 6e 67 2e 20 20 54 68 |ultitask|ing. Th|
|00000d40| 65 0d 0a 54 65 72 6d 69 | 6e 61 74 65 2d 62 75 74 |e..Termi|nate-but|
|00000d50| 2d 53 74 61 79 2d 52 65 | 73 69 64 65 6e 74 20 28 |-Stay-Re|sident (|
|00000d60| 54 53 52 29 20 75 74 69 | 6c 69 74 69 65 73 20 66 |TSR) uti|lities f|
|00000d70| 6f 75 6e 64 20 6f 6e 20 | 74 68 65 20 49 42 4d 20 |ound on |the IBM |
|00000d80| 50 43 20 61 6e 64 0d 0a | 74 68 65 20 44 65 73 6b |PC and..|the Desk|
|00000d90| 20 41 63 63 65 73 73 6f | 72 69 65 73 20 66 6f 75 | Accesso|ries fou|
|00000da0| 6e 64 20 6f 6e 20 74 68 | 65 20 4d 61 63 69 6e 74 |nd on th|e Macint|
|00000db0| 6f 73 68 20 70 6f 69 6e | 74 20 74 6f 20 74 68 65 |osh poin|t to the|
|00000dc0| 20 6e 65 65 64 20 66 6f | 72 0d 0a 6d 75 6c 74 69 | need fo|r..multi|
|00000dd0| 74 61 73 6b 69 6e 67 2e | 20 20 48 6f 77 65 76 65 |tasking.| Howeve|
|00000de0| 72 2c 20 74 68 65 73 65 | 20 61 72 65 20 60 60 68 |r, these| are ``h|
|00000df0| 61 63 6b 65 64 27 27 20 | 73 6f 6c 75 74 69 6f 6e |acked'' |solution|
|00000e00| 73 3b 20 74 68 65 20 70 | 65 72 73 6f 6e 61 6c 0d |s; the p|ersonal.|
|00000e10| 0a 63 6f 6d 70 75 74 65 | 72 20 69 6e 64 75 73 74 |.compute|r indust|
|00000e20| 72 79 2c 20 69 6e 20 69 | 74 73 20 79 6f 75 74 68 |ry, in i|ts youth|
|00000e30| 2c 20 6c 61 63 6b 73 20 | 75 6e 64 65 72 73 74 61 |, lacks |understa|
|00000e40| 6e 64 69 6e 67 20 6f 66 | 20 6d 75 6c 74 69 74 61 |nding of| multita|
|00000e50| 73 6b 69 6e 67 0d 0a 69 | 73 73 75 65 73 2e 0d 0a |sking..i|ssues...|
|00000e60| 0d 0a 4f 6e 6c 79 20 72 | 65 63 65 6e 74 6c 79 20 |..Only r|ecently |
|00000e70| 68 61 76 65 20 73 6f 66 | 74 77 61 72 65 20 61 6e |have sof|tware an|
|00000e80| 64 20 63 6f 6d 70 75 74 | 65 72 20 6d 61 6e 75 66 |d comput|er manuf|
|00000e90| 61 63 74 75 72 65 72 73 | 20 73 74 61 72 74 65 64 |acturers| started|
|00000ea0| 20 74 6f 0d 0a 63 72 65 | 61 74 65 20 6d 75 6c 74 | to..cre|ate mult|
|00000eb0| 69 74 61 73 6b 69 6e 67 | 20 65 6e 76 69 72 6f 6e |itasking| environ|
|00000ec0| 6d 65 6e 74 73 20 66 6f | 72 20 74 68 65 69 72 20 |ments fo|r their |
|00000ed0| 75 73 65 72 73 20 28 61 | 73 20 41 70 70 6c 65 27 |users (a|s Apple'|
|00000ee0| 73 0d 0a 4d 75 6c 74 69 | 66 69 6e 64 65 72 20 6f |s..Multi|finder o|
|00000ef0| 72 2c 20 6d 6f 72 65 20 | 6e 6f 74 61 62 6c 79 2c |r, more |notably,|
|00000f00| 20 4d 69 63 72 6f 73 6f | 66 74 27 73 20 4f 53 2f | Microso|ft's OS/|
|00000f10| 32 29 2e 20 20 42 75 74 | 20 75 6e 66 6f 72 74 75 |2). But| unfortu|
|00000f20| 6e 61 74 65 6c 79 0d 0a | 66 6f 72 20 74 68 65 20 |nately..|for the |
|00000f30| 75 73 65 72 20 61 6e 64 | 20 73 6f 66 74 77 61 72 |user and| softwar|
|00000f40| 65 20 64 65 76 65 6c 6f | 70 65 72 2c 20 74 68 65 |e develo|per, the|
|00000f50| 73 65 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 73 20 |se envir|onments |
|00000f60| 61 72 65 20 73 74 69 6c | 6c 0d 0a 68 69 67 68 6c |are stil|l..highl|
|00000f70| 79 20 6d 61 63 68 69 6e | 65 20 61 6e 64 20 6f 70 |y machin|e and op|
|00000f80| 65 72 61 74 69 6e 67 20 | 73 79 73 74 65 6d 20 64 |erating |system d|
|00000f90| 65 70 65 6e 64 65 6e 74 | 2e 5c 66 6f 6f 74 6e 6f |ependent|.\footno|
|00000fa0| 74 65 7b 54 68 6f 75 67 | 68 20 74 68 65 0d 0a 70 |te{Thoug|h the..p|
|00000fb0| 6f 70 75 6c 61 72 20 55 | 4e 49 58 20 65 6e 76 69 |opular U|NIX envi|
|00000fc0| 72 6f 6e 6d 65 6e 74 20 | 69 73 20 66 61 69 72 6c |ronment |is fairl|
|00000fd0| 79 20 70 6f 72 74 61 62 | 6c 65 20 62 65 74 77 65 |y portab|le betwe|
|00000fe0| 65 6e 20 77 6f 72 6b 73 | 74 61 74 69 6f 6e 20 61 |en works|tation a|
|00000ff0| 6e 64 0d 0a 6d 61 69 6e | 66 72 61 6d 65 20 6d 61 |nd..main|frame ma|
|00001000| 63 68 69 6e 65 73 2c 20 | 69 74 20 6f 6e 6c 79 20 |chines, |it only |
|00001010| 70 72 6f 76 69 64 65 73 | 20 6d 75 6c 74 69 70 72 |provides| multipr|
|00001020| 6f 63 65 73 73 69 6e 67 | 2c 20 6e 6f 74 20 6d 75 |ocessing|, not mu|
|00001030| 6c 74 69 74 61 73 6b 69 | 6e 67 0d 0a 28 6f 72 20 |ltitaski|ng..(or |
|00001040| 6d 75 6c 74 69 70 6c 65 | 20 74 68 72 65 61 64 73 |multiple| threads|
|00001050| 20 77 69 74 68 69 6e 20 | 61 20 70 72 6f 63 65 73 | within |a proces|
|00001060| 73 29 20 77 68 69 63 68 | 20 73 68 61 72 65 20 6d |s) which| share m|
|00001070| 65 6d 6f 72 79 7d 2e 0d | 0a 0d 0a 54 68 69 73 20 |emory}..|...This |
|00001080| 61 72 74 69 63 6c 65 20 | 61 69 6d 73 20 74 6f 20 |article |aims to |
|00001090| 68 65 6c 70 20 79 6f 75 | 20 65 78 70 6c 6f 72 65 |help you| explore|
|000010a0| 20 61 6e 64 20 61 70 70 | 72 65 63 69 61 74 65 20 | and app|reciate |
|000010b0| 6d 75 6c 74 69 74 61 73 | 6b 69 6e 67 3b 20 69 74 |multitas|king; it|
|000010c0| 0d 0a 61 6c 73 6f 20 61 | 69 6d 73 20 73 68 6f 77 |..also a|ims show|
|000010d0| 20 79 6f 75 20 68 6f 77 | 20 74 6f 20 75 73 65 20 | you how| to use |
|000010e0| 6d 75 6c 74 69 74 61 73 | 6b 69 6e 67 20 74 6f 20 |multitas|king to |
|000010f0| 65 6e 68 61 6e 63 65 20 | 79 6f 75 72 20 70 72 6f |enhance |your pro|
|00001100| 67 72 61 6d 73 2c 0d 0a | 61 6e 64 20 74 6f 20 6b |grams,..|and to k|
|00001110| 6e 6f 77 20 69 74 73 20 | 6c 69 6d 69 74 61 74 69 |now its |limitati|
|00001120| 6f 6e 73 2e 20 20 4d 75 | 6c 74 69 74 61 73 6b 69 |ons. Mu|ltitaski|
|00001130| 6e 67 20 68 61 73 20 6d | 75 63 68 20 74 6f 20 6f |ng has m|uch to o|
|00001140| 66 66 65 72 20 74 6f 20 | 74 68 65 0d 0a 65 66 66 |ffer to |the..eff|
|00001150| 69 63 65 6e 63 79 2c 20 | 66 75 6e 63 74 69 6f 6e |icency, |function|
|00001160| 61 6c 69 74 79 2c 20 61 | 6e 64 20 6d 6f 64 75 6c |ality, a|nd modul|
|00001170| 61 72 69 74 79 20 6f 66 | 20 79 6f 75 72 20 70 72 |arity of| your pr|
|00001180| 6f 67 72 61 6d 73 2c 20 | 62 75 74 20 69 74 20 69 |ograms, |but it i|
|00001190| 73 20 61 0d 0a 74 72 61 | 64 65 6f 66 66 20 6f 66 |s a..tra|deoff of|
|000011a0| 20 70 6f 77 65 72 20 66 | 6f 72 20 63 6f 6d 70 6c | power f|or compl|
|000011b0| 65 78 69 74 79 2e 0d 0a | 0d 0a 54 68 69 73 20 61 |exity...|..This a|
|000011c0| 72 74 69 63 6c 65 20 69 | 73 20 69 6e 20 74 77 6f |rticle i|s in two|
|000011d0| 20 6d 61 69 6e 20 73 65 | 63 74 69 6f 6e 73 2e 20 | main se|ctions. |
|000011e0| 20 54 68 65 20 66 69 72 | 73 74 20 73 65 63 74 69 | The fir|st secti|
|000011f0| 6f 6e 2c 20 7b 5c 65 6d | 20 54 68 65 0d 0a 44 69 |on, {\em| The..Di|
|00001200| 6d 65 6e 73 69 6f 6e 73 | 20 6f 66 20 43 6f 6e 63 |mensions| of Conc|
|00001210| 75 72 72 65 6e 74 20 50 | 72 6f 63 65 73 73 69 6e |urrent P|rocessin|
|00001220| 67 7d 2c 20 61 64 64 72 | 65 73 73 65 73 20 74 68 |g}, addr|esses th|
|00001230| 65 20 69 73 73 75 65 20 | 6f 66 0d 0a 6d 75 6c 74 |e issue |of..mult|
|00001240| 69 74 61 73 6b 69 6e 67 | 20 75 6e 64 65 72 73 74 |itasking| underst|
|00001250| 61 6e 64 69 6e 67 3b 20 | 69 74 20 69 73 20 61 20 |anding; |it is a |
|00001260| 62 72 69 65 66 20 74 75 | 74 6f 72 69 61 6c 20 6f |brief tu|torial o|
|00001270| 66 20 74 68 65 20 63 6f | 6e 63 65 70 74 73 20 61 |f the co|ncepts a|
|00001280| 6e 64 0d 0a 69 73 73 75 | 65 73 20 69 6e 76 6f 6c |nd..issu|es invol|
|00001290| 76 65 64 20 69 6e 20 6d | 75 6c 74 69 74 61 73 6b |ved in m|ultitask|
|000012a0| 69 6e 67 2c 20 6f 72 20 | 6d 6f 72 65 20 67 65 6e |ing, or |more gen|
|000012b0| 65 72 61 6c 6c 79 2c 20 | 63 6f 6e 63 75 72 72 65 |erally, |concurre|
|000012c0| 6e 74 0d 0a 70 72 6f 63 | 65 73 73 69 6e 67 2e 20 |nt..proc|essing. |
|000012d0| 20 54 68 65 20 73 65 63 | 6f 6e 64 20 73 65 63 74 | The sec|ond sect|
|000012e0| 69 6f 6e 2c 20 7b 5c 65 | 6d 20 54 68 65 20 4d 61 |ion, {\e|m The Ma|
|000012f0| 69 6c 62 6f 78 20 4d 75 | 6c 74 69 74 61 73 6b 65 |ilbox Mu|ltitaske|
|00001300| 72 7d 2c 0d 0a 61 64 64 | 72 65 73 73 65 73 20 74 |r},..add|resses t|
|00001310| 68 65 20 69 73 73 75 65 | 20 6f 66 20 6d 75 6c 74 |he issue| of mult|
|00001320| 69 74 61 73 6b 69 6e 67 | 20 70 6f 72 74 61 62 69 |itasking| portabi|
|00001330| 6c 69 74 79 3b 20 69 74 | 20 70 72 65 73 65 6e 74 |lity; it| present|
|00001340| 73 20 61 0d 0a 67 65 6e | 65 72 61 6c 2d 70 75 72 |s a..gen|eral-pur|
|00001350| 70 6f 73 65 20 6d 75 6c | 74 69 74 61 73 6b 65 72 |pose mul|titasker|
|00001360| 2c 20 77 72 69 74 74 65 | 6e 20 69 6e 20 60 43 27 |, writte|n in `C'|
|00001370| 2c 20 77 68 69 63 68 20 | 69 73 20 70 6f 72 74 61 |, which |is porta|
|00001380| 62 6c 65 20 74 6f 20 6d | 6f 73 74 0d 0a 73 74 61 |ble to m|ost..sta|
|00001390| 63 6b 2d 62 61 73 65 64 | 20 6d 61 63 68 69 6e 65 |ck-based| machine|
|000013a0| 73 20 61 6e 64 20 65 76 | 65 6e 20 6d 61 6e 79 20 |s and ev|en many |
|000013b0| 73 74 61 63 6b 2d 62 61 | 73 65 64 20 6c 61 6e 67 |stack-ba|sed lang|
|000013c0| 75 61 67 65 73 2e 20 20 | 42 79 0d 0a 69 6e 63 6c |uages. |By..incl|
|000013d0| 75 64 69 6e 67 20 74 68 | 69 73 20 6d 75 6c 74 69 |uding th|is multi|
|000013e0| 74 61 73 6b 65 72 20 69 | 6e 20 79 6f 75 72 20 70 |tasker i|n your p|
|000013f0| 72 6f 67 72 61 6d 73 2c | 20 79 6f 75 20 77 69 6c |rograms,| you wil|
|00001400| 6c 20 6e 6f 74 20 6f 6e | 6c 79 20 67 69 76 65 0d |l not on|ly give.|
|00001410| 0a 74 68 65 6d 20 74 68 | 65 20 65 66 66 69 63 69 |.them th|e effici|
|00001420| 65 6e 63 79 2c 20 70 6f | 77 65 72 2c 20 61 6e 64 |ency, po|wer, and|
|00001430| 20 63 6f 6e 63 65 70 74 | 75 61 6c 20 73 69 6d 70 | concept|ual simp|
|00001440| 6c 69 63 69 74 79 20 6f | 66 20 61 0d 0a 6d 75 6c |licity o|f a..mul|
|00001450| 74 69 74 61 73 6b 69 6e | 67 20 65 6e 76 69 72 6f |titaskin|g enviro|
|00001460| 6e 6d 65 6e 74 2c 20 62 | 75 74 20 77 69 6c 6c 20 |nment, b|ut will |
|00001470| 62 65 20 61 62 6c 65 20 | 74 6f 20 65 61 73 69 6c |be able |to easil|
|00001480| 79 20 70 6f 72 74 20 74 | 68 65 6d 20 74 6f 20 6e |y port t|hem to n|
|00001490| 65 77 0d 0a 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 |ew..envi|ronments|
|000014a0| 2e 0d 0a 0d 0a 5c 73 65 | 63 74 69 6f 6e 7b 54 68 |.....\se|ction{Th|
|000014b0| 65 20 44 69 6d 65 6e 73 | 69 6f 6e 73 20 6f 66 20 |e Dimens|ions of |
|000014c0| 43 6f 6e 63 75 72 72 65 | 6e 74 20 50 72 6f 63 65 |Concurre|nt Proce|
|000014d0| 73 73 69 6e 67 7d 0d 0a | 0d 0a 5c 73 75 62 73 65 |ssing}..|..\subse|
|000014e0| 63 74 69 6f 6e 7b 57 68 | 79 20 50 72 6f 63 65 73 |ction{Wh|y Proces|
|000014f0| 73 20 43 6f 6e 63 75 72 | 72 65 6e 74 6c 79 3f 7d |s Concur|rently?}|
|00001500| 0d 0a 0d 0a 4d 75 6c 74 | 69 74 61 73 6b 69 6e 67 |....Mult|itasking|
|00001510| 20 69 73 20 61 63 74 75 | 61 6c 6c 79 20 61 20 66 | is actu|ally a f|
|00001520| 6f 72 6d 20 6f 66 20 7b | 5c 62 66 20 43 6f 6e 63 |orm of {|\bf Conc|
|00001530| 75 72 72 65 6e 74 20 50 | 72 6f 63 65 73 73 69 6e |urrent P|rocessin|
|00001540| 67 7d 2e 0d 0a 4e 6f 72 | 6d 61 6c 6c 79 20 77 68 |g}...Nor|mally wh|
|00001550| 65 6e 20 77 65 20 77 72 | 69 74 65 20 70 72 6f 67 |en we wr|ite prog|
|00001560| 72 61 6d 73 2c 20 77 65 | 20 73 70 65 63 69 66 79 |rams, we| specify|
|00001570| 20 74 68 65 20 65 78 61 | 63 74 20 6f 72 64 65 72 | the exa|ct order|
|00001580| 20 6f 66 0d 0a 65 76 65 | 72 79 74 68 69 6e 67 20 | of..eve|rything |
|00001590| 74 68 65 20 63 6f 6d 70 | 75 74 65 72 20 64 6f 65 |the comp|uter doe|
|000015a0| 73 2e 20 20 4f 66 74 65 | 6e 2c 20 68 6f 77 65 76 |s. Ofte|n, howev|
|000015b0| 65 72 2c 20 74 68 65 20 | 6f 72 64 65 72 20 69 73 |er, the |order is|
|000015c0| 20 6e 6f 74 0d 0a 69 6d | 70 6f 72 74 61 6e 74 20 | not..im|portant |
|000015d0| 61 6e 64 2c 20 69 6e 64 | 65 65 64 2c 20 69 72 72 |and, ind|eed, irr|
|000015e0| 65 6c 65 76 61 6e 74 2e | 20 20 54 68 69 73 20 65 |elevant.| This e|
|000015f0| 73 70 65 63 69 61 6c 6c | 79 20 74 72 75 65 20 62 |speciall|y true b|
|00001600| 65 74 77 65 65 6e 0d 0a | 73 65 70 61 72 61 74 65 |etween..|separate|
|00001610| 20 6d 6f 64 75 6c 65 73 | 20 77 68 69 63 68 20 64 | modules| which d|
|00001620| 6f 20 69 73 6f 6c 61 74 | 65 64 20 74 61 73 6b 73 |o isolat|ed tasks|
|00001630| 2e 20 20 43 6f 6e 63 75 | 72 72 65 6e 74 20 50 72 |. Concu|rrent Pr|
|00001640| 6f 63 65 73 73 69 6e 67 | 2c 20 74 68 65 6e 2c 0d |ocessing|, then,.|
|00001650| 0a 61 6c 6c 6f 77 73 20 | 74 68 65 20 63 6f 6d 70 |.allows |the comp|
|00001660| 75 74 65 72 20 74 6f 20 | 63 68 6f 73 65 20 74 68 |uter to |chose th|
|00001670| 69 73 20 6f 72 64 65 72 | 20 66 6f 72 20 75 73 3b |is order| for us;|
|00001680| 20 20 69 74 20 72 65 6c | 69 65 76 65 73 20 75 73 | it rel|ieves us|
|00001690| 20 6f 66 0d 0a 68 61 76 | 69 6e 67 20 74 6f 20 73 | of..hav|ing to s|
|000016a0| 70 65 63 69 66 79 20 74 | 68 69 73 20 6f 72 64 65 |pecify t|his orde|
|000016b0| 72 20 61 6e 64 20 61 6c | 6c 6f 77 73 20 74 68 65 |r and al|lows the|
|000016c0| 20 63 6f 6d 70 75 74 65 | 72 20 74 6f 20 6f 70 74 | compute|r to opt|
|000016d0| 69 6d 69 7a 65 0d 0a 69 | 74 73 20 70 72 6f 63 65 |imize..i|ts proce|
|000016e0| 73 73 69 6e 67 20 61 63 | 63 6f 72 64 69 6e 67 20 |ssing ac|cording |
|000016f0| 74 6f 20 74 68 65 20 70 | 61 72 74 69 63 75 6c 61 |to the p|articula|
|00001700| 72 20 65 6e 76 69 6f 72 | 6e 6d 65 6e 74 2e 0d 0a |r envior|nment...|
|00001710| 0d 0a 5c 62 65 67 69 6e | 7b 64 65 73 63 72 69 70 |..\begin|{descrip|
|00001720| 74 69 6f 6e 7d 0d 0a 0d | 0a 09 5c 69 74 65 6d 5b |tion}...|..\item[|
|00001730| 43 6f 6d 70 75 74 65 72 | 20 43 68 6f 6f 73 65 73 |Computer| Chooses|
|00001740| 20 74 68 65 20 4f 72 64 | 65 72 2e 2e 2e 5d 20 20 | the Ord|er...] |
|00001750| 43 6f 6e 63 75 72 72 65 | 6e 74 20 70 72 6f 63 65 |Concurre|nt proce|
|00001760| 73 73 69 6e 67 0d 0a 61 | 6c 6c 6f 77 73 20 75 73 |ssing..a|llows us|
|00001770| 20 74 6f 20 73 68 61 72 | 65 20 61 6e 64 20 65 66 | to shar|e and ef|
|00001780| 66 69 63 69 65 6e 74 6c | 79 20 6d 61 6e 61 67 65 |ficientl|y manage|
|00001790| 20 72 65 73 6f 75 72 63 | 65 73 20 28 7b 5c 62 66 | resourc|es ({\bf|
|000017a0| 20 6d 75 6c 74 69 70 6c | 65 78 69 6e 67 0d 0a 61 | multipl|exing..a|
|000017b0| 20 72 65 73 6f 75 72 63 | 65 7d 29 2e 20 20 46 6f | resourc|e}). Fo|
|000017c0| 72 20 65 78 61 6d 70 6c | 65 2c 20 69 66 20 61 20 |r exampl|e, if a |
|000017d0| 74 61 73 6b 20 77 61 6e | 74 73 20 74 6f 20 70 72 |task wan|ts to pr|
|000017e0| 69 6e 74 20 61 20 66 69 | 6c 65 20 61 6e 64 0d 0a |int a fi|le and..|
|000017f0| 61 6e 6f 74 68 65 72 20 | 66 69 6c 65 20 69 73 20 |another |file is |
|00001800| 70 72 69 6e 74 69 6e 67 | 2c 20 74 68 65 20 70 72 |printing|, the pr|
|00001810| 69 6e 74 20 6d 61 6e 61 | 67 65 72 20 69 6e 73 75 |int mana|ger insu|
|00001820| 72 65 73 20 74 68 65 79 | 20 64 6f 6e 27 74 20 70 |res they| don't p|
|00001830| 72 69 6e 74 0d 0a 61 74 | 20 74 68 65 20 73 61 6d |rint..at| the sam|
|00001840| 65 20 74 69 6d 65 20 28 | 63 6f 6e 74 72 6f 6c 6c |e time (|controll|
|00001850| 65 64 20 73 68 61 72 69 | 6e 67 29 3b 20 73 69 6e |ed shari|ng); sin|
|00001860| 63 65 20 74 68 65 20 66 | 69 72 73 74 20 74 61 73 |ce the f|irst tas|
|00001870| 6b 20 6d 75 73 74 20 77 | 61 69 74 2c 0d 0a 74 68 |k must w|ait,..th|
|00001880| 65 20 73 63 68 65 64 75 | 6c 65 72 20 72 65 75 73 |e schedu|ler reus|
|00001890| 65 73 20 74 68 65 20 74 | 61 73 6b 27 73 20 70 72 |es the t|ask's pr|
|000018a0| 6f 63 65 73 73 6f 72 20 | 74 6f 20 72 75 6e 20 61 |ocessor |to run a|
|000018b0| 6e 6f 74 68 65 72 20 74 | 61 73 6b 0d 0a 28 65 66 |nother t|ask..(ef|
|000018c0| 66 69 63 69 65 6e 63 79 | 29 2e 0d 0a 0d 0a 09 5c |ficiency|)......\|
|000018d0| 69 74 65 6d 5b 2e 2e 2e | 53 6f 20 57 65 20 44 6f |item[...|So We Do|
|000018e0| 6e 27 74 20 48 61 76 65 | 20 54 6f 2e 5d 20 20 41 |n't Have| To.] A|
|000018f0| 6e 6f 74 68 65 72 20 75 | 6e 64 65 72 2d 61 70 70 |nother u|nder-app|
|00001900| 72 65 63 69 61 74 65 64 | 0d 0a 62 65 6e 65 66 69 |reciated|..benefi|
|00001910| 74 20 6f 66 20 63 6f 6e | 63 75 72 72 65 6e 74 20 |t of con|current |
|00001920| 70 72 6f 63 65 73 73 69 | 6e 67 20 69 73 20 74 68 |processi|ng is th|
|00001930| 65 20 70 6f 77 65 72 20 | 61 6e 64 20 63 6f 6e 63 |e power |and conc|
|00001940| 65 70 74 75 61 6c 0d 0a | 73 69 6d 70 6c 69 63 69 |eptual..|simplici|
|00001950| 74 79 20 69 74 20 62 72 | 69 6e 67 73 20 74 6f 20 |ty it br|ings to |
|00001960| 6f 75 72 20 70 72 6f 67 | 72 61 6d 73 2e 20 20 57 |our prog|rams. W|
|00001970| 65 20 63 61 6e 20 74 68 | 69 6e 6b 20 61 6e 64 20 |e can th|ink and |
|00001980| 72 65 61 73 6f 6e 20 61 | 62 6f 75 74 0d 0a 70 61 |reason a|bout..pa|
|00001990| 72 74 73 20 6f 66 20 61 | 20 70 72 6f 67 72 61 6d |rts of a| program|
|000019a0| 20 61 73 20 73 65 70 61 | 72 61 74 65 20 74 61 73 | as sepa|rate tas|
|000019b0| 6b 73 2c 20 6d 6f 64 75 | 6c 65 73 20 6f 66 20 64 |ks, modu|les of d|
|000019c0| 61 74 61 20 41 4e 44 20 | 63 6f 6e 74 72 6f 6c 2e |ata AND |control.|
|000019d0| 0d 0a 57 69 74 68 69 6e | 20 61 20 74 61 73 6b 20 |..Within| a task |
|000019e0| 6d 6f 64 75 6c 65 2c 20 | 69 6e 73 74 72 75 63 74 |module, |instruct|
|000019f0| 69 6f 6e 73 20 68 61 70 | 70 65 6e 20 73 65 71 75 |ions hap|pen sequ|
|00001a00| 65 6e 74 69 61 6c 6c 79 | 2c 20 61 72 65 20 73 74 |entially|, are st|
|00001a10| 72 6f 6e 67 6c 79 0d 0a | 73 79 6e 63 68 72 6f 6e |rongly..|synchron|
|00001a20| 69 7a 65 64 20 61 6e 64 | 20 73 74 72 6f 6e 67 6c |ized and| strongl|
|00001a30| 79 20 64 65 74 65 72 6d | 69 6e 65 64 2e 20 20 4f |y determ|ined. O|
|00001a40| 75 74 73 69 64 65 20 61 | 20 74 61 73 6b 2c 20 69 |utside a| task, i|
|00001a50| 6e 73 74 72 75 63 74 69 | 6f 6e 73 0d 0a 68 61 70 |nstructi|ons..hap|
|00001a60| 70 65 6e 20 69 6e 20 70 | 61 72 61 6c 6c 65 6c 2c |pen in p|arallel,|
|00001a70| 20 61 72 65 20 6c 6f 6f | 73 65 6c 79 20 73 79 6e | are loo|sely syn|
|00001a80| 63 68 72 6f 6e 69 7a 65 | 64 20 61 6e 64 20 6c 6f |chronize|d and lo|
|00001a90| 6f 73 65 6c 79 20 64 65 | 74 65 72 6d 69 6e 65 64 |osely de|termined|
|00001aa0| 2e 0d 0a 54 68 65 20 73 | 74 72 6f 6e 67 20 63 6f |...The s|trong co|
|00001ab0| 6e 74 72 6f 6c 20 61 6e | 64 20 64 61 74 61 20 6d |ntrol an|d data m|
|00001ac0| 6f 64 75 6c 61 72 69 7a | 61 74 69 6f 6e 20 63 6f |odulariz|ation co|
|00001ad0| 6e 63 75 72 72 65 6e 74 | 20 70 72 6f 63 65 73 73 |ncurrent| process|
|00001ae0| 69 6e 67 0d 0a 65 6e 63 | 6f 75 72 61 67 65 73 20 |ing..enc|ourages |
|00001af0| 61 6c 6c 6f 77 73 20 63 | 6f 6d 70 6c 65 78 20 70 |allows c|omplex p|
|00001b00| 72 6f 67 72 61 6d 73 20 | 74 6f 20 62 65 20 62 72 |rograms |to be br|
|00001b10| 6f 6b 65 6e 20 64 6f 77 | 6e 20 69 6e 74 6f 20 6d |oken dow|n into m|
|00001b20| 6f 64 65 6c 73 20 77 68 | 69 63 68 0d 0a 6d 6f 72 |odels wh|ich..mor|
|00001b30| 65 20 72 65 73 65 6d 62 | 6c 65 20 74 68 65 69 72 |e resemb|le their|
|00001b40| 20 72 65 61 6c 2d 77 6f | 72 6c 64 20 63 6f 75 6e | real-wo|rld coun|
|00001b50| 74 65 72 2d 70 61 72 74 | 73 2e 0d 0a 0d 0a 09 46 |ter-part|s......F|
|00001b60| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 61 20 66 75 |or examp|le, a fu|
|00001b70| 6c 6c 2d 73 63 72 65 65 | 6e 20 6f 6e 2d 6c 69 6e |ll-scree|n on-lin|
|00001b80| 65 20 74 65 78 74 20 65 | 64 69 74 6f 72 20 72 65 |e text e|ditor re|
|00001b90| 61 6c 6c 79 20 68 61 73 | 20 74 77 6f 20 74 61 73 |ally has| two tas|
|00001ba0| 6b 73 3a 0d 0a 74 6f 20 | 6d 6f 64 69 66 79 20 74 |ks:..to |modify t|
|00001bb0| 68 65 20 69 6e 74 65 72 | 6e 61 6c 20 64 61 74 61 |he inter|nal data|
|00001bc0| 20 73 74 72 75 63 74 75 | 72 65 73 20 61 63 63 6f | structu|res acco|
|00001bd0| 72 64 69 6e 67 20 74 6f | 20 74 68 65 20 6b 65 79 |rding to| the key|
|00001be0| 62 6f 61 72 64 0d 0a 69 | 6e 70 75 74 2c 20 61 6e |board..i|nput, an|
|00001bf0| 64 20 74 6f 20 64 69 73 | 70 6c 61 79 20 74 68 65 |d to dis|play the|
|00001c00| 20 69 6e 74 65 72 6e 61 | 6c 20 64 61 74 61 20 73 | interna|l data s|
|00001c10| 74 72 75 63 74 75 72 65 | 73 20 76 69 61 20 74 68 |tructure|s via th|
|00001c20| 65 20 73 63 72 65 65 6e | 0d 0a 6f 75 74 70 75 74 |e screen|..output|
|00001c30| 2e 20 20 54 68 65 20 66 | 69 72 73 74 20 74 61 73 |. The f|irst tas|
|00001c40| 6b 20 65 73 73 65 6e 74 | 69 61 6c 6c 79 20 77 61 |k essent|ially wa|
|00001c50| 69 74 73 20 66 6f 72 20 | 74 68 65 20 6b 65 79 62 |its for |the keyb|
|00001c60| 6f 61 72 64 2c 20 61 6e | 64 20 74 68 65 0d 0a 73 |oard, an|d the..s|
|00001c70| 65 63 6f 6e 64 20 77 61 | 69 74 73 20 66 6f 72 20 |econd wa|its for |
|00001c80| 74 68 65 20 73 63 72 65 | 65 6e 2e 20 20 57 69 74 |the scre|en. Wit|
|00001c90| 68 20 74 68 69 73 20 73 | 68 61 72 65 64 2d 6d 65 |h this s|hared-me|
|00001ca0| 6d 6f 72 79 20 6d 75 6c | 74 69 74 61 73 6b 69 6e |mory mul|titaskin|
|00001cb0| 67 0d 0a 6d 6f 64 65 6c | 2c 20 74 68 65 20 75 73 |g..model|, the us|
|00001cc0| 65 72 20 6e 65 76 65 72 | 20 68 61 73 20 74 6f 20 |er never| has to |
|00001cd0| 77 61 69 74 20 66 6f 72 | 20 74 68 65 20 64 69 73 |wait for| the dis|
|00001ce0| 70 6c 61 79 2e 20 20 4d | 6f 72 65 20 69 6d 70 6f |play. M|ore impo|
|00001cf0| 72 74 61 6e 74 6c 79 2c | 0d 0a 74 68 65 20 6d 6f |rtantly,|..the mo|
|00001d00| 64 65 6c 20 69 73 20 65 | 61 73 69 6c 79 20 65 78 |del is e|asily ex|
|00001d10| 74 65 6e 64 65 64 2e 20 | 20 46 6f 72 20 65 78 61 |tended. | For exa|
|00001d20| 6d 70 6c 65 2c 20 61 64 | 64 69 6e 67 20 6d 6f 72 |mple, ad|ding mor|
|00001d30| 65 20 64 69 73 70 6c 61 | 79 20 74 61 73 6b 73 0d |e displa|y tasks.|
|00001d40| 0a 63 61 6e 20 61 6c 6c | 6f 77 20 74 68 65 20 73 |.can all|ow the s|
|00001d50| 61 6d 65 20 64 61 74 61 | 20 74 6f 20 62 65 20 64 |ame data| to be d|
|00001d60| 69 73 70 6c 61 79 65 64 | 20 69 6e 20 64 69 66 66 |isplayed| in diff|
|00001d70| 65 72 65 6e 74 20 77 69 | 6e 64 6f 77 73 20 28 6f |erent wi|ndows (o|
|00001d80| 72 20 65 76 65 6e 0d 0a | 6f 6e 20 64 69 66 66 65 |r even..|on diffe|
|00001d90| 72 65 6e 74 20 73 63 72 | 65 65 6e 73 29 20 77 69 |rent scr|eens) wi|
|00001da0| 74 68 6f 75 74 20 77 6f | 72 72 79 20 6f 66 20 75 |thout wo|rry of u|
|00001db0| 70 64 61 74 69 6e 67 20 | 65 61 63 68 20 6f 66 20 |pdating |each of |
|00001dc0| 74 68 65 73 65 20 65 61 | 63 68 0d 0a 74 69 6d 65 |these ea|ch..time|
|00001dd0| 20 61 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 | a chara|cter is |
|00001de0| 70 72 65 73 73 65 64 2e | 20 20 4c 69 6b 65 77 69 |pressed.| Likewi|
|00001df0| 73 65 2c 20 77 69 74 68 | 20 73 6f 6d 65 20 61 64 |se, with| some ad|
|00001e00| 64 69 74 69 6f 6e 61 6c | 0d 0a 73 79 6e 63 68 72 |ditional|..synchr|
|00001e10| 6f 6e 69 7a 61 74 69 6f | 6e 2c 20 61 64 64 69 6e |onizatio|n, addin|
|00001e20| 67 20 6d 6f 72 65 20 6b | 65 79 62 6f 61 72 64 20 |g more k|eyboard |
|00001e30| 74 61 73 6b 73 20 63 61 | 6e 20 61 6c 6c 6f 77 20 |tasks ca|n allow |
|00001e40| 74 68 65 20 73 61 6d 65 | 20 64 61 74 61 20 74 6f |the same| data to|
|00001e50| 0d 0a 62 65 20 65 64 69 | 74 65 64 20 73 69 6d 75 |..be edi|ted simu|
|00001e60| 6c 74 61 6e 65 6f 75 73 | 6c 79 20 62 79 20 73 65 |ltaneous|ly by se|
|00001e70| 76 65 72 61 6c 20 70 65 | 6f 70 6c 65 20 28 61 20 |veral pe|ople (a |
|00001e80| 6d 75 6c 74 69 2d 75 73 | 65 72 0d 0a 65 64 69 74 |multi-us|er..edit|
|00001e90| 6f 72 21 29 2e 5c 66 6f | 6f 74 6e 6f 74 65 7b 41 |or!).\fo|otnote{A|
|00001ea0| 6c 73 6f 2c 20 61 6e 79 | 20 70 72 6f 67 72 61 6d |lso, any| program|
|00001eb0| 20 69 6e 76 6f 6c 76 69 | 6e 67 20 6d 75 6c 74 69 | involvi|ng multi|
|00001ec0| 70 6c 65 20 6d 61 63 68 | 69 6e 65 73 20 6d 75 73 |ple mach|ines mus|
|00001ed0| 74 0d 0a 65 6e 69 76 69 | 74 61 62 6c 79 20 64 65 |t..enivi|tably de|
|00001ee0| 61 6c 20 77 69 74 68 20 | 63 6f 6e 63 75 72 72 65 |al with |concurre|
|00001ef0| 6e 74 20 70 72 6f 63 65 | 73 73 69 6e 67 20 28 74 |nt proce|ssing (t|
|00001f00| 61 73 6b 73 2c 20 74 68 | 65 20 6d 61 63 68 69 6e |asks, th|e machin|
|00001f10| 65 73 0d 0a 6f 70 65 72 | 61 74 65 20 69 6e 64 65 |es..oper|ate inde|
|00001f20| 70 65 6e 64 65 6e 74 6c | 79 29 20 2d 2d 20 61 6e |pendentl|y) -- an|
|00001f30| 6f 74 68 65 72 20 72 65 | 61 73 6f 6e 20 74 6f 20 |other re|ason to |
|00001f40| 75 6e 64 65 72 73 74 61 | 6e 64 20 74 68 65 20 63 |understa|nd the c|
|00001f50| 6f 6e 63 65 70 74 73 2e | 7d 0d 0a 5c 65 6e 64 7b |oncepts.|}..\end{|
|00001f60| 64 65 73 63 72 69 70 74 | 69 6f 6e 7d 0d 0a 0d 0a |descript|ion}....|
|00001f70| 49 6e 20 73 75 6d 6d 61 | 72 79 2c 20 63 6f 6e 63 |In summa|ry, conc|
|00001f80| 75 72 72 65 6e 74 20 70 | 72 6f 63 65 73 73 69 6e |urrent p|rocessin|
|00001f90| 67 20 69 73 20 61 20 70 | 6f 77 65 72 66 75 6c 20 |g is a p|owerful |
|00001fa0| 70 72 6f 67 72 61 6d 6d | 69 6e 67 20 63 6f 6e 63 |programm|ing conc|
|00001fb0| 65 70 74 2e 0d 0a 49 74 | 20 6e 6f 74 20 6f 6e 6c |ept...It| not onl|
|00001fc0| 79 20 61 6c 6c 6f 77 73 | 20 75 73 20 74 6f 20 75 |y allows| us to u|
|00001fd0| 73 65 20 63 6f 6d 70 75 | 74 65 72 73 20 6d 6f 72 |se compu|ters mor|
|00001fe0| 65 20 65 66 66 69 63 69 | 65 6e 74 6c 79 2c 20 62 |e effici|ently, b|
|00001ff0| 75 74 20 6c 65 74 73 20 | 74 68 65 6d 0d 0a 62 65 |ut lets |them..be|
|00002000| 63 6f 6d 65 20 6d 6f 72 | 65 20 72 65 70 72 65 73 |come mor|e repres|
|00002010| 65 6e 74 61 74 69 76 65 | 20 6d 6f 64 65 6c 73 20 |entative| models |
|00002020| 6f 66 20 6f 75 72 20 63 | 6f 6e 63 75 72 72 65 6e |of our c|oncurren|
|00002030| 74 20 77 6f 72 6c 64 2e | 0d 0a 0d 0a 5c 73 75 62 |t world.|....\sub|
|00002040| 73 65 63 74 69 6f 6e 7b | 54 61 73 6b 73 2c 20 50 |section{|Tasks, P|
|00002050| 72 6f 63 65 73 73 6f 72 | 73 2c 20 61 6e 64 20 43 |rocessor|s, and C|
|00002060| 6f 6e 74 65 78 74 20 53 | 77 69 74 63 68 69 6e 67 |ontext S|witching|
|00002070| 7d 0d 0a 0d 0a 49 6e 20 | 74 68 65 20 68 65 61 72 |}....In |the hear|
|00002080| 74 20 6f 66 20 63 6f 6e | 63 75 72 72 65 6e 74 20 |t of con|current |
|00002090| 70 72 6f 63 65 73 73 69 | 6e 67 20 6c 69 65 20 74 |processi|ng lie t|
|000020a0| 61 73 6b 73 2c 20 70 72 | 6f 63 65 73 73 6f 72 73 |asks, pr|ocessors|
|000020b0| 2c 20 61 6e 64 0d 0a 63 | 6f 6e 74 65 78 74 20 73 |, and..c|ontext s|
|000020c0| 77 69 74 63 68 69 6e 67 | 2e 20 20 41 6e 79 20 6d |witching|. Any m|
|000020d0| 61 63 68 69 6e 65 20 68 | 61 73 20 61 20 63 65 72 |achine h|as a cer|
|000020e0| 74 61 69 6e 20 6e 75 6d | 62 65 72 20 6f 66 20 68 |tain num|ber of h|
|000020f0| 61 72 64 77 61 72 65 20 | 7b 5c 62 66 0d 0a 70 72 |ardware |{\bf..pr|
|00002100| 6f 63 65 73 73 6f 72 73 | 7d 2c 20 65 61 63 68 20 |ocessors|}, each |
|00002110| 6f 66 20 77 68 69 63 68 | 20 69 73 20 61 6c 77 61 |of which| is alwa|
|00002120| 79 73 20 70 72 6f 63 65 | 73 73 69 6e 67 20 69 6e |ys proce|ssing in|
|00002130| 73 74 72 75 63 74 69 6f | 6e 73 20 28 7b 5c 62 66 |structio|ns ({\bf|
|00002140| 0d 0a 6d 75 6c 74 69 70 | 72 6f 63 65 73 73 69 6e |..multip|rocessin|
|00002150| 67 7d 29 2e 20 20 48 6f | 77 65 76 65 72 2c 20 77 |g}). Ho|wever, w|
|00002160| 69 74 68 20 73 6f 66 74 | 77 61 72 65 2c 20 77 65 |ith soft|ware, we|
|00002170| 20 63 61 6e 20 63 6f 6e | 73 74 72 75 63 74 20 61 | can con|struct a|
|00002180| 6e 79 0d 0a 6e 75 6d 62 | 65 72 20 6f 66 20 7b 5c |ny..numb|er of {\|
|00002190| 62 66 20 74 61 73 6b 73 | 7d 2c 20 6f 72 20 76 69 |bf tasks|}, or vi|
|000021a0| 72 74 75 61 6c 20 70 72 | 6f 63 65 73 73 6f 72 73 |rtual pr|ocessors|
|000021b0| 20 28 7b 5c 62 66 20 6d | 75 6c 74 69 74 61 73 6b | ({\bf m|ultitask|
|000021c0| 69 6e 67 7d 29 2e 0d 0a | 55 73 75 61 6c 6c 79 20 |ing})...|Usually |
|000021d0| 74 68 65 20 68 69 67 68 | 65 72 20 74 68 65 20 6e |the high|er the n|
|000021e0| 75 6d 62 65 72 20 6f 66 | 20 70 72 6f 63 65 73 73 |umber of| process|
|000021f0| 6f 72 73 20 61 6e 64 20 | 74 61 73 6b 73 2c 20 74 |ors and |tasks, t|
|00002200| 68 65 20 73 69 6d 70 6c | 65 72 0d 0a 74 68 65 79 |he simpl|er..they|
|00002210| 20 74 65 6e 64 20 74 6f | 20 62 65 63 6f 6d 65 2c | tend to| become,|
|00002220| 20 74 68 65 20 64 69 73 | 74 69 6e 67 75 69 73 68 | the dis|tinguish|
|00002230| 69 6e 67 20 66 61 63 74 | 6f 72 20 6f 66 20 7b 5c |ing fact|or of {\|
|00002240| 62 66 20 66 69 6e 65 2d | 20 61 6e 64 0d 0a 63 6f |bf fine-| and..co|
|00002250| 75 72 73 65 2d 67 72 61 | 69 6e 20 63 6f 6e 63 75 |urse-gra|in concu|
|00002260| 72 72 65 6e 74 20 70 72 | 6f 63 65 73 73 69 6e 67 |rrent pr|ocessing|
|00002270| 7d 2e 20 20 41 73 20 74 | 68 65 72 65 20 61 72 65 |}. As t|here are|
|00002280| 20 61 20 6c 69 6d 69 74 | 65 64 20 6e 75 6d 62 65 | a limit|ed numbe|
|00002290| 72 0d 0a 6f 66 20 70 72 | 6f 63 65 73 73 6f 72 73 |r..of pr|ocessors|
|000022a0| 20 62 75 74 20 70 6f 73 | 73 69 62 6c 79 20 61 6e | but pos|sibly an|
|000022b0| 20 75 6e 6c 69 6d 69 74 | 65 64 20 6e 75 6d 62 65 | unlimit|ed numbe|
|000022c0| 72 20 6f 66 20 74 61 73 | 6b 73 2c 20 61 20 7b 5c |r of tas|ks, a {\|
|000022d0| 62 66 0d 0a 73 63 68 65 | 64 75 6c 65 72 7d 20 6d |bf..sche|duler} m|
|000022e0| 75 73 74 20 73 77 69 74 | 63 68 20 61 20 70 72 6f |ust swit|ch a pro|
|000022f0| 63 65 73 73 6f 72 20 66 | 72 6f 6d 20 6f 6e 65 20 |cessor f|rom one |
|00002300| 74 61 73 6b 20 74 6f 20 | 61 6e 6f 74 68 65 72 2c |task to |another,|
|00002310| 20 6b 6e 6f 77 6e 20 61 | 73 0d 0a 7b 5c 62 66 20 | known a|s..{\bf |
|00002320| 63 6f 6e 74 65 78 74 20 | 73 77 69 74 63 68 69 6e |context |switchin|
|00002330| 67 7d 2e 0d 0a 0d 0a 5c | 62 65 67 69 6e 7b 66 69 |g}.....\|begin{fi|
|00002340| 67 75 72 65 7d 0d 0a 5c | 63 61 70 74 69 6f 6e 7b |gure}..\|caption{|
|00002350| 45 6c 65 6d 65 6e 74 73 | 20 6f 66 20 43 6f 6e 63 |Elements| of Conc|
|00002360| 75 72 72 65 6e 74 20 50 | 72 6f 63 65 73 73 69 6e |urrent P|rocessin|
|00002370| 67 7d 0d 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |g}..\beg|in{verba|
|00002380| 74 69 6d 7d 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |tim}.. | |
|00002390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023a0| 20 20 20 20 20 20 20 20 | 20 20 20 2d 54 0d 0a 20 | | -T.. |
|000023b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023c0| 20 20 20 20 20 20 20 20 | 20 20 20 43 4f 4e 43 55 | | CONCU|
|000023d0| 52 52 45 4e 54 20 50 52 | 4f 43 45 53 53 49 4e 47 |RRENT PR|OCESSING|
|000023e0| 0d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|000023f0| 20 20 20 2d 54 20 20 20 | 20 20 20 20 20 20 20 20 | -T | |
|00002400| 20 20 20 20 69 6e 76 6f | 6c 76 65 73 20 20 20 20 | invo|lves |
|00002410| 20 20 20 20 20 20 20 20 | 20 20 2d 54 20 20 0d 0a | | -T ..|
|00002420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002450| 20 20 20 20 20 0d 0a 20 | 20 20 20 20 20 20 20 20 | .. | |
|00002460| 20 20 20 20 20 20 20 20 | 20 54 2d 20 20 20 20 20 | | T- |
|00002470| 20 20 20 20 20 20 20 54 | 2d 20 20 20 20 20 20 54 | T|- T|
|00002480| 2d 20 20 20 20 20 20 20 | 20 20 20 20 20 54 2d 20 |- | T- |
|00002490| 0d 0a 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 54 |.... | T|
|000024a0| 20 20 20 20 5f 20 20 20 | 20 20 20 20 20 2f 20 20 | _ | / |
|000024b0| 20 20 20 20 4d 55 4c 54 | 49 54 41 53 4b 49 4e 47 | MULT|ITASKING|
|000024c0| 20 20 20 20 54 20 20 20 | 20 20 20 20 5f 20 20 20 | T | _ |
|000024d0| 20 20 7c 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 | |.. | |
|000024e0| 7c 20 20 20 2f 20 5c 20 | 20 20 20 20 54 20 20 20 || / \ | T |
|000024f0| 20 20 20 20 20 20 20 20 | 20 20 7c 20 20 20 20 20 | | | |
|00002500| 20 20 20 20 20 20 5c 20 | 20 20 20 20 2f 20 5c 20 | \ | / \ |
|00002510| 20 20 20 54 0d 0a 20 20 | 20 20 20 20 20 20 20 20 | T.. | |
|00002520| 20 20 20 20 3c 5e 5f 5e | 3e 20 20 20 20 20 20 20 | <^_^|> |
|00002530| 20 20 20 20 20 20 20 20 | 20 20 20 56 20 20 20 20 | | V |
|00002540| 20 20 20 20 20 20 20 20 | 20 20 20 20 3c 5e 5f 5e | | <^_^|
|00002550| 3e 20 20 20 20 20 0d 0a | 20 20 20 20 20 20 20 20 |> ..| |
|00002560| 20 20 20 53 20 20 20 5c | 5f 2f 20 20 20 53 20 20 | S \|_/ S |
|00002570| 20 20 20 20 20 43 4f 4e | 54 45 58 54 20 53 57 49 | CON|TEXT SWI|
|00002580| 54 43 48 49 4e 47 20 20 | 20 20 20 53 20 20 20 5c |TCHING | S \|
|00002590| 5f 2f 20 20 20 53 0d 0a | 20 20 20 20 20 20 20 20 |_/ S..| |
|000025a0| 20 20 20 20 5c 20 20 20 | 50 20 20 20 2f 20 20 20 | \ |P / |
|000025b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5e 20 20 | | ^ |
|000025c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000025d0| 50 20 20 20 2f 0d 0a 20 | 20 20 20 20 20 20 20 20 |P /.. | |
|000025e0| 20 20 20 20 5c 2d 2d 2d | 2d 2d 2f 20 20 20 20 20 | \---|--/ |
|000025f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7c 20 20 20 | | | |
|00002600| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 2d 2d 2d | | \---|
|00002610| 2d 2d 2f 20 20 20 20 0d | 0a 20 20 20 20 20 20 20 |--/ .|. |
|00002620| 20 20 20 20 20 20 20 20 | 20 50 20 20 20 20 20 20 | | P |
|00002630| 20 20 20 20 20 20 20 4d | 55 4c 54 49 50 52 4f 43 | M|ULTIPROC|
|00002640| 45 53 53 49 4e 47 20 20 | 20 20 20 20 20 20 20 20 |ESSING | |
|00002650| 20 50 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | P.. | |
|00002660| 20 20 20 20 50 20 20 20 | 20 20 20 20 20 20 20 20 | P | |
|00002670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002680| 20 20 20 20 20 20 20 20 | 20 20 20 20 50 0d 0a 20 | | P.. |
|00002690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5e | | ^|
|000026a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026c0| 20 20 20 20 20 20 20 5e | 0d 0a 20 20 20 20 20 20 | ^|.. |
|000026d0| 20 20 20 20 20 20 20 20 | 2f 20 20 20 5c 20 20 20 | |/ \ |
|000026e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002700| 2f 20 20 20 5c 0d 0a 20 | 20 20 20 20 20 20 20 20 |/ \.. | |
|00002710| 20 20 20 5f 2f 20 20 20 | 20 20 5c 5f 20 20 20 20 | _/ | \_ |
|00002720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002730| 20 20 20 20 20 20 20 20 | 20 20 20 5f 2f 20 20 20 | | _/ |
|00002740| 20 20 5c 5f 0d 0a 0d 0a | 5c 65 6e 64 7b 76 65 72 | \_....|\end{ver|
|00002750| 62 61 74 69 6d 7d 0d 0a | 5c 65 6e 64 7b 66 69 67 |batim}..|\end{fig|
|00002760| 75 72 65 7d 0d 0a 0d 0a | 5c 73 75 62 73 65 63 74 |ure}....|\subsect|
|00002770| 69 6f 6e 7b 49 6e 74 65 | 72 6e 61 6c 20 5c 26 20 |ion{Inte|rnal \& |
|00002780| 45 78 74 65 72 6e 61 6c | 20 53 79 6e 63 68 72 6f |External| Synchro|
|00002790| 6e 69 7a 61 74 69 6f 6e | 7d 0d 0a 0d 0a 49 66 20 |nization|}....If |
|000027a0| 63 6f 6e 63 75 72 72 65 | 6e 74 20 70 72 6f 63 65 |concurre|nt proce|
|000027b0| 73 73 65 73 20 61 72 65 | 20 67 6f 69 6e 67 20 74 |sses are| going t|
|000027c0| 6f 20 63 6f 6e 73 74 72 | 75 63 74 69 76 65 6c 79 |o constr|uctively|
|000027d0| 20 69 6e 74 65 72 61 63 | 74 2c 20 74 68 65 79 0d | interac|t, they.|
|000027e0| 0a 6d 75 73 74 20 62 65 | 20 61 62 6c 65 20 74 6f |.must be| able to|
|000027f0| 20 73 79 6e 63 68 72 6f | 6e 69 7a 65 20 77 69 74 | synchro|nize wit|
|00002800| 68 20 65 61 63 68 20 6f | 74 68 65 72 2e 20 20 50 |h each o|ther. P|
|00002810| 72 6f 63 65 73 73 20 73 | 79 6e 63 68 72 6f 6e 69 |rocess s|ynchroni|
|00002820| 7a 61 74 69 6f 6e 0d 0a | 74 61 6b 65 73 20 70 6c |zation..|takes pl|
|00002830| 61 63 65 20 6f 6e 20 74 | 77 6f 20 6c 65 76 65 6c |ace on t|wo level|
|00002840| 73 3a 20 69 6e 74 65 72 | 6e 61 6c 6c 79 20 28 62 |s: inter|nally (b|
|00002850| 65 74 77 65 65 6e 20 70 | 72 6f 63 65 73 73 6f 72 |etween p|rocessor|
|00002860| 73 29 20 75 73 69 6e 67 | 20 7b 5c 62 66 0d 0a 73 |s) using| {\bf..s|
|00002870| 65 6d 61 70 68 6f 72 65 | 73 7d 20 61 6e 64 20 65 |emaphore|s} and e|
|00002880| 78 74 65 72 6e 61 6c 6c | 79 20 28 62 65 74 77 65 |xternall|y (betwe|
|00002890| 65 6e 20 61 20 70 72 6f | 63 65 73 73 6f 72 20 61 |en a pro|cessor a|
|000028a0| 6e 64 20 65 78 74 65 72 | 6e 61 6c 0d 0a 68 61 72 |nd exter|nal..har|
|000028b0| 64 77 61 72 65 29 20 75 | 73 69 6e 67 20 7b 5c 62 |dware) u|sing {\b|
|000028c0| 66 20 69 6e 74 65 72 72 | 75 70 74 73 7d 20 6f 72 |f interr|upts} or|
|000028d0| 20 7b 5c 62 66 20 70 6f | 6c 6c 69 6e 67 7d 2e 0d | {\bf po|lling}..|
|000028e0| 0a 0d 0a 41 20 73 65 6d | 61 70 68 6f 72 65 20 69 |...A sem|aphore i|
|000028f0| 73 20 61 20 70 72 6f 63 | 65 73 73 6f 72 20 73 79 |s a proc|essor sy|
|00002900| 6e 63 68 72 6f 6e 69 7a | 61 74 69 6f 6e 20 64 65 |nchroniz|ation de|
|00002910| 76 69 63 65 20 75 73 65 | 64 20 66 6f 72 20 6c 69 |vice use|d for li|
|00002920| 6d 69 74 69 6e 67 0d 0a | 74 68 65 20 6e 75 6d 62 |miting..|the numb|
|00002930| 65 72 20 6f 66 20 70 72 | 6f 63 65 73 73 6f 72 73 |er of pr|ocessors|
|00002940| 20 77 68 69 63 68 20 61 | 63 63 65 73 73 20 63 65 | which a|ccess ce|
|00002950| 72 74 61 69 6e 20 64 61 | 74 61 20 73 69 6d 75 6c |rtain da|ta simul|
|00002960| 74 61 6e 65 6f 75 73 6c | 79 2e 0d 0a 4e 6f 72 6d |taneousl|y...Norm|
|00002970| 61 6c 6c 79 20 6f 6e 6c | 79 20 6f 6e 65 20 70 72 |ally onl|y one pr|
|00002980| 6f 63 65 73 73 6f 72 20 | 69 73 20 61 6c 6c 6f 77 |ocessor |is allow|
|00002990| 65 64 20 74 6f 20 61 63 | 63 65 73 73 20 74 68 65 |ed to ac|cess the|
|000029a0| 20 64 61 74 61 20 61 74 | 20 61 6e 79 20 67 69 76 | data at| any giv|
|000029b0| 65 6e 0d 0a 74 69 6d 65 | 2e 20 20 54 68 65 20 73 |en..time|. The s|
|000029c0| 65 6d 61 70 68 6f 72 65 | 20 69 73 20 69 6d 70 6c |emaphore| is impl|
|000029d0| 65 6d 65 6e 74 65 64 20 | 61 73 20 61 20 6d 75 74 |emented |as a mut|
|000029e0| 75 61 6c 6c 79 20 61 67 | 72 65 65 64 20 75 70 6f |ually ag|reed upo|
|000029f0| 6e 20 62 69 74 20 69 6e | 0d 0a 74 68 65 20 63 6f |n bit in|..the co|
|00002a00| 6d 70 75 74 65 72 27 73 | 20 6d 65 6d 6f 72 79 2e |mputer's| memory.|
|00002a10| 20 20 57 68 65 6e 20 61 | 20 70 72 6f 63 65 73 73 | When a| process|
|00002a20| 6f 72 20 77 61 6e 74 73 | 20 74 6f 20 7b 5c 62 66 |or wants| to {\bf|
|00002a30| 20 63 6c 61 69 6d 7d 20 | 6f 72 20 7b 5c 62 66 0d | claim} |or {\bf.|
|00002a40| 0a 77 61 69 74 20 66 6f | 72 7d 20 74 68 65 20 73 |.wait fo|r} the s|
|00002a50| 65 6d 61 70 68 6f 72 65 | 2c 20 69 74 20 62 6f 74 |emaphore|, it bot|
|00002a60| 68 20 74 65 73 74 73 20 | 61 6e 64 20 73 65 74 73 |h tests |and sets|
|00002a70| 20 74 68 65 20 62 69 74 | 20 69 6e 20 6f 6e 65 20 | the bit| in one |
|00002a80| 7b 5c 62 66 0d 0a 61 74 | 6f 6d 69 63 7d 20 6f 70 |{\bf..at|omic} op|
|00002a90| 65 72 61 74 69 6f 6e 2c | 20 75 73 75 61 6c 6c 79 |eration,| usually|
|00002aa0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 61 73 20 | impleme|nted as |
|00002ab0| 61 20 73 69 6e 67 6c 65 | 20 6d 61 63 68 69 6e 65 |a single| machine|
|00002ac0| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 0d 0a 73 6f | instruc|tion..so|
|00002ad0| 20 74 68 61 74 20 69 74 | 20 63 61 6e 27 74 20 62 | that it| can't b|
|00002ae0| 65 20 69 6e 74 65 72 72 | 75 70 74 65 64 5c 66 6f |e interr|upted\fo|
|00002af0| 6f 74 6e 6f 74 65 7b 54 | 68 6f 75 67 68 20 44 69 |otnote{T|hough Di|
|00002b00| 6a 6b 73 74 72 61 27 73 | 20 61 6c 67 6f 72 69 74 |jkstra's| algorit|
|00002b10| 68 6d 0d 0a 61 6e 64 20 | 44 65 6b 6b 65 72 27 73 |hm..and |Dekker's|
|00002b20| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 69 74 20 63 | version| of it c|
|00002b30| 61 6e 20 65 6e 61 62 6c | 65 20 73 65 6d 61 70 68 |an enabl|e semaph|
|00002b40| 6f 72 65 73 20 74 6f 20 | 62 65 20 69 6d 70 6c 65 |ores to |be imple|
|00002b50| 6d 65 6e 74 65 64 0d 0a | 70 75 72 65 6c 79 20 69 |mented..|purely i|
|00002b60| 6e 20 73 6f 66 74 77 61 | 72 65 2e 20 20 4f 74 68 |n softwa|re. Oth|
|00002b70| 65 72 20 73 6f 6c 75 74 | 69 6f 6e 73 20 65 78 69 |er solut|ions exi|
|00002b80| 73 74 20 61 73 20 77 65 | 6c 6c 7d 2e 20 20 49 66 |st as we|ll}. If|
|00002b90| 20 28 61 6e 64 20 6f 6e | 6c 79 20 69 66 0d 0a 74 | (and on|ly if..t|
|00002ba0| 68 65 20 62 69 74 29 20 | 77 61 73 20 61 6c 72 65 |he bit) |was alre|
|00002bb0| 61 64 79 20 73 65 74 2c | 20 74 68 65 6e 20 74 68 |ady set,| then th|
|00002bc0| 65 20 70 72 6f 63 65 73 | 73 6f 72 20 77 61 69 74 |e proces|sor wait|
|00002bd0| 73 20 75 6e 74 69 6c 20 | 69 74 20 69 73 0d 0a 63 |s until |it is..c|
|00002be0| 6c 65 61 72 65 64 2e 20 | 20 28 54 68 65 20 62 69 |leared. | (The bi|
|00002bf0| 74 20 73 69 67 6e 69 66 | 69 65 73 20 74 68 61 74 |t signif|ies that|
|00002c00| 20 74 68 65 20 64 61 74 | 61 20 74 68 65 20 73 65 | the dat|a the se|
|00002c10| 6d 61 70 68 6f 72 65 20 | 72 65 70 72 65 73 65 6e |maphore |represen|
|00002c20| 74 73 20 69 73 0d 0a 69 | 6e 20 75 73 65 2e 29 20 |ts is..i|n use.) |
|00002c30| 20 4f 75 74 20 6f 66 20 | 63 6f 75 72 74 65 73 79 | Out of |courtesy|
|00002c40| 2c 20 61 20 70 72 6f 63 | 65 73 73 6f 72 20 6d 75 |, a proc|essor mu|
|00002c50| 73 74 20 6c 69 6b 65 77 | 69 73 65 20 63 6c 65 61 |st likew|ise clea|
|00002c60| 72 20 74 68 65 20 62 69 | 74 0d 0a 77 68 65 6e 20 |r the bi|t..when |
|00002c70| 69 74 20 69 73 20 74 68 | 72 6f 75 67 68 2c 20 74 |it is th|rough, t|
|00002c80| 6f 20 7b 5c 62 66 20 72 | 65 6c 65 61 73 65 7d 20 |o {\bf r|elease} |
|00002c90| 74 68 65 20 73 65 6d 61 | 70 68 6f 72 65 20 61 6e |the sema|phore an|
|00002ca0| 64 20 7b 5c 62 66 20 73 | 69 67 6e 61 6c 7d 0d 0a |d {\bf s|ignal}..|
|00002cb0| 61 6e 79 20 77 61 69 74 | 69 6e 67 20 70 72 6f 63 |any wait|ing proc|
|00002cc0| 65 73 73 6f 72 73 2e 0d | 0a 0d 0a 53 65 6d 61 70 |essors..|...Semap|
|00002cd0| 68 6f 72 65 73 20 70 72 | 6f 76 69 64 65 20 74 68 |hores pr|ovide th|
|00002ce0| 65 20 6e 65 63 65 73 73 | 61 72 79 20 70 72 6f 63 |e necess|ary proc|
|00002cf0| 65 73 73 6f 72 20 73 79 | 6e 63 68 72 6f 6e 69 7a |essor sy|nchroniz|
|00002d00| 61 74 69 6f 6e 20 62 75 | 74 20 61 72 65 0d 0a 66 |ation bu|t are..f|
|00002d10| 61 69 72 6c 79 20 70 72 | 69 6d 69 74 69 76 65 2e |airly pr|imitive.|
|00002d20| 20 20 57 69 74 68 20 74 | 68 65 6d 2c 20 68 69 67 | With t|hem, hig|
|00002d30| 68 65 72 2d 6c 65 76 65 | 6c 20 63 6f 6e 74 72 6f |her-leve|l contro|
|00002d40| 6c 20 73 74 72 75 63 74 | 75 72 65 73 20 62 65 0d |l struct|ures be.|
|00002d50| 0a 62 75 69 6c 74 2e 20 | 20 54 68 65 20 7b 5c 62 |.built. | The {\b|
|00002d60| 66 20 6d 6f 6e 69 74 6f | 72 7d 2c 20 66 6f 72 20 |f monito|r}, for |
|00002d70| 65 78 61 6d 70 6c 65 2c | 20 6d 6f 6e 69 74 6f 72 |example,| monitor|
|00002d80| 73 20 64 61 74 61 20 62 | 79 20 6c 69 6d 69 74 69 |s data b|y limiti|
|00002d90| 6e 67 20 69 74 73 0d 0a | 61 63 63 65 73 73 20 74 |ng its..|access t|
|00002da0| 6f 20 61 20 73 65 74 20 | 6f 66 20 70 72 6f 63 65 |o a set |of proce|
|00002db0| 64 75 72 65 73 2c 20 6f | 6e 6c 79 20 6f 6e 65 20 |dures, o|nly one |
|00002dc0| 6f 66 20 77 68 69 63 68 | 20 63 61 6e 20 72 75 6e |of which| can run|
|00002dd0| 20 61 74 20 61 6e 79 20 | 67 69 76 65 6e 0d 0a 74 | at any |given..t|
|00002de0| 69 6d 65 2e 0d 0a 0d 0a | 0d 0a 49 6e 74 65 72 72 |ime.....|..Interr|
|00002df0| 75 70 74 73 20 61 6e 64 | 20 70 6f 6c 6c 69 6e 67 |upts and| polling|
|00002e00| 2c 20 6f 6e 20 74 68 65 | 20 6f 74 68 65 72 20 68 |, on the| other h|
|00002e10| 61 6e 64 2c 20 61 6c 6c | 6f 77 20 61 20 70 72 6f |and, all|ow a pro|
|00002e20| 63 65 73 73 6f 72 20 74 | 6f 0d 0a 73 79 6e 63 68 |cessor t|o..synch|
|00002e30| 72 6f 6e 69 7a 65 20 69 | 74 73 65 6c 66 20 77 69 |ronize i|tself wi|
|00002e40| 74 68 20 69 74 73 20 65 | 78 74 65 72 6e 61 6c 20 |th its e|xternal |
|00002e50| 68 61 72 64 77 61 72 65 | 20 64 65 76 69 63 65 73 |hardware| devices|
|00002e60| 2e 20 20 54 6f 20 73 79 | 6e 63 68 72 6f 6e 69 7a |. To sy|nchroniz|
|00002e70| 65 2c 0d 0a 61 20 70 72 | 6f 63 65 73 73 6f 72 20 |e,..a pr|ocessor |
|00002e80| 6d 61 79 20 70 6f 6c 6c | 20 69 74 73 20 64 65 76 |may poll| its dev|
|00002e90| 69 63 65 73 2c 20 77 61 | 69 74 69 6e 67 20 66 6f |ices, wa|iting fo|
|00002ea0| 72 20 74 68 65 6d 20 74 | 6f 20 72 65 61 63 68 20 |r them t|o reach |
|00002eb0| 61 20 63 65 72 74 61 69 | 6e 0d 0a 73 74 61 74 65 |a certai|n..state|
|00002ec0| 20 28 61 73 20 60 60 72 | 65 61 64 79 20 74 6f 20 | (as ``r|eady to |
|00002ed0| 72 65 63 65 69 76 65 20 | 64 61 74 61 27 27 29 2e |receive |data'').|
|00002ee0| 20 20 54 68 65 20 61 64 | 76 61 6e 74 61 67 65 20 | The ad|vantage |
|00002ef0| 6f 66 20 70 6f 6c 6c 69 | 6e 67 20 69 73 0d 0a 74 |of polli|ng is..t|
|00002f00| 68 61 74 20 74 68 65 0d | 0a 70 72 6f 63 65 73 73 |hat the.|.process|
|00002f10| 6f 72 20 6d 61 79 20 77 | 61 69 74 20 66 6f 72 20 |or may w|ait for |
|00002f20| 61 6e 79 20 73 65 74 20 | 6f 66 20 63 6f 6e 64 69 |any set |of condi|
|00002f30| 74 69 6f 6e 73 20 6f 66 | 20 69 74 73 20 63 68 6f |tions of| its cho|
|00002f40| 6f 73 69 6e 67 2e 20 20 | 54 68 65 0d 0a 64 69 73 |osing. |The..dis|
|00002f50| 61 64 76 61 6e 74 61 67 | 65 2c 20 6f 66 20 63 6f |advantag|e, of co|
|00002f60| 75 72 73 65 2c 20 69 73 | 20 74 68 65 20 70 72 6f |urse, is| the pro|
|00002f70| 63 65 73 73 6f 72 20 6d | 61 79 20 77 61 73 74 65 |cessor m|ay waste|
|00002f80| 20 61 20 6c 6f 74 20 6f | 66 20 74 69 6d 65 0d 0a | a lot o|f time..|
|00002f90| 70 6f 6c 6c 69 6e 67 2c | 20 61 6e 64 20 6d 75 73 |polling,| and mus|
|00002fa0| 74 20 72 65 6d 65 6d 62 | 65 72 20 74 6f 20 70 6f |t rememb|er to po|
|00002fb0| 6c 6c 20 61 6d 69 64 20 | 69 73 20 72 65 67 75 6c |ll amid |is regul|
|00002fc0| 61 72 20 70 72 6f 63 65 | 73 73 69 6e 67 2e 20 20 |ar proce|ssing. |
|00002fd0| 46 6f 72 0d 0a 74 68 69 | 73 20 72 65 61 73 6f 6e |For..thi|s reason|
|00002fe0| 2c 20 6d 6f 73 74 20 70 | 72 6f 63 65 73 73 6f 72 |, most p|rocessor|
|00002ff0| 73 20 68 61 76 65 20 62 | 75 69 6c 74 20 69 6e 74 |s have b|uilt int|
|00003000| 6f 20 74 68 65 6d 20 63 | 69 72 63 75 69 74 72 79 |o them c|ircuitry|
|00003010| 20 66 6f 72 0d 0a 61 75 | 74 6f 6d 61 74 69 63 61 | for..au|tomatica|
|00003020| 6c 6c 79 20 70 6f 6c 6c | 69 6e 67 20 61 20 73 65 |lly poll|ing a se|
|00003030| 74 20 6f 66 20 68 61 72 | 64 77 61 72 65 20 69 6e |t of har|dware in|
|00003040| 74 65 72 72 75 70 74 73 | 20 62 65 74 77 65 65 6e |terrupts| between|
|00003050| 20 65 61 63 68 20 6f 66 | 0d 0a 74 68 65 69 72 20 | each of|..their |
|00003060| 69 6e 73 74 72 75 63 74 | 69 6f 6e 73 2e 20 20 57 |instruct|ions. W|
|00003070| 68 65 6e 20 61 6e 20 69 | 6e 74 65 72 72 75 70 74 |hen an i|nterrupt|
|00003080| 20 69 73 20 73 69 67 6e | 61 6c 65 64 2c 20 74 68 | is sign|aled, th|
|00003090| 65 20 63 75 72 72 65 6e | 74 0d 0a 70 72 6f 63 65 |e curren|t..proce|
|000030a0| 73 73 20 69 73 20 7b 5c | 65 6d 20 69 6e 74 65 72 |ss is {\|em inter|
|000030b0| 72 75 70 74 65 64 7d 20 | 61 6e 64 20 61 6e 20 7b |rupted} |and an {|
|000030c0| 5c 62 66 20 69 6e 74 65 | 72 72 75 70 74 20 68 61 |\bf inte|rrupt ha|
|000030d0| 6e 64 6c 65 72 7d 20 72 | 6f 75 74 69 6e 65 0d 0a |ndler} r|outine..|
|000030e0| 69 73 20 72 75 6e 20 74 | 6f 20 68 61 6e 64 6c 65 |is run t|o handle|
|000030f0| 20 74 68 65 20 69 6e 74 | 65 72 72 75 70 74 2e 20 | the int|errupt. |
|00003100| 20 43 6f 6d 70 6c 69 63 | 61 74 69 6f 6e 73 20 73 | Complic|ations s|
|00003110| 65 74 20 69 6e 20 77 68 | 65 6e 20 74 68 65 20 0d |et in wh|en the .|
|00003120| 0a 69 6e 74 65 72 72 75 | 70 74 20 68 61 6e 64 6c |.interru|pt handl|
|00003130| 65 72 20 69 74 73 65 6c | 66 20 69 73 20 69 6e 74 |er itsel|f is int|
|00003140| 65 72 72 75 70 74 65 64 | 2c 20 61 6e 64 20 6d 6f |errupted|, and mo|
|00003150| 73 74 20 70 72 6f 63 65 | 73 73 6f 72 73 20 61 6c |st proce|ssors al|
|00003160| 6c 6f 77 0d 0a 69 6e 74 | 65 72 72 75 70 74 73 20 |low..int|errupts |
|00003170| 74 6f 20 62 65 20 64 69 | 73 61 62 6c 65 64 20 6f |to be di|sabled o|
|00003180| 72 20 70 72 69 6f 72 69 | 74 69 7a 65 64 2e 0d 0a |r priori|tized...|
|00003190| 0d 0a 5c 62 65 67 69 6e | 7b 66 69 67 75 72 65 7d |..\begin|{figure}|
|000031a0| 0d 0a 5c 63 61 70 74 69 | 6f 6e 7b 49 6e 74 65 72 |..\capti|on{Inter|
|000031b0| 6e 61 6c 20 61 6e 64 20 | 45 78 74 65 72 6e 61 6c |nal and |External|
|000031c0| 20 50 72 6f 63 65 73 73 | 6f 72 20 53 79 6e 63 72 | Process|or Syncr|
|000031d0| 6f 6e 69 7a 61 74 69 6f | 6e 20 44 65 76 69 63 65 |onizatio|n Device|
|000031e0| 73 7d 0d 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |s}..\beg|in{verba|
|000031f0| 74 69 6d 7d 0d 0a 0d 0a | 20 20 20 20 20 20 20 20 |tim}....| |
|00003200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003210| 20 20 20 20 45 58 54 45 | 52 4e 41 4c 20 20 48 41 | EXTE|RNAL HA|
|00003220| 52 44 57 41 52 45 0d 0a | 20 20 20 20 20 20 20 20 |RDWARE..| |
|00003230| 2f 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 2d 2d |/=======|======--|
|00003240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 3d 3d 3d 3d |--------|----====|
|00003260| 3d 3d 3d 3d 3d 3d 3d 3d | 5c 0d 0a 20 20 20 20 20 |========|\.. |
|00003270| 20 20 20 55 20 43 4f 4d | 50 55 54 45 52 20 20 20 | U COM|PUTER |
|00003280| 20 20 20 20 69 20 20 20 | 20 20 20 20 20 20 20 20 | i | |
|00003290| 20 20 20 20 20 20 20 20 | 20 20 20 69 20 20 20 20 | | i |
|000032a0| 20 20 20 20 20 20 20 20 | 20 20 20 55 0d 0a 20 20 | | U.. |
|000032b0| 20 20 20 20 20 20 55 20 | 20 20 20 20 20 20 20 20 | U | |
|000032c0| 20 20 20 20 20 20 20 6e | 20 20 20 20 20 20 20 20 | n| |
|000032d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6e 20 | | n |
|000032e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 55 0d | | U.|
|000032f0| 0a 20 20 20 20 20 20 20 | 20 55 20 20 20 20 20 20 |. | U |
|00003300| 20 20 20 20 20 20 20 20 | 20 20 74 20 20 20 20 20 | | t |
|00003310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003320| 20 74 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | t | |
|00003330| 20 55 0d 0a 20 20 20 20 | 20 20 20 20 55 20 20 20 | U.. | U |
|00003340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 65 20 20 | | e |
|00003350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003360| 20 20 20 20 65 20 20 20 | 20 20 20 20 20 20 20 20 | e | |
|00003370| 20 20 20 20 55 0d 0a 20 | 20 20 20 20 20 20 20 55 | U.. | U|
|00003380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003390| 72 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r | |
|000033a0| 20 20 20 20 20 20 20 72 | 20 20 20 20 20 20 20 20 | r| |
|000033b0| 20 20 20 20 20 20 20 55 | 0d 0a 20 20 20 20 20 20 | U|.. |
|000033c0| 20 20 55 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | U | |
|000033d0| 20 20 20 72 20 20 20 20 | 20 20 20 20 20 20 20 20 | r | |
|000033e0| 20 20 20 20 20 20 20 20 | 20 20 72 20 20 20 20 20 | | r |
|000033f0| 20 20 20 20 20 20 20 20 | 20 20 55 0d 0a 20 20 20 | | U.. |
|00003400| 20 20 20 20 20 55 20 20 | 20 20 20 20 20 20 20 20 | U | |
|00003410| 20 20 20 20 20 20 75 20 | 20 20 20 20 20 20 20 20 | u | |
|00003420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 75 20 20 | | u |
|00003430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 55 0d 0a | | U..|
|00003440| 20 20 20 20 20 20 20 20 | 55 20 20 20 20 20 20 20 | |U |
|00003450| 20 20 20 20 20 20 20 20 | 20 70 20 20 20 20 20 20 | | p |
|00003460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003470| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | |
|00003480| 55 0d 0a 20 20 20 20 20 | 20 20 20 55 20 20 20 20 |U.. | U |
|00003490| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 20 20 20 | | t |
|000034a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034b0| 20 20 20 74 20 20 20 20 | 20 20 20 20 20 20 20 20 | t | |
|000034c0| 20 20 20 55 0d 0a 20 20 | 20 20 20 20 20 20 55 20 | U.. | U |
|000034d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|000034e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034f0| 20 20 20 20 20 20 73 20 | 20 20 20 20 20 20 20 20 | s | |
|00003500| 20 20 20 20 20 20 55 0d | 0a 20 20 20 20 20 20 20 | U.|. |
|00003510| 20 55 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | U | |
|00003520| 20 20 7c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |
|00003530| 20 20 20 20 20 20 20 20 | 20 7c 20 20 20 20 20 20 | | | |
|00003540| 20 20 20 20 20 20 20 20 | 20 55 0d 0a 20 20 20 20 | | U.. |
|00003550| 20 20 20 20 55 20 20 20 | 20 20 20 20 20 20 20 20 | U | |
|00003560| 20 20 20 20 20 56 20 20 | 20 20 20 20 20 20 20 20 | V | |
|00003570| 20 20 20 20 20 20 20 20 | 20 20 20 20 56 20 20 20 | | V |
|00003580| 20 20 20 20 20 20 20 20 | 20 20 20 20 55 0d 0a 20 | | U.. |
|00003590| 20 20 20 20 20 20 20 55 | 20 20 20 20 20 20 20 20 | U| |
|000035a0| 20 2f 2d 2d 2d 2d 2d 2d | 2d 2d 2d 5c 20 20 20 20 | /------|---\ |
|000035b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2d 2d 2d | | /---|
|000035c0| 2d 2d 2d 2d 2d 2d 5c 20 | 20 20 20 20 20 20 20 55 |------\ | U|
|000035d0| 0d 0a 20 20 20 20 20 20 | 20 20 55 20 20 20 20 20 |.. | U |
|000035e0| 20 20 20 20 7c 50 52 4f | 43 45 53 53 4f 52 7c 20 | |PRO|CESSOR| |
|000035f0| 3c 2d 73 65 6d 61 70 68 | 6f 72 65 73 2d 3e 20 7c |<-semaph|ores-> ||
|00003600| 50 52 4f 43 45 53 53 4f | 52 7c 20 20 20 20 20 20 |PROCESSO|R| |
|00003610| 20 20 55 0d 0a 20 20 20 | 20 20 20 20 20 55 20 20 | U.. | U |
|00003620| 20 20 20 20 20 20 20 5c | 2d 2d 2d 2d 2d 2d 2d 2d | \|--------|
|00003630| 2d 2f 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |-/ | |
|00003640| 20 20 5c 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2f 20 20 20 | \-----|----/ |
|00003650| 20 20 20 20 20 55 0d 0a | 20 20 20 20 20 20 20 20 | U..| |
|00003660| 55 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |U | |
|00003670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003690| 20 20 20 20 20 20 20 20 | 55 0d 0a 20 20 20 20 20 | |U.. |
|000036a0| 20 20 20 5c 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | \====|========|
|000036b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000036c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000036d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 2f 0d 0a 5c 65 |========|===/..\e|
|000036e0| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0a 5c 65 |nd{verba|tim}..\e|
|000036f0| 6e 64 7b 66 69 67 75 72 | 65 7d 0d 0a 0d 0a 41 73 |nd{figur|e}....As|
|00003700| 20 73 65 6d 61 70 68 6f | 72 65 73 20 61 72 65 20 | semapho|res are |
|00003710| 73 79 73 74 65 6d 61 74 | 69 63 61 6c 6c 79 20 63 |systemat|ically c|
|00003720| 6c 61 69 6d 65 64 20 61 | 6e 64 20 72 65 6c 65 61 |laimed a|nd relea|
|00003730| 73 65 64 2c 20 73 6f 20 | 61 72 65 0d 0a 69 6e 74 |sed, so |are..int|
|00003740| 65 72 72 75 70 74 73 20 | 64 69 73 61 62 6c 65 64 |errupts |disabled|
|00003750| 20 61 6e 64 20 65 6e 61 | 62 6c 65 64 2e 20 20 57 | and ena|bled. W|
|00003760| 68 65 6e 20 61 63 63 65 | 73 73 69 6e 67 20 64 61 |hen acce|ssing da|
|00003770| 74 61 2c 20 61 20 70 72 | 6f 63 65 73 73 20 6d 75 |ta, a pr|ocess mu|
|00003780| 73 74 0d 0a 64 69 73 61 | 62 6c 65 20 61 6c 6c 20 |st..disa|ble all |
|00003790| 69 6e 74 65 72 72 75 70 | 74 73 20 77 68 69 63 68 |interrup|ts which|
|000037a0| 20 6d 61 79 20 61 6c 73 | 6f 20 6d 6f 64 69 66 79 | may als|o modify|
|000037b0| 20 74 68 65 20 64 61 74 | 61 2e 20 20 46 6f 72 20 | the dat|a. For |
|000037c0| 74 68 69 73 0d 0a 72 65 | 61 73 6f 6e 2c 20 79 6f |this..re|ason, yo|
|000037d0| 75 27 6c 6c 20 74 79 70 | 69 63 61 6c 6c 79 2c 20 |u'll typ|ically, |
|000037e0| 79 6f 75 27 6c 6c 20 74 | 79 70 69 63 61 6c 6c 79 |you'll t|ypically|
|000037f0| 20 68 65 61 72 20 74 68 | 65 20 62 75 7a 7a 20 77 | hear th|e buzz w|
|00003800| 6f 72 64 73 3a 0d 0a 7b | 5c 62 66 20 6e 6f 6e 2d |ords:..{|\bf non-|
|00003810| 70 72 65 2d 65 6d 70 74 | 69 76 65 7d 20 63 6f 64 |pre-empt|ive} cod|
|00003820| 65 20 28 6e 6f 74 20 69 | 6e 74 65 72 72 75 70 74 |e (not i|nterrupt|
|00003830| 61 62 6c 65 20 77 68 69 | 6c 65 20 65 78 65 63 75 |able whi|le execu|
|00003840| 74 69 6e 67 29 20 61 6e | 64 0d 0a 7b 5c 62 66 20 |ting) an|d..{\bf |
|00003850| 6e 6f 6e 2d 72 65 2d 65 | 6e 74 72 61 6e 74 7d 20 |non-re-e|ntrant} |
|00003860| 66 75 6e 63 74 69 6f 6e | 73 20 28 6e 6f 74 20 72 |function|s (not r|
|00003870| 65 63 61 6c 6c 61 62 6c | 65 20 77 68 69 6c 65 20 |ecallabl|e while |
|00003880| 65 76 61 6c 75 61 74 69 | 6e 67 29 2e 0d 0a 0d 0a |evaluati|ng).....|
|00003890| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 50 72 6f 74 |\subsect|ion{Prot|
|000038a0| 6f 63 6f 6c 73 20 6f 66 | 20 43 6f 6d 6d 75 6e 69 |ocols of| Communi|
|000038b0| 63 61 74 69 6f 6e 7d 0d | 0a 0d 0a 57 69 74 68 20 |cation}.|...With |
|000038c0| 73 79 6e 63 68 72 6f 6e | 69 7a 61 74 69 6f 6e 2c |synchron|ization,|
|000038d0| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 20 69 | communi|cation i|
|000038e0| 73 20 70 6f 73 73 69 62 | 6c 65 2e 20 20 43 6f 6d |s possib|le. Com|
|000038f0| 6d 75 6e 69 63 61 74 69 | 6f 6e 20 69 73 20 61 0d |municati|on is a.|
|00003900| 0a 62 69 67 2c 20 62 69 | 67 20 69 73 73 75 65 20 |.big, bi|g issue |
|00003910| 69 6e 20 63 6f 6d 70 75 | 74 65 72 20 73 63 69 65 |in compu|ter scie|
|00003920| 6e 63 65 2e 20 20 4f 76 | 65 72 20 74 68 65 20 70 |nce. Ov|er the p|
|00003930| 61 73 74 20 64 65 63 61 | 64 65 20 6f 72 20 73 6f |ast deca|de or so|
|00003940| 2c 20 77 69 74 68 0d 0a | 74 68 65 20 67 72 6f 77 |, with..|the grow|
|00003950| 74 68 20 6f 66 20 6f 70 | 65 72 61 74 69 6e 67 20 |th of op|erating |
|00003960| 73 79 73 74 65 6d 20 74 | 65 63 68 6e 6f 6c 6f 67 |system t|echnolog|
|00003970| 79 2c 20 74 68 65 20 66 | 6f 63 75 73 20 68 61 73 |y, the f|ocus has|
|00003980| 20 62 65 65 6e 20 6f 6e | 0d 0a 63 6f 6d 6d 75 6e | been on|..commun|
|00003990| 69 63 61 74 69 6f 6e 73 | 20 77 69 74 68 69 6e 20 |ications| within |
|000039a0| 74 68 65 20 63 6f 6d 70 | 75 74 65 72 2e 20 20 4e |the comp|uter. N|
|000039b0| 6f 77 2c 20 77 69 74 68 | 20 67 72 65 61 74 20 69 |ow, with| great i|
|000039c0| 6e 74 65 72 65 73 74 20 | 69 6e 0d 0a 6e 65 74 77 |nterest |in..netw|
|000039d0| 6f 72 6b 20 74 65 63 68 | 6e 6f 6c 6f 67 79 2c 20 |ork tech|nology, |
|000039e0| 74 68 61 74 20 69 6e 74 | 65 72 65 73 74 20 68 61 |that int|erest ha|
|000039f0| 73 20 62 72 6f 61 64 65 | 6e 65 64 20 74 6f 20 63 |s broade|ned to c|
|00003a00| 6f 6d 6d 75 6e 69 63 61 | 74 69 6f 6e 0d 0a 62 65 |ommunica|tion..be|
|00003a10| 74 77 65 65 6e 20 63 6f | 6d 70 75 74 65 72 73 2e |tween co|mputers.|
|00003a20| 20 20 54 6f 20 69 6e 74 | 72 6f 64 75 63 65 20 74 | To int|roduce t|
|00003a30| 68 65 20 73 75 62 6a 65 | 63 74 2c 20 49 20 77 69 |he subje|ct, I wi|
|00003a40| 6c 6c 20 66 6f 63 75 73 | 20 6f 6e 20 74 68 65 0d |ll focus| on the.|
|00003a50| 0a 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 20 74 |.communi|cation t|
|00003a60| 79 70 65 73 20 77 69 74 | 68 69 6e 20 61 20 63 6f |ypes wit|hin a co|
|00003a70| 6d 70 75 74 65 72 2e 20 | 20 54 6f 20 63 6f 6d 6d |mputer. | To comm|
|00003a80| 75 6e 69 63 61 74 65 2c | 20 69 74 20 69 73 20 63 |unicate,| it is c|
|00003a90| 72 69 74 69 63 61 6c 20 | 74 6f 20 61 67 72 65 65 |ritical |to agree|
|00003aa0| 20 6f 6e 20 61 0d 0a 70 | 72 6f 74 6f 63 6f 6c 2e | on a..p|rotocol.|
|00003ab0| 20 20 48 65 72 65 20 61 | 72 65 20 73 65 76 65 72 | Here a|re sever|
|00003ac0| 61 6c 20 74 6f 20 63 68 | 6f 6f 73 65 3a 0d 0a 0d |al to ch|oose:...|
|00003ad0| 0a 5c 62 65 67 69 6e 7b | 64 65 73 63 72 69 70 74 |.\begin{|descript|
|00003ae0| 69 6f 6e 7d 0d 0a 0d 0a | 09 5c 69 74 65 6d 5b 53 |ion}....|.\item[S|
|00003af0| 68 61 72 65 64 20 4d 65 | 6d 6f 72 79 5d 20 69 73 |hared Me|mory] is|
|00003b00| 20 74 68 65 20 6d 6f 73 | 74 20 67 65 6e 65 72 61 | the mos|t genera|
|00003b10| 6c 20 66 6f 72 6d 20 6f | 66 20 69 6e 74 65 72 70 |l form o|f interp|
|00003b20| 72 6f 63 65 73 73 0d 0a | 63 6f 6d 6d 75 6e 69 63 |rocess..|communic|
|00003b30| 61 74 69 6f 6e 2e 20 20 | 54 77 6f 20 70 72 6f 63 |ation. |Two proc|
|00003b40| 65 73 73 65 73 20 73 68 | 61 72 65 20 61 6e 20 61 |esses sh|are an a|
|00003b50| 64 64 72 65 73 73 20 73 | 70 61 63 65 2c 20 61 20 |ddress s|pace, a |
|00003b60| 63 6f 6d 6d 6f 6e 0d 0a | 60 60 62 6c 61 63 6b 62 |common..|``blackb|
|00003b70| 6f 61 72 64 27 27 20 74 | 6f 20 63 6f 6d 6d 75 6e |oard'' t|o commun|
|00003b80| 69 63 61 74 65 2e 20 20 | 54 68 65 72 65 20 69 73 |icate. |There is|
|00003b90| 20 60 60 69 6e 2d 74 72 | 61 6e 73 69 74 27 27 20 | ``in-tr|ansit'' |
|00003ba0| 73 74 61 74 65 20 66 6f | 72 0d 0a 69 6e 66 6f 72 |state fo|r..infor|
|00003bb0| 6d 61 74 69 6f 6e 20 61 | 6e 64 20 63 6f 6d 6d 75 |mation a|nd commu|
|00003bc0| 6e 69 63 61 74 69 6f 6e | 20 69 73 20 73 69 6d 70 |nication| is simp|
|00003bd0| 6c 65 20 61 6e 64 20 69 | 6e 73 74 61 6e 74 61 6e |le and i|nstantan|
|00003be0| 65 6f 75 73 2e 20 20 48 | 6f 77 65 76 65 72 0d 0a |eous. H|owever..|
|00003bf0| 74 68 69 73 20 66 6c 65 | 78 69 62 69 6c 69 74 79 |this fle|xibility|
|00003c00| 20 69 73 20 73 68 61 72 | 65 64 20 6d 65 6d 6f 72 | is shar|ed memor|
|00003c10| 79 27 73 20 70 69 74 66 | 61 6c 6c 2e 20 20 57 69 |y's pitf|all. Wi|
|00003c20| 74 68 20 73 6f 20 66 65 | 77 20 63 6f 6e 73 74 72 |th so fe|w constr|
|00003c30| 61 69 6e 74 73 0d 0a 6f | 6e 20 74 68 65 20 73 68 |aints..o|n the sh|
|00003c40| 61 72 65 64 20 61 63 63 | 65 73 73 20 74 6f 20 64 |ared acc|ess to d|
|00003c50| 61 74 61 2c 20 69 74 20 | 69 73 20 65 61 73 79 20 |ata, it |is easy |
|00003c60| 74 6f 20 65 72 72 20 61 | 6e 64 20 63 6f 72 72 75 |to err a|nd corru|
|00003c70| 70 74 20 69 74 2e 20 20 | 57 68 61 74 27 73 20 6d |pt it. |What's m|
|00003c80| 6f 72 65 2c 0d 0a 69 6e | 66 6f 72 6d 61 74 69 6f |ore,..in|formatio|
|00003c90| 6e 20 6d 61 79 20 66 6c | 6f 77 20 61 6e 79 77 68 |n may fl|ow anywh|
|00003ca0| 65 72 65 20 61 6e 64 20 | 7b 5c 62 66 20 70 72 6f |ere and |{\bf pro|
|00003cb0| 74 65 63 74 69 6f 6e 7d | 20 69 73 20 64 69 66 66 |tection}| is diff|
|00003cc0| 69 63 75 6c 74 20 74 6f | 0d 0a 65 6e 66 6f 72 63 |icult to|..enforc|
|00003cd0| 65 2e 20 20 46 69 6e 61 | 6c 6c 79 2c 20 69 74 20 |e. Fina|lly, it |
|00003ce0| 69 73 20 6e 6f 74 20 65 | 61 73 79 20 74 6f 20 65 |is not e|asy to e|
|00003cf0| 78 74 65 6e 64 20 74 68 | 65 20 73 68 61 72 65 64 |xtend th|e shared|
|00003d00| 20 6d 65 6d 6f 72 79 0d | 0a 61 62 73 74 72 61 63 | memory.|.abstrac|
|00003d10| 74 69 6f 6e 20 74 6f 20 | 73 69 74 75 61 74 69 6f |tion to |situatio|
|00003d20| 6e 73 20 77 68 65 72 65 | 20 74 68 65 20 69 6e 66 |ns where| the inf|
|00003d30| 6f 72 6d 61 74 69 6f 6e | 20 63 6f 6d 6d 75 6e 69 |ormation| communi|
|00003d40| 63 61 74 65 64 20 69 73 | 0d 0a 6c 61 72 67 65 72 |cated is|..larger|
|00003d50| 20 74 68 61 6e 20 6d 65 | 6d 6f 72 79 2c 20 6f 72 | than me|mory, or|
|00003d60| 2c 20 77 6f 72 73 65 2c | 20 62 65 74 77 65 65 6e |, worse,| between|
|00003d70| 20 6d 61 63 68 69 6e 65 | 73 2e 0d 0a 0d 0a 09 5c | machine|s......\|
|00003d80| 69 74 65 6d 5b 4d 65 73 | 73 61 67 65 20 50 61 73 |item[Mes|sage Pas|
|00003d90| 73 69 6e 67 5d 20 70 72 | 6f 76 69 64 65 73 20 61 |sing] pr|ovides a|
|00003da0| 20 6c 69 74 74 6c 65 20 | 6d 6f 72 65 20 63 6f 6e | little |more con|
|00003db0| 74 72 6f 6c 2e 20 20 50 | 72 6f 63 65 73 73 65 73 |trol. P|rocesses|
|00003dc0| 0d 0a 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 62 79 |..commun|icate by|
|00003dd0| 20 70 61 73 73 69 6e 67 | 20 6d 65 73 73 61 67 65 | passing| message|
|00003de0| 73 20 74 6f 20 6f 6e 65 | 20 61 6e 6f 74 68 65 72 |s to one| another|
|00003df0| 2e 20 20 54 68 65 20 6d | 65 73 73 61 67 65 73 20 |. The m|essages |
|00003e00| 61 72 65 0d 0a 6a 75 73 | 74 20 72 65 63 6f 72 64 |are..jus|t record|
|00003e10| 73 20 6f 66 20 62 79 74 | 65 73 2c 20 61 6e 64 20 |s of byt|es, and |
|00003e20| 77 69 74 68 69 6e 20 61 | 20 73 69 6e 67 6c 65 20 |within a| single |
|00003e30| 6d 61 63 68 69 6e 65 2c | 20 63 6f 6d 6d 75 6e 69 |machine,| communi|
|00003e40| 63 61 74 69 6f 6e 20 63 | 61 6e 0d 0a 63 61 6e 20 |cation c|an..can |
|00003e50| 62 65 20 6e 65 61 72 6c | 79 20 61 73 20 66 61 73 |be nearl|y as fas|
|00003e60| 74 20 61 73 20 73 68 61 | 72 65 64 20 6d 65 6d 6f |t as sha|red memo|
|00003e70| 72 79 20 62 65 63 61 75 | 73 65 20 74 68 65 20 6d |ry becau|se the m|
|00003e80| 65 73 73 61 67 65 20 64 | 61 74 61 20 6e 65 65 64 |essage d|ata need|
|00003e90| 0d 0a 6e 6f 74 20 62 65 | 20 63 6f 70 69 65 64 2e |..not be| copied.|
|00003ea0| 20 20 42 75 74 2c 20 62 | 65 63 61 75 73 65 20 63 | But, b|ecause c|
|00003eb0| 6f 6d 6d 75 6e 69 63 61 | 74 69 6f 6e 20 69 73 20 |ommunica|tion is |
|00003ec0| 64 69 76 69 64 65 64 20 | 69 6e 74 6f 20 6c 6f 67 |divided |into log|
|00003ed0| 69 63 61 6c 0d 0a 75 6e | 69 74 73 2c 20 74 68 65 |ical..un|its, the|
|00003ee0| 20 6d 65 73 73 61 67 65 | 20 70 61 73 73 69 6e 67 | message| passing|
|00003ef0| 20 61 62 73 74 72 61 63 | 74 69 6f 6e 20 63 61 6e | abstrac|tion can|
|00003f00| 20 65 78 74 65 6e 64 20 | 74 6f 20 63 6f 6d 6d 75 | extend |to commu|
|00003f10| 6e 69 63 61 74 69 6f 6e | 0d 0a 62 65 74 77 65 65 |nication|..betwee|
|00003f20| 6e 20 6d 61 63 68 69 6e | 65 73 20 77 69 74 68 20 |n machin|es with |
|00003f30| 6e 6f 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 20 |no modif|ication |
|00003f40| 74 6f 20 69 74 73 20 69 | 6e 74 65 72 66 61 63 65 |to its i|nterface|
|00003f50| 2e 20 20 53 65 76 65 72 | 61 6c 0d 0a 66 6c 61 76 |. Sever|al..flav|
|00003f60| 6f 72 73 20 6f 66 20 6d | 65 73 73 61 67 65 20 70 |ors of m|essage p|
|00003f70| 61 73 73 69 6e 67 20 61 | 72 65 20 61 76 61 69 6c |assing a|re avail|
|00003f80| 61 62 6c 65 2e 20 20 49 | 6e 20 74 68 65 20 6d 6f |able. I|n the mo|
|00003f90| 73 74 20 67 65 6e 65 72 | 61 6c 20 66 6f 72 6d 2c |st gener|al form,|
|00003fa0| 0d 0a 6d 65 73 73 61 67 | 65 73 20 63 61 6e 20 62 |..messag|es can b|
|00003fb0| 65 20 73 65 6e 74 20 61 | 6e 64 20 72 65 63 65 69 |e sent a|nd recei|
|00003fc0| 76 65 64 20 66 72 6f 6d | 20 61 6e 79 20 6e 75 6d |ved from| any num|
|00003fd0| 62 65 72 20 6f 66 20 69 | 6e 64 65 70 65 6e 64 65 |ber of i|ndepende|
|00003fe0| 6e 74 20 7b 5c 62 66 0d | 0a 6d 61 69 6c 62 6f 78 |nt {\bf.|.mailbox|
|00003ff0| 65 73 7d 2c 20 73 65 70 | 61 72 61 74 65 20 66 72 |es}, sep|arate fr|
|00004000| 6f 6d 20 74 68 65 20 70 | 72 6f 63 65 73 73 65 73 |om the p|rocesses|
|00004010| 2e 20 20 49 6e 20 64 69 | 73 74 72 69 62 75 74 65 |. In di|stribute|
|00004020| 64 20 73 79 73 74 65 6d | 73 2c 20 64 75 65 0d 0a |d system|s, due..|
|00004030| 74 6f 20 63 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e |to commu|nication|
|00004040| 20 63 6f 73 74 73 2c 20 | 7b 5c 62 66 20 70 6f 72 | costs, |{\bf por|
|00004050| 74 73 7d 20 61 72 65 20 | 6f 66 74 65 6e 20 69 6d |ts} are |often im|
|00004060| 70 6c 65 6d 65 6e 74 65 | 64 20 69 6e 73 74 65 61 |plemente|d instea|
|00004070| 64 2e 0d 0a 55 6e 6c 69 | 6b 65 20 61 20 6d 61 69 |d...Unli|ke a mai|
|00004080| 6c 62 6f 78 2c 20 61 20 | 70 6f 72 74 20 69 73 20 |lbox, a |port is |
|00004090| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|000040a0| 61 20 73 70 65 63 69 66 | 69 63 20 70 72 6f 63 65 |a specif|ic proce|
|000040b0| 73 73 2e 20 20 41 6e 79 | 0d 0a 70 72 6f 63 65 73 |ss. Any|..proces|
|000040c0| 73 20 63 61 6e 20 73 65 | 6e 64 20 6d 65 73 73 61 |s can se|nd messa|
|000040d0| 67 65 73 20 74 6f 20 61 | 20 70 72 6f 63 65 73 73 |ges to a| process|
|000040e0| 27 20 70 6f 72 74 73 2c | 20 62 75 74 20 6f 6e 6c |' ports,| but onl|
|000040f0| 79 20 74 68 61 74 20 70 | 72 6f 63 65 73 73 0d 0a |y that p|rocess..|
|00004100| 63 61 6e 20 72 65 63 65 | 69 76 65 20 66 72 6f 6d |can rece|ive from|
|00004110| 20 69 74 2e 0d 0a 0d 0a | 09 5c 69 74 65 6d 5b 52 | it.....|.\item[R|
|00004120| 65 6d 6f 74 65 20 50 72 | 6f 63 65 64 75 72 65 20 |emote Pr|ocedure |
|00004130| 43 61 6c 6c 73 5d 20 61 | 72 65 20 61 20 66 6f 72 |Calls] a|re a for|
|00004140| 6d 20 6f 66 20 6d 65 73 | 73 61 67 65 20 70 61 73 |m of mes|sage pas|
|00004150| 73 69 6e 67 0d 0a 70 61 | 72 74 69 63 75 6c 61 72 |sing..pa|rticular|
|00004160| 6c 79 20 73 75 69 74 65 | 64 20 66 6f 72 20 64 69 |ly suite|d for di|
|00004170| 73 74 72 69 62 75 74 65 | 64 20 73 79 73 74 65 6d |stribute|d system|
|00004180| 73 2e 20 20 41 20 73 65 | 65 6d 69 6e 67 6c 79 20 |s. A se|emingly |
|00004190| 6e 6f 72 6d 61 6c 0d 0a | 70 72 6f 63 65 64 75 72 |normal..|procedur|
|000041a0| 65 20 63 61 6c 6c 20 69 | 73 20 61 63 74 75 61 6c |e call i|s actual|
|000041b0| 6c 79 20 69 6e 76 6f 6b | 65 64 20 6f 6e 20 61 6e |ly invok|ed on an|
|000041c0| 6f 74 68 65 72 20 6d 61 | 63 68 69 6e 65 2e 20 20 |other ma|chine. |
|000041d0| 52 50 43 27 73 20 61 72 | 65 20 61 0d 0a 66 6f 72 |RPC's ar|e a..for|
|000041e0| 6d 20 6f 66 20 7b 5c 62 | 66 20 73 79 6e 63 68 72 |m of {\b|f synchr|
|000041f0| 6f 6e 6f 75 73 7d 20 6d | 65 73 73 61 67 65 20 70 |onous} m|essage p|
|00004200| 61 73 73 69 6e 67 2c 20 | 61 73 20 74 68 65 20 63 |assing, |as the c|
|00004210| 61 6c 6c 65 72 20 69 73 | 20 73 75 73 70 65 6e 64 |aller is| suspend|
|00004220| 65 64 0d 0a 77 68 69 6c | 65 20 68 69 73 20 66 75 |ed..whil|e his fu|
|00004230| 6e 63 74 69 6f 6e 20 65 | 76 61 6c 75 61 74 65 73 |nction e|valuates|
|00004240| 2e 20 20 4e 65 76 65 72 | 74 68 65 6c 65 73 73 2c |. Never|theless,|
|00004250| 20 62 65 63 61 75 73 65 | 20 6f 66 20 74 68 65 20 | because| of the |
|00004260| 66 61 6d 69 6c 69 61 72 | 0d 0a 60 60 70 72 6f 63 |familiar|..``proc|
|00004270| 65 64 75 72 65 27 27 20 | 70 61 63 6b 61 67 69 6e |edure'' |packagin|
|00004280| 67 2c 20 52 50 43 27 73 | 20 61 72 65 20 62 65 63 |g, RPC's| are bec|
|00004290| 6f 6d 69 6e 67 20 69 6e | 63 72 65 61 73 69 6e 67 |oming in|creasing|
|000042a0| 6c 79 20 70 6f 70 75 6c | 61 72 20 61 6e 64 0d 0a |ly popul|ar and..|
|000042b0| 61 6c 6c 6f 77 20 64 69 | 73 74 72 69 62 75 74 65 |allow di|stribute|
|000042c0| 64 20 70 72 6f 67 72 61 | 6d 73 20 74 6f 20 62 65 |d progra|ms to be|
|000042d0| 20 71 75 69 63 6b 6c 79 | 20 62 75 69 6c 74 2e 0d | quickly| built..|
|000042e0| 0a 0d 0a 09 5c 69 74 65 | 6d 5b 50 69 70 65 73 5d |....\ite|m[Pipes]|
|000042f0| 20 70 72 6f 76 69 64 65 | 20 61 20 73 74 69 6c 6c | provide| a still|
|00004300| 20 6d 6f 72 65 20 72 65 | 73 74 72 69 63 74 69 76 | more re|strictiv|
|00004310| 65 20 69 6e 74 65 72 66 | 61 63 65 2e 0d 0a 50 6f |e interf|ace...Po|
|00004320| 70 75 6c 61 72 69 7a 65 | 64 20 62 79 20 74 68 65 |pularize|d by the|
|00004330| 20 55 4e 49 58 20 6f 70 | 65 72 61 74 69 6e 67 20 | UNIX op|erating |
|00004340| 73 79 73 74 65 6d 2c 20 | 70 69 70 65 73 20 70 72 |system, |pipes pr|
|00004350| 6f 76 69 64 65 20 61 20 | 6f 6e 65 2d 20 6f 72 0d |ovide a |one- or.|
|00004360| 0a 74 77 6f 2d 77 61 79 | 20 7b 5c 62 66 20 62 79 |.two-way| {\bf by|
|00004370| 74 65 20 73 74 72 65 61 | 6d 7d 20 62 65 74 77 65 |te strea|m} betwe|
|00004380| 65 6e 20 74 77 6f 20 70 | 72 6f 63 65 73 73 65 73 |en two p|rocesses|
|00004390| 2e 20 20 55 6e 6c 69 6b | 65 20 6d 65 73 73 61 67 |. Unlik|e messag|
|000043a0| 65 0d 0a 73 79 73 74 65 | 6d 73 2c 20 70 69 70 65 |e..syste|ms, pipe|
|000043b0| 73 20 61 72 65 20 70 6f | 69 6e 74 2d 74 6f 2d 70 |s are po|int-to-p|
|000043c0| 6f 69 6e 74 20 65 73 74 | 61 62 6c 69 73 68 65 64 |oint est|ablished|
|000043d0| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 73 2e 20 20 43 | connect|ions. C|
|000043e0| 6f 6e 6e 65 63 74 69 6f | 6e 0d 0a 73 65 74 75 70 |onnectio|n..setup|
|000043f0| 20 61 6e 64 20 74 68 65 | 20 63 6f 70 79 69 6e 67 | and the| copying|
|00004400| 20 6f 66 20 64 61 74 61 | 20 74 68 72 6f 75 67 68 | of data| through|
|00004410| 20 74 68 65 20 70 69 70 | 65 20 61 64 64 20 74 6f | the pip|e add to|
|00004420| 20 74 68 65 20 70 69 70 | 65 0d 0a 70 72 6f 74 6f | the pip|e..proto|
|00004430| 63 6f 6c 27 73 20 63 6f | 73 74 2e 20 20 57 68 61 |col's co|st. Wha|
|00004440| 74 27 73 20 6d 6f 72 65 | 2c 20 64 61 74 61 20 6d |t's more|, data m|
|00004450| 75 73 74 20 62 65 20 66 | 6f 72 6d 61 74 74 65 64 |ust be f|ormatted|
|00004460| 20 69 6e 74 6f 20 61 20 | 73 74 72 65 61 6d 20 6f | into a |stream o|
|00004470| 66 0d 0a 62 79 74 65 73 | 20 6f 6e 20 74 68 65 20 |f..bytes| on the |
|00004480| 74 72 61 6e 73 6d 69 74 | 74 69 6e 67 20 65 6e 64 |transmit|ting end|
|00004490| 2c 20 61 6e 64 20 74 68 | 65 6e 20 72 65 66 6f 72 |, and th|en refor|
|000044a0| 6d 61 74 74 65 64 20 69 | 6e 74 6f 20 75 73 61 62 |matted i|nto usab|
|000044b0| 6c 65 20 64 61 74 61 0d | 0a 6f 6e 20 74 68 65 20 |le data.|.on the |
|000044c0| 72 65 63 65 69 76 69 6e | 67 20 65 6e 64 2e 20 20 |receivin|g end. |
|000044d0| 59 65 74 20 74 68 65 73 | 65 20 76 65 72 79 20 72 |Yet thes|e very r|
|000044e0| 65 73 74 72 69 63 74 69 | 6f 6e 73 20 68 61 76 65 |estricti|ons have|
|000044f0| 20 65 6e 63 6f 75 72 61 | 67 65 64 20 61 0d 0a 75 | encoura|ged a..u|
|00004500| 6e 69 66 6f 72 6d 20 69 | 6e 74 65 72 63 68 61 6e |niform i|nterchan|
|00004510| 67 65 61 62 6c 65 20 69 | 6e 74 65 72 66 61 63 65 |geable i|nterface|
|00004520| 20 66 6f 72 20 70 72 6f | 67 72 61 6d 73 2c 20 61 | for pro|grams, a|
|00004530| 20 70 72 69 7a 65 64 20 | 61 73 70 65 63 74 20 6f | prized |aspect o|
|00004540| 66 20 74 68 65 0d 0a 55 | 4e 49 58 20 6f 70 65 72 |f the..U|NIX oper|
|00004550| 61 74 69 6e 67 20 73 79 | 73 74 65 6d 2e 0d 0a 0d |ating sy|stem....|
|00004560| 0a 5c 65 6e 64 7b 64 65 | 73 63 72 69 70 74 69 6f |.\end{de|scriptio|
|00004570| 6e 7d 0d 0a 0d 0a 0d 0a | 5c 73 75 62 73 65 63 74 |n}......|\subsect|
|00004580| 69 6f 6e 7b 52 65 73 6f | 75 72 63 65 20 4d 61 6e |ion{Reso|urce Man|
|00004590| 61 67 65 6d 65 6e 74 7d | 0d 0a 0d 0a 49 74 20 69 |agement}|....It i|
|000045a0| 73 20 6e 6f 74 20 65 6e | 6f 75 67 68 20 74 6f 20 |s not en|ough to |
|000045b0| 6a 75 73 74 20 74 6f 20 | 65 78 63 68 61 6e 67 65 |just to |exchange|
|000045c0| 20 72 65 73 6f 75 72 63 | 65 73 20 61 6e 64 20 69 | resourc|es and i|
|000045d0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 20 20 41 0d 0a |nformati|on. A..|
|000045e0| 63 6f 6e 63 75 72 72 65 | 6e 74 20 65 6e 76 69 72 |concurre|nt envir|
|000045f0| 6f 6e 6d 65 6e 74 20 6d | 75 73 74 20 6d 61 6e 61 |onment m|ust mana|
|00004600| 67 65 20 69 74 73 20 72 | 65 73 6f 75 72 63 65 73 |ge its r|esources|
|00004610| 2e 20 20 41 73 20 74 72 | 75 65 20 77 69 74 68 20 |. As tr|ue with |
|00004620| 6d 6f 73 74 0d 0a 6d 61 | 6e 61 67 65 6d 65 6e 74 |most..ma|nagement|
|00004630| 20 73 63 69 65 6e 63 65 | 2c 20 74 68 65 72 65 20 | science|, there |
|00004640| 61 72 65 20 66 65 77 20 | 61 67 72 65 65 64 2d 75 |are few |agreed-u|
|00004650| 70 6f 6e 20 62 65 73 74 | 20 6d 65 74 68 6f 64 73 |pon best| methods|
|00004660| 2e 20 20 48 6f 77 65 76 | 65 72 2c 0d 0a 61 6c 6c |. Howev|er,..all|
|00004670| 20 70 72 6f 63 65 73 73 | 65 73 20 6d 75 73 74 20 | process|es must |
|00004680| 61 67 72 65 65 20 75 70 | 6f 6e 20 7b 5c 65 6d 20 |agree up|on {\em |
|00004690| 61 7d 20 6d 65 74 68 6f | 64 20 66 6f 72 20 6d 61 |a} metho|d for ma|
|000046a0| 6e 61 67 69 6e 67 20 72 | 65 73 6f 75 72 63 65 73 |naging r|esources|
|000046b0| 2e 0d 0a 7b 5c 62 66 20 | 44 65 61 64 6c 6f 63 6b |...{\bf |Deadlock|
|000046c0| 7d 20 69 73 20 61 20 74 | 79 70 69 63 61 6c 20 70 |} is a t|ypical p|
|000046d0| 72 6f 62 6c 65 6d 20 69 | 6e 20 72 65 73 6f 75 72 |roblem i|n resour|
|000046e0| 63 65 20 6d 61 6e 61 67 | 65 6d 65 6e 74 2c 20 77 |ce manag|ement, w|
|000046f0| 68 65 6e 2c 0d 0a 73 69 | 6d 75 6c 74 61 6e 65 6f |hen,..si|multaneo|
|00004700| 75 73 6c 79 2c 20 61 20 | 73 65 74 20 6f 66 20 70 |usly, a |set of p|
|00004710| 72 6f 63 65 73 73 65 73 | 20 65 61 63 68 20 74 72 |rocesses| each tr|
|00004720| 79 20 63 6c 61 69 6d 20 | 72 65 73 6f 75 72 63 65 |y claim |resource|
|00004730| 73 20 74 68 61 74 0d 0a | 61 6e 6f 74 68 65 72 20 |s that..|another |
|00004740| 6f 6e 65 20 6f 66 20 74 | 68 65 6d 20 6f 77 6e 73 |one of t|hem owns|
|00004750| 2e 20 20 41 6e 6f 74 68 | 65 72 20 6d 6f 72 65 20 |. Anoth|er more |
|00004760| 73 75 62 74 6c 65 20 70 | 72 6f 62 6c 65 6d 20 69 |subtle p|roblem i|
|00004770| 73 20 7b 5c 62 66 0d 0a | 4c 69 76 65 6c 6f 63 6b |s {\bf..|Livelock|
|00004780| 7d 3b 20 20 68 65 72 65 | 20 64 65 61 64 6c 6f 63 |}; here| deadloc|
|00004790| 6b 20 69 73 20 62 72 6f | 6b 65 6e 2c 20 62 75 74 |k is bro|ken, but|
|000047a0| 20 77 68 65 6e 20 74 68 | 65 20 70 72 6f 63 65 73 | when th|e proces|
|000047b0| 73 65 73 20 72 65 74 72 | 69 65 73 0d 0a 74 68 65 |ses retr|ies..the|
|000047c0| 20 73 69 74 75 61 74 69 | 6f 6e 20 6f 63 63 75 72 | situati|on occur|
|000047d0| 73 20 61 67 61 69 6e 20 | 61 6e 64 20 61 67 61 69 |s again |and agai|
|000047e0| 6e 2e 20 20 41 6e 6f 74 | 68 65 72 20 73 69 6d 69 |n. Anot|her simi|
|000047f0| 6c 61 72 20 61 6e 64 20 | 73 75 62 74 6c 65 0d 0a |lar and |subtle..|
|00004800| 73 69 74 75 61 74 69 6f | 6e 20 69 73 20 70 72 6f |situatio|n is pro|
|00004810| 63 65 73 73 20 7b 5c 62 | 66 20 73 74 61 72 76 61 |cess {\b|f starva|
|00004820| 74 69 6f 6e 7d 3b 20 66 | 6f 72 20 65 78 61 6d 70 |tion}; f|or examp|
|00004830| 6c 65 20 77 68 65 6e 20 | 74 68 65 20 72 65 61 64 |le when |the read|
|00004840| 65 72 73 20 6f 66 0d 0a | 61 20 66 69 6c 65 20 63 |ers of..|a file c|
|00004850| 6f 6d 65 20 61 6e 64 20 | 67 6f 20 73 6f 20 66 72 |ome and |go so fr|
|00004860| 65 71 75 65 6e 74 6c 79 | 20 74 68 61 74 20 61 20 |equently| that a |
|00004870| 77 72 69 74 65 72 20 70 | 72 6f 63 65 73 73 20 63 |writer p|rocess c|
|00004880| 61 6e 20 6e 65 76 65 72 | 0d 0a 77 72 69 74 65 2e |an never|..write.|
|00004890| 20 20 48 65 72 65 20 61 | 72 65 20 73 6f 6d 65 20 | Here a|re some |
|000048a0| 74 79 70 69 63 61 6c 20 | 72 65 73 6f 75 72 63 65 |typical |resource|
|000048b0| 73 2c 20 61 6e 64 20 68 | 6f 77 20 74 68 65 79 20 |s, and h|ow they |
|000048c0| 6d 61 79 20 62 65 20 6d | 61 6e 61 67 65 64 3a 0d |may be m|anaged:.|
|000048d0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 64 65 73 63 72 69 |...\begi|n{descri|
|000048e0| 70 74 69 6f 6e 7d 0d 0a | 0d 0a 09 5c 69 74 65 6d |ption}..|...\item|
|000048f0| 5b 50 72 6f 63 65 73 73 | 6f 72 5d 20 6d 61 6e 61 |[Process|or] mana|
|00004900| 67 65 6d 65 6e 74 20 69 | 73 20 74 68 65 20 6d 6f |gement i|s the mo|
|00004910| 73 74 20 66 75 6e 64 61 | 6d 65 6e 74 61 6c 20 70 |st funda|mental p|
|00004920| 61 72 74 20 6f 66 20 61 | 0d 0a 6d 75 6c 74 69 74 |art of a|..multit|
|00004930| 61 73 6b 69 6e 67 20 65 | 6e 76 69 72 6f 6e 6d 65 |asking e|nvironme|
|00004940| 6e 74 2e 20 20 50 72 6f | 63 65 73 73 6f 72 73 20 |nt. Pro|cessors |
|00004950| 6d 75 73 74 20 62 65 20 | 64 79 6e 61 6d 69 63 61 |must be |dynamica|
|00004960| 6c 6c 79 20 61 6c 6c 6f | 63 61 74 65 64 20 74 6f |lly allo|cated to|
|00004970| 0d 0a 64 69 66 66 65 72 | 65 6e 74 20 74 61 73 6b |..differ|ent task|
|00004980| 73 2e 20 20 55 73 75 61 | 6c 6c 79 20 74 68 69 73 |s. Usua|lly this|
|00004990| 20 69 73 20 64 6f 6e 65 | 20 62 79 20 61 20 73 65 | is done| by a se|
|000049a0| 70 61 72 61 74 65 20 74 | 61 73 6b 20 63 61 6c 6c |parate t|ask call|
|000049b0| 65 64 20 61 0d 0a 7b 5c | 62 66 20 73 63 68 65 64 |ed a..{\|bf sched|
|000049c0| 75 6c 65 72 7d 2e 20 20 | 54 68 65 20 73 69 6d 70 |uler}. |The simp|
|000049d0| 6c 65 73 74 20 73 63 68 | 65 6d 65 20 69 73 20 7b |lest sch|eme is {|
|000049e0| 5c 62 66 20 72 6f 75 6e | 64 2d 72 6f 62 62 69 6e |\bf roun|d-robbin|
|000049f0| 7d 0d 0a 73 63 68 65 64 | 75 6c 69 6e 67 2c 20 63 |}..sched|uling, c|
|00004a00| 69 72 63 6c 69 6e 67 20 | 74 68 72 6f 75 67 68 20 |ircling |through |
|00004a10| 65 61 63 68 20 74 61 73 | 6b 2c 20 65 78 65 63 75 |each tas|k, execu|
|00004a20| 74 69 6e 67 20 69 74 20 | 66 6f 72 20 6f 6e 6c 79 |ting it |for only|
|00004a30| 20 61 20 75 6e 69 74 0d | 0a 6f 66 20 74 69 6d 65 | a unit.|.of time|
|00004a40| 20 28 61 20 7b 5c 62 66 | 20 74 69 6d 65 20 71 75 | (a {\bf| time qu|
|00004a50| 61 6e 74 61 7d 29 20 6f | 72 20 75 6e 74 69 6c 20 |anta}) o|r until |
|00004a60| 69 74 20 72 65 6c 69 71 | 75 69 73 68 65 73 20 63 |it reliq|uishes c|
|00004a70| 6f 6e 74 72 6f 6c 2e 0d | 0a 55 73 75 61 6c 6c 79 |ontrol..|.Usually|
|00004a80| 2c 20 68 6f 77 65 76 65 | 72 2c 20 74 68 69 73 20 |, howeve|r, this |
|00004a90| 73 63 68 65 6d 65 20 69 | 73 20 6e 6f 74 20 61 64 |scheme i|s not ad|
|00004aa0| 65 71 75 61 74 65 2e 20 | 20 53 75 70 70 6f 73 65 |equate. | Suppose|
|00004ab0| 20 61 20 74 61 73 6b 20 | 69 73 0d 0a 73 69 6d 70 | a task |is..simp|
|00004ac0| 6c 79 20 69 64 6c 65 20 | 77 61 69 74 69 6e 67 20 |ly idle |waiting |
|00004ad0| 66 6f 72 20 61 20 6b 65 | 79 73 74 72 6f 6b 65 3f |for a ke|ystroke?|
|00004ae0| 20 20 4f 72 20 73 75 70 | 70 6f 73 65 20 61 20 74 | Or sup|pose a t|
|00004af0| 61 73 6b 20 69 73 0d 0a | 74 69 6d 65 2d 63 72 69 |ask is..|time-cri|
|00004b00| 74 69 63 61 6c 2c 20 61 | 6e 64 20 6d 75 73 74 20 |tical, a|nd must |
|00004b10| 72 65 63 65 69 76 65 20 | 61 20 63 68 61 72 61 63 |receive |a charac|
|00004b20| 74 65 72 20 66 72 6f 6d | 20 61 20 73 65 72 69 61 |ter from| a seria|
|00004b30| 6c 20 70 6f 72 74 2e 20 | 20 52 65 61 6c 0d 0a 73 |l port. | Real..s|
|00004b40| 63 68 65 64 75 6c 65 72 | 73 20 6d 75 73 74 20 73 |cheduler|s must s|
|00004b50| 75 73 70 65 6e 64 20 77 | 68 65 6e 20 74 68 65 79 |uspend w|hen they|
|00004b60| 20 61 72 65 20 61 77 61 | 69 74 69 6e 67 20 72 65 | are awa|iting re|
|00004b70| 73 6f 75 72 63 65 73 20 | 5c 26 20 6d 65 73 73 61 |sources |\& messa|
|00004b80| 67 65 73 20 61 6e 64 0d | 0a 6d 75 73 74 20 70 72 |ges and.|.must pr|
|00004b90| 69 6f 72 69 74 69 7a 65 | 20 74 61 73 6b 73 20 61 |ioritize| tasks a|
|00004ba0| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 74 68 65 69 |ccording| to thei|
|00004bb0| 72 20 74 69 6d 65 6c 69 | 6e 65 73 73 2e 20 20 41 |r timeli|ness. A|
|00004bc0| 6c 73 6f 2c 20 74 68 65 | 79 20 6d 75 73 74 20 74 |lso, the|y must t|
|00004bd0| 61 6b 65 20 69 6e 74 6f | 0d 0a 63 6f 6e 73 69 64 |ake into|..consid|
|00004be0| 65 72 61 74 69 6f 6e 20 | 68 6f 77 20 6c 6f 6e 67 |eration |how long|
|00004bf0| 20 74 68 65 20 74 61 73 | 6b 20 68 61 73 20 68 61 | the tas|k has ha|
|00004c00| 64 20 74 6f 20 65 78 65 | 63 75 74 65 2c 20 61 6e |d to exe|cute, an|
|00004c10| 64 20 68 6f 77 20 66 72 | 65 71 75 65 6e 74 6c 79 |d how fr|equently|
|00004c20| 0d 0a 69 74 20 68 61 73 | 20 65 78 65 63 75 74 65 |..it has| execute|
|00004c30| 64 2c 20 74 6f 20 73 65 | 65 20 65 61 63 68 20 74 |d, to se|e each t|
|00004c40| 61 73 6b 20 67 65 74 73 | 20 69 74 73 20 66 61 69 |ask gets| its fai|
|00004c50| 72 20 73 68 61 72 65 2e | 20 20 49 6e 20 61 64 64 |r share.| In add|
|00004c60| 69 74 69 6f 6e 2c 20 61 | 0d 0a 73 63 68 65 64 75 |ition, a|..schedu|
|00004c70| 6c 65 72 20 6d 61 79 20 | 63 6f 6e 73 69 64 65 72 |ler may |consider|
|00004c80| 20 74 68 65 20 74 61 73 | 6b 27 73 20 68 69 73 74 | the tas|k's hist|
|00004c90| 6f 72 79 20 28 62 69 67 | 20 74 61 73 6b 2c 20 73 |ory (big| task, s|
|00004ca0| 6d 61 6c 6c 20 74 61 73 | 6b 3b 20 43 50 55 0d 0a |mall tas|k; CPU..|
|00004cb0| 62 6f 75 6e 64 2c 20 49 | 2f 4f 20 62 6f 75 6e 64 |bound, I|/O bound|
|00004cc0| 29 2e 20 20 41 6e 64 20 | 61 73 20 74 68 65 20 73 |). And |as the s|
|00004cd0| 63 68 65 64 75 6c 65 72 | 20 67 72 6f 77 73 20 6d |cheduler| grows m|
|00004ce0| 6f 72 65 20 63 6f 6d 70 | 6c 65 78 2c 20 74 68 65 |ore comp|lex, the|
|00004cf0| 0d 0a 64 65 73 69 67 6e | 65 72 20 6d 75 73 74 20 |..design|er must |
|00004d00| 65 76 65 6e 20 63 6f 6e | 73 69 64 65 72 20 68 6f |even con|sider ho|
|00004d10| 77 20 6d 75 63 68 20 74 | 69 6d 65 20 7b 5c 65 6d |w much t|ime {\em|
|00004d20| 20 74 68 65 20 73 63 68 | 65 64 75 6c 65 72 7d 20 | the sch|eduler} |
|00004d30| 6d 61 6b 69 6e 67 20 61 | 0d 0a 64 65 63 69 73 69 |making a|..decisi|
|00004d40| 6f 6e 2e 20 20 49 6e 20 | 73 68 6f 72 74 2c 20 67 |on. In |short, g|
|00004d50| 6f 6f 64 20 73 63 68 65 | 64 75 6c 65 72 20 64 65 |ood sche|duler de|
|00004d60| 73 69 67 6e 20 69 73 20 | 63 6f 6d 70 6c 65 78 3b |sign is |complex;|
|00004d70| 20 20 69 74 20 72 65 71 | 75 69 72 65 73 0d 0a 75 | it req|uires..u|
|00004d80| 6e 64 65 72 73 74 61 6e | 64 69 6e 67 2c 20 65 78 |nderstan|ding, ex|
|00004d90| 70 65 72 69 65 6e 63 65 | 2c 20 61 6e 64 20 61 20 |perience|, and a |
|00004da0| 74 6f 75 63 68 20 6f 66 | 20 62 6c 61 63 6b 20 6d |touch of| black m|
|00004db0| 61 67 69 63 2e 0d 0a 0d | 0a 09 5c 69 74 65 6d 5b |agic....|..\item[|
|00004dc0| 52 61 6e 64 6f 6d 20 41 | 63 63 65 73 73 20 4d 65 |Random A|ccess Me|
|00004dd0| 6d 6f 72 79 5d 20 69 73 | 20 61 20 72 65 73 6f 75 |mory] is| a resou|
|00004de0| 72 63 65 20 61 6e 64 20 | 69 73 20 75 73 75 61 6c |rce and |is usual|
|00004df0| 6c 79 20 69 6e 74 69 6d | 61 74 65 6c 79 0d 0a 74 |ly intim|ately..t|
|00004e00| 69 65 64 20 77 69 74 68 | 20 6d 75 6c 74 69 74 61 |ied with| multita|
|00004e10| 73 6b 69 6e 67 20 65 6e | 76 69 72 6f 6e 6d 65 6e |sking en|vironmen|
|00004e20| 74 2e 20 20 4f 66 74 65 | 6e 2c 20 65 73 70 65 63 |t. Ofte|n, espec|
|00004e30| 69 61 6c 6c 79 20 69 6e | 20 73 74 61 63 6b 2d 62 |ially in| stack-b|
|00004e40| 61 73 65 64 0d 0a 6c 61 | 6e 67 75 61 67 65 73 2c |ased..la|nguages,|
|00004e50| 20 74 68 69 73 20 72 65 | 73 6f 75 72 63 65 20 69 | this re|source i|
|00004e60| 73 20 74 61 6b 65 6e 20 | 66 6f 72 20 67 72 61 6e |s taken |for gran|
|00004e70| 74 65 64 3b 20 74 68 65 | 20 70 72 6f 67 72 61 6d |ted; the| program|
|00004e80| 0d 0a 64 79 6e 61 6d 69 | 63 61 6c 6c 79 20 61 6c |..dynami|cally al|
|00004e90| 6c 6f 63 61 74 65 73 20 | 73 74 61 63 6b 20 61 6e |locates |stack an|
|00004ea0| 64 20 68 65 61 70 20 6d | 65 6d 6f 72 79 20 61 73 |d heap m|emory as|
|00004eb0| 20 6e 65 65 64 65 64 2e | 20 20 48 6f 77 65 76 65 | needed.| Howeve|
|00004ec0| 72 2c 20 61 0d 0a 6d 75 | 6c 74 69 74 61 73 6b 65 |r, a..mu|ltitaske|
|00004ed0| 72 20 63 61 6e 6e 6f 74 | 20 6d 61 6b 65 20 73 75 |r cannot| make su|
|00004ee0| 63 68 20 61 73 73 75 6d | 70 74 69 6f 6e 73 3b 20 |ch assum|ptions; |
|00004ef0| 64 79 6e 61 6d 69 63 20 | 6d 65 6d 6f 72 79 20 61 |dynamic |memory a|
|00004f00| 6c 6c 6f 63 61 74 69 6f | 6e 0d 0a 74 61 6b 65 73 |llocatio|n..takes|
|00004f10| 20 74 69 6d 65 20 61 6e | 64 20 72 65 73 6f 75 72 | time an|d resour|
|00004f20| 63 65 73 20 74 6f 6f 20 | 63 6f 73 74 6c 79 20 66 |ces too |costly f|
|00004f30| 6f 72 20 69 74 73 20 74 | 69 6d 65 2d 63 72 69 74 |or its t|ime-crit|
|00004f40| 69 63 61 6c 20 70 72 69 | 6d 69 74 69 76 65 0d 0a |ical pri|mitive..|
|00004f50| 66 75 6e 63 74 69 6f 6e | 73 2e 20 20 4d 6f 73 74 |function|s. Most|
|00004f60| 20 6f 66 74 65 6e 2c 20 | 61 20 6d 75 6c 74 69 74 | often, |a multit|
|00004f70| 61 73 6b 65 72 27 73 20 | 6d 65 6d 6f 72 79 20 6d |asker's |memory m|
|00004f80| 61 6e 61 67 65 6d 65 6e | 74 20 69 73 20 74 69 67 |anagemen|t is tig|
|00004f90| 68 74 6c 79 0d 0a 64 65 | 73 69 67 6e 65 64 20 61 |htly..de|signed a|
|00004fa0| 72 6f 75 6e 64 20 74 68 | 65 20 68 61 72 64 77 61 |round th|e hardwa|
|00004fb0| 72 65 27 73 20 63 61 70 | 61 62 69 6c 69 74 69 65 |re's cap|abilitie|
|00004fc0| 73 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |s. For |example,|
|00004fd0| 20 6d 61 6e 79 0d 0a 77 | 6f 72 6b 73 74 61 74 69 | many..w|orkstati|
|00004fe0| 6f 6e 20 61 6e 64 20 6c | 61 72 67 65 72 20 65 6e |on and l|arger en|
|00004ff0| 76 69 72 6f 6e 6d 65 6e | 74 73 20 68 61 76 65 20 |vironmen|ts have |
|00005000| 7b 5c 62 66 20 76 69 72 | 74 75 61 6c 20 6d 65 6d |{\bf vir|tual mem|
|00005010| 6f 72 79 7d 2c 0d 0a 61 | 6c 6c 6f 77 69 6e 67 20 |ory},..a|llowing |
|00005020| 65 61 63 68 20 70 72 6f | 63 65 73 73 20 61 20 63 |each pro|cess a c|
|00005030| 6f 6e 74 69 67 75 6f 75 | 73 20 61 64 64 72 65 73 |ontiguou|s addres|
|00005040| 73 20 73 70 61 63 65 20 | 77 68 69 63 68 20 69 73 |s space |which is|
|00005050| 20 6d 75 63 68 20 6c 61 | 72 67 65 72 0d 0a 74 68 | much la|rger..th|
|00005060| 61 6e 20 70 68 79 73 69 | 63 61 6c 20 6d 65 6d 6f |an physi|cal memo|
|00005070| 72 79 2c 20 62 79 20 73 | 77 61 70 70 69 6e 67 20 |ry, by s|wapping |
|00005080| 69 6e 20 6d 65 6d 6f 72 | 79 20 66 72 6f 6d 20 73 |in memor|y from s|
|00005090| 65 63 6f 6e 64 61 72 79 | 20 73 74 6f 72 61 67 65 |econdary| storage|
|000050a0| 20 61 73 0d 0a 69 74 20 | 69 73 20 61 63 63 65 73 | as..it |is acces|
|000050b0| 73 65 64 2e 20 20 0d 0a | 0d 0a 09 5c 69 74 65 6d |sed. ..|...\item|
|000050c0| 5b 53 65 63 6f 6e 64 61 | 72 79 20 53 74 6f 72 61 |[Seconda|ry Stora|
|000050d0| 67 65 20 44 65 76 69 63 | 65 73 5d 20 61 72 65 20 |ge Devic|es] are |
|000050e0| 6e 65 78 74 20 69 6e 20 | 6c 69 6e 65 20 69 6e 20 |next in |line in |
|000050f0| 61 20 6d 75 6c 74 69 74 | 61 73 6b 65 72 27 73 0d |a multit|asker's.|
|00005100| 0a 63 6f 6d 70 6c 65 78 | 20 6d 61 6e 61 67 65 6d |.complex| managem|
|00005110| 65 6e 74 20 73 63 68 65 | 6d 65 2e 20 20 41 73 20 |ent sche|me. As |
|00005120| 77 65 6c 6c 20 61 73 20 | 69 74 73 20 75 73 65 20 |well as |its use |
|00005130| 66 6f 72 20 76 69 72 74 | 75 61 6c 20 6d 65 6d 6f |for virt|ual memo|
|00005140| 72 79 0d 0a 7b 5c 62 66 | 20 70 61 67 65 20 73 77 |ry..{\bf| page sw|
|00005150| 61 70 70 69 6e 67 7d 2c | 20 68 61 72 64 20 64 69 |apping},| hard di|
|00005160| 73 6b 73 20 61 6e 64 20 | 74 61 70 65 73 20 6f 66 |sks and |tapes of|
|00005170| 74 65 6e 20 63 6f 6e 74 | 61 69 6e 20 61 6e 20 69 |ten cont|ain an i|
|00005180| 6e 74 72 69 63 61 74 65 | 0d 0a 66 69 6c 65 20 73 |ntricate|..file s|
|00005190| 79 73 74 65 6d 20 77 68 | 69 63 68 20 74 68 65 20 |ystem wh|ich the |
|000051a0| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|000051b0| 20 6d 75 73 74 20 6d 61 | 6e 61 67 65 2e 20 20 54 | must ma|nage. T|
|000051c0| 6f 20 73 75 70 70 6f 72 | 74 20 0d 0a 63 6f 6d 70 |o suppor|t ..comp|
|000051d0| 6c 65 78 2c 20 6d 75 6c | 74 69 2d 75 73 65 72 20 |lex, mul|ti-user |
|000051e0| 64 61 74 61 62 61 73 65 | 20 61 70 70 6c 69 63 61 |database| applica|
|000051f0| 74 69 6f 6e 73 2c 20 6f | 70 65 72 61 74 69 6e 67 |tions, o|perating|
|00005200| 20 73 79 73 74 65 6d 73 | 20 6f 66 74 65 6e 20 70 | systems| often p|
|00005210| 72 6f 76 69 64 65 0d 0a | 7b 5c 62 66 20 6c 6f 63 |rovide..|{\bf loc|
|00005220| 6b 69 6e 67 7d 20 6f 6e | 20 74 68 65 20 66 69 6c |king} on| the fil|
|00005230| 65 20 6c 65 76 65 6c 2c | 20 6f 72 20 65 76 65 6e |e level,| or even|
|00005240| 20 6f 6e 20 72 65 63 6f | 72 64 73 20 77 69 74 68 | on reco|rds with|
|00005250| 69 6e 20 74 68 65 20 66 | 69 6c 65 2e 0d 0a 41 6e |in the f|ile...An|
|00005260| 64 20 69 6e 20 6f 70 74 | 69 6d 69 7a 65 64 20 73 |d in opt|imized s|
|00005270| 79 73 74 65 6d 73 2c 20 | 74 68 65 20 70 65 6e 64 |ystems, |the pend|
|00005280| 69 6e 67 20 64 69 73 6b | 20 61 63 63 65 73 73 65 |ing disk| accesse|
|00005290| 73 20 6f 66 20 6d 75 6c | 74 69 70 6c 65 20 74 61 |s of mul|tiple ta|
|000052a0| 73 6b 73 0d 0a 6d 61 79 | 20 62 65 20 6f 72 67 61 |sks..may| be orga|
|000052b0| 6e 69 7a 65 64 20 61 63 | 63 6f 72 64 69 6e 67 20 |nized ac|cording |
|000052c0| 74 6f 20 74 68 65 20 68 | 65 61 64 20 70 6f 73 69 |to the h|ead posi|
|000052d0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 64 69 73 6b |tion of |the disk|
|000052e0| 2e 0d 0a 0d 0a 0d 0a 09 | 5c 69 74 65 6d 5b 4e 65 |........|\item[Ne|
|000052f0| 74 77 6f 72 6b 20 44 65 | 76 69 63 65 73 5d 20 61 |twork De|vices] a|
|00005300| 72 65 20 6e 6f 77 20 70 | 6c 61 79 69 6e 67 20 61 |re now p|laying a|
|00005310| 6e 20 69 6e 63 72 65 61 | 73 69 6e 67 20 72 6f 6c |n increa|sing rol|
|00005320| 65 20 69 6e 20 6f 70 65 | 72 61 74 69 6e 67 0d 0a |e in ope|rating..|
|00005330| 73 79 73 74 65 6d 73 2c | 20 20 74 6f 20 74 68 65 |systems,| to the|
|00005340| 20 70 6f 69 6e 74 20 74 | 6f 20 77 68 65 72 65 20 | point t|o where |
|00005350| 6e 65 61 72 6c 79 20 68 | 61 6c 66 20 74 68 65 20 |nearly h|alf the |
|00005360| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00005370| 20 6d 61 79 0d 0a 62 65 | 20 64 65 64 69 63 61 74 | may..be| dedicat|
|00005380| 65 64 20 74 6f 20 6e 65 | 74 77 6f 72 6b 20 63 6f |ed to ne|twork co|
|00005390| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 73 21 20 28 61 |mmunicat|ions! (a|
|000053a0| 73 20 69 73 20 74 68 65 | 20 63 61 73 65 20 77 69 |s is the| case wi|
|000053b0| 74 68 20 73 6f 6d 65 20 | 6f 66 0d 0a 74 68 65 20 |th some |of..the |
|000053c0| 6e 65 74 77 6f 72 6b 65 | 64 20 76 65 72 73 69 6f |networke|d versio|
|000053d0| 6e 73 20 6f 66 20 55 4e | 49 58 29 2e 20 20 4f 66 |ns of UN|IX). Of|
|000053e0| 74 65 6e 20 61 20 73 69 | 6e 67 6c 65 20 6e 65 74 |ten a si|ngle net|
|000053f0| 77 6f 72 6b 20 63 6f 6e | 6e 65 63 74 69 6f 6e 0d |work con|nection.|
|00005400| 0a 69 73 20 7b 5c 62 66 | 20 6d 75 6c 74 69 70 6c |.is {\bf| multipl|
|00005410| 65 78 65 64 7d 20 62 65 | 74 77 65 65 6e 20 73 65 |exed} be|tween se|
|00005420| 76 65 72 61 6c 20 70 72 | 6f 63 65 73 73 65 73 2c |veral pr|ocesses,|
|00005430| 20 61 6e 64 20 74 68 65 | 20 6f 70 65 72 61 74 69 | and the| operati|
|00005440| 6e 67 0d 0a 73 79 73 74 | 65 6d 20 77 69 6c 6c 20 |ng..syst|em will |
|00005450| 65 6d 75 6c 61 74 65 20 | 69 74 73 20 69 6e 74 65 |emulate |its inte|
|00005460| 72 70 72 6f 63 65 73 73 | 20 63 6f 6d 6d 75 6e 69 |rprocess| communi|
|00005470| 63 61 74 69 6f 6e 20 70 | 72 6f 74 6f 63 6f 6c 20 |cation p|rotocol |
|00005480| 28 61 73 0d 0a 70 69 70 | 65 73 29 20 6f 76 65 72 |(as..pip|es) over|
|00005490| 20 74 68 65 20 6e 65 74 | 77 6f 72 6b 20 62 65 74 | the net|work bet|
|000054a0| 77 65 65 6e 20 70 72 6f | 63 65 73 73 65 73 20 6f |ween pro|cesses o|
|000054b0| 6e 20 64 69 66 66 65 72 | 65 6e 74 20 6d 61 63 68 |n differ|ent mach|
|000054c0| 69 6e 65 73 2e 0d 0a 0d | 0a 09 5c 69 74 65 6d 5b |ines....|..\item[|
|000054d0| 55 73 65 72 20 44 65 76 | 69 63 65 73 5d 20 61 72 |User Dev|ices] ar|
|000054e0| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 74 6f 20 62 |e beginn|ing to b|
|000054f0| 65 20 6d 75 6c 74 69 70 | 6c 65 78 65 64 20 61 73 |e multip|lexed as|
|00005500| 20 77 65 6c 6c 2e 20 20 | 4f 6e 0d 0a 67 72 61 70 | well. |On..grap|
|00005510| 68 69 63 73 20 74 65 72 | 6d 69 6e 61 6c 73 2c 20 |hics ter|minals, |
|00005520| 6f 66 74 65 6e 20 61 20 | 77 69 6e 64 6f 77 20 69 |often a |window i|
|00005530| 73 20 64 65 64 69 63 61 | 74 65 64 20 74 6f 20 65 |s dedica|ted to e|
|00005540| 61 63 68 0d 0a 70 72 6f | 63 65 73 73 2e 20 20 53 |ach..pro|cess. S|
|00005550| 74 61 6e 64 61 72 64 73 | 2c 20 61 73 20 4d 69 63 |tandards|, as Mic|
|00005560| 72 6f 73 6f 66 74 27 73 | 20 50 72 65 73 65 6e 74 |rosoft's| Present|
|00005570| 61 74 69 6f 6e 20 4d 61 | 6e 61 67 65 72 2c 20 61 |ation Ma|nager, a|
|00005580| 72 65 0d 0a 65 6d 65 72 | 67 69 6e 67 20 77 68 69 |re..emer|ging whi|
|00005590| 63 68 20 61 6c 6c 6f 77 | 20 61 20 63 6f 6e 73 69 |ch allow| a consi|
|000055a0| 73 74 65 6e 74 20 6d 75 | 6c 74 69 74 61 73 6b 69 |stent mu|ltitaski|
|000055b0| 6e 67 20 69 6e 74 65 72 | 66 61 63 65 20 74 6f 20 |ng inter|face to |
|000055c0| 74 65 78 74 20 61 6e 64 | 0d 0a 67 72 61 70 68 69 |text and|..graphi|
|000055d0| 63 73 20 66 75 6e 63 74 | 69 6f 6e 73 2e 20 20 53 |cs funct|ions. S|
|000055e0| 6f 6d 65 20 73 74 61 6e | 64 61 72 64 73 2c 20 61 |ome stan|dards, a|
|000055f0| 73 20 74 68 65 20 53 75 | 6e 20 4e 65 57 53 20 73 |s the Su|n NeWS s|
|00005600| 79 73 74 65 6d 20 61 6e | 64 20 74 68 65 0d 0a 4d |ystem an|d the..M|
|00005610| 49 54 20 58 20 57 69 6e | 64 6f 77 20 73 79 73 74 |IT X Win|dow syst|
|00005620| 65 6d 2c 20 61 6c 6c 6f | 77 20 74 65 78 74 20 61 |em, allo|w text a|
|00005630| 6e 64 20 67 72 61 70 68 | 69 63 73 20 74 6f 20 62 |nd graph|ics to b|
|00005640| 65 20 64 69 73 70 6c 61 | 79 65 64 20 6f 6e 0d 0a |e displa|yed on..|
|00005650| 72 65 6d 6f 74 65 20 6d | 61 63 68 69 6e 65 73 2e |remote m|achines.|
|00005660| 0d 0a 0d 0a 5c 65 6e 64 | 7b 64 65 73 63 72 69 70 |....\end|{descrip|
|00005670| 74 69 6f 6e 7d 0d 0a 0d | 0a 49 6e 20 73 68 6f 72 |tion}...|.In shor|
|00005680| 74 2c 20 72 65 73 6f 75 | 72 63 65 20 6d 61 6e 61 |t, resou|rce mana|
|00005690| 67 65 6d 65 6e 74 20 70 | 6c 61 79 73 20 61 20 76 |gement p|lays a v|
|000056a0| 65 72 79 20 6c 61 72 67 | 65 20 70 61 72 74 20 69 |ery larg|e part i|
|000056b0| 6e 20 61 0d 0a 6d 75 6c | 74 69 74 61 73 6b 69 6e |n a..mul|titaskin|
|000056c0| 67 20 73 79 73 74 65 6d | 2c 20 61 6e 64 20 74 68 |g system|, and th|
|000056d0| 65 20 74 65 63 68 6e 6f | 6c 6f 67 79 20 69 73 20 |e techno|logy is |
|000056e0| 73 74 69 6c 6c 20 75 6e | 64 65 72 20 64 65 76 65 |still un|der deve|
|000056f0| 6c 6f 70 6d 65 6e 74 2e | 0d 0a 0d 0a 0d 0a 5c 73 |lopment.|......\s|
|00005700| 65 63 74 69 6f 6e 7b 54 | 68 65 20 4d 61 69 6c 62 |ection{T|he Mailb|
|00005710| 6f 78 20 4d 75 6c 74 69 | 74 61 73 6b 65 72 7d 0d |ox Multi|tasker}.|
|00005720| 0a 0d 0a 54 68 65 20 4d | 61 69 6c 62 6f 78 20 4d |...The M|ailbox M|
|00005730| 75 6c 74 69 74 61 73 6b | 65 72 20 69 73 20 7b 5c |ultitask|er is {\|
|00005740| 65 6d 20 70 6f 72 74 61 | 62 6c 65 7d 20 6d 75 6c |em porta|ble} mul|
|00005750| 74 69 74 61 73 6b 69 6e | 67 20 65 6e 76 69 72 6f |titaskin|g enviro|
|00005760| 6e 6d 65 6e 74 0d 0a 77 | 72 69 74 74 65 6e 20 69 |nment..w|ritten i|
|00005770| 6e 20 60 60 43 27 27 2e | 20 20 54 68 65 20 70 61 |n ``C''.| The pa|
|00005780| 63 6b 61 67 65 2c 20 77 | 68 69 63 68 20 6d 61 79 |ckage, w|hich may|
|00005790| 20 62 65 20 75 70 6c 6f | 61 64 65 64 20 66 72 6f | be uplo|aded fro|
|000057a0| 6d 20 42 49 58 2c 0d 0a | 73 65 72 76 65 73 20 62 |m BIX,..|serves b|
|000057b0| 6f 74 68 20 61 73 20 61 | 6e 20 65 64 75 63 61 74 |oth as a|n educat|
|000057c0| 69 6f 6e 61 6c 20 69 6c | 6c 75 73 74 72 61 74 69 |ional il|lustrati|
|000057d0| 6f 6e 20 6f 66 20 68 6f | 77 20 61 20 6d 75 6c 74 |on of ho|w a mult|
|000057e0| 69 74 61 73 6b 65 72 20 | 63 61 6e 0d 0a 62 65 20 |itasker |can..be |
|000057f0| 63 61 6e 20 62 65 20 62 | 75 69 6c 74 2c 20 61 6e |can be b|uilt, an|
|00005800| 64 20 61 73 20 61 20 70 | 72 6f 64 75 63 74 69 76 |d as a p|roductiv|
|00005810| 69 74 79 20 74 6f 6f 6c | 20 77 68 69 63 68 20 79 |ity tool| which y|
|00005820| 6f 75 20 6d 61 79 20 69 | 6e 63 6f 72 70 6f 72 61 |ou may i|ncorpora|
|00005830| 74 65 20 69 6e 0d 0a 79 | 6f 75 72 20 6f 77 6e 20 |te in..y|our own |
|00005840| 70 72 6f 67 72 61 6d 73 | 20 61 6e 64 20 6d 6f 64 |programs| and mod|
|00005850| 69 66 79 20 74 6f 20 73 | 75 69 74 20 79 6f 75 72 |ify to s|uit your|
|00005860| 20 6e 65 65 64 73 2e 20 | 20 57 69 74 68 20 74 68 | needs. | With th|
|00005870| 65 20 4d 61 69 6c 62 6f | 78 0d 0a 4d 75 6c 74 69 |e Mailbo|x..Multi|
|00005880| 74 61 73 6b 65 72 20 79 | 6f 75 20 6d 61 79 20 77 |tasker y|ou may w|
|00005890| 72 69 74 65 20 6d 75 6c | 74 69 74 61 73 6b 69 6e |rite mul|titaskin|
|000058a0| 67 20 70 72 6f 67 72 61 | 6d 73 20 77 68 69 63 68 |g progra|ms which|
|000058b0| 20 61 72 65 20 7b 5c 62 | 66 0d 0a 70 6f 72 74 61 | are {\b|f..porta|
|000058c0| 62 6c 65 7d 20 74 6f 20 | 6d 61 6e 79 20 64 69 66 |ble} to |many dif|
|000058d0| 66 65 72 65 6e 74 20 6d | 61 63 68 69 6e 65 73 20 |ferent m|achines |
|000058e0| 61 6e 64 20 6f 70 65 72 | 61 74 69 6e 67 20 73 79 |and oper|ating sy|
|000058f0| 73 74 65 6d 73 2e 20 20 | 57 68 61 74 20 69 73 0d |stems. |What is.|
|00005900| 0a 6d 6f 72 65 2c 20 73 | 68 6f 75 6c 64 20 74 68 |.more, s|hould th|
|00005910| 65 20 6d 61 63 68 69 6e | 65 20 68 61 76 65 20 7b |e machin|e have {|
|00005920| 5c 65 6d 20 6d 75 6c 74 | 69 70 6c 65 20 70 72 6f |\em mult|iple pro|
|00005930| 63 65 73 73 6f 72 73 7d | 2c 20 79 6f 75 72 20 70 |cessors}|, your p|
|00005940| 72 6f 67 72 61 6d 20 63 | 61 6e 0d 0a 74 61 6b 65 |rogram c|an..take|
|00005950| 20 61 64 76 61 6e 74 61 | 67 65 20 6f 66 20 74 68 | advanta|ge of th|
|00005960| 65 6d 20 61 6e 64 20 6d | 61 79 20 72 75 6e 20 73 |em and m|ay run s|
|00005970| 69 67 6e 69 66 69 63 61 | 6e 74 6c 79 20 66 61 73 |ignifica|ntly fas|
|00005980| 74 65 72 2e 0d 0a 0d 0a | 5c 73 75 62 73 65 63 74 |ter.....|\subsect|
|00005990| 69 6f 6e 7b 4d 61 69 6c | 62 6f 78 20 76 73 2e 20 |ion{Mail|box vs. |
|000059a0| 54 68 65 20 54 79 70 69 | 63 61 6c 20 4d 75 6c 74 |The Typi|cal Mult|
|000059b0| 69 74 61 73 6b 65 72 7d | 0d 0a 0d 0a 4d 61 69 6c |itasker}|....Mail|
|000059c0| 62 6f 78 20 69 73 20 61 | 20 6d 75 6c 74 69 74 61 |box is a| multita|
|000059d0| 73 6b 69 6e 67 20 65 6e | 76 69 72 6f 6e 6d 65 6e |sking en|vironmen|
|000059e0| 74 20 77 72 69 74 74 65 | 6e 20 74 6f 20 65 6e 63 |t writte|n to enc|
|000059f0| 6f 75 72 61 67 65 0d 0a | 65 78 70 6c 6f 72 61 74 |ourage..|explorat|
|00005a00| 69 6f 6e 20 61 6e 64 20 | 61 70 70 6c 69 63 61 74 |ion and |applicat|
|00005a10| 69 6f 6e 73 20 69 6e 20 | 63 6f 6e 63 75 72 72 65 |ions in |concurre|
|00005a20| 6e 74 20 70 72 6f 63 65 | 73 73 69 6e 67 2e 0d 0a |nt proce|ssing...|
|00005a30| 55 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 2c 20 6d |Unfortun|ately, m|
|00005a40| 75 6c 74 69 74 61 73 6b | 69 6e 67 20 69 73 20 75 |ultitask|ing is u|
|00005a50| 73 75 61 6c 6c 79 20 6e | 6f 74 20 61 76 61 69 6c |sually n|ot avail|
|00005a60| 61 62 6c 65 20 74 6f 20 | 74 68 65 20 70 65 72 73 |able to |the pers|
|00005a70| 6f 6e 61 6c 0d 0a 63 6f | 6d 70 75 74 65 72 20 75 |onal..co|mputer u|
|00005a80| 73 65 72 2c 20 61 73 20 | 6d 6f 73 74 20 70 65 72 |ser, as |most per|
|00005a90| 73 6f 6e 61 6c 20 63 6f | 6d 70 75 74 65 72 20 6f |sonal co|mputer o|
|00005aa0| 70 65 72 61 74 69 6e 67 | 20 73 79 73 74 65 6d 73 |perating| systems|
|00005ab0| 20 6f 6e 6c 79 0d 0a 72 | 65 70 72 65 73 65 6e 74 | only..r|epresent|
|00005ac0| 20 61 20 73 75 62 73 65 | 74 20 6f 66 20 6d 61 6e | a subse|t of man|
|00005ad0| 79 20 6d 61 69 6e 66 72 | 61 6d 65 20 66 75 6e 63 |y mainfr|ame func|
|00005ae0| 74 69 6f 6e 73 2e 20 20 | 49 74 20 6d 75 73 74 20 |tions. |It must |
|00005af0| 62 65 20 6d 61 64 65 0d | 0a 63 6c 65 61 72 2c 20 |be made.|.clear, |
|00005b00| 68 6f 77 65 76 65 72 2c | 20 74 68 61 74 20 4d 61 |however,| that Ma|
|00005b10| 69 6c 62 6f 78 20 69 73 | 20 6d 75 6c 74 69 74 61 |ilbox is| multita|
|00005b20| 73 6b 69 6e 67 20 65 6e | 76 69 72 6f 6e 6d 65 6e |sking en|vironmen|
|00005b30| 74 2c 20 7b 5c 65 6d 20 | 6e 6f 74 0d 0a 61 6e 20 |t, {\em |not..an |
|00005b40| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00005b50| 7d 2e 20 20 49 74 20 64 | 6f 65 73 20 6e 6f 74 20 |}. It d|oes not |
|00005b60| 70 72 6f 76 69 64 65 20 | 66 69 6c 65 2d 2c 20 6d |provide |file-, m|
|00005b70| 65 6d 6f 72 79 2d 2c 20 | 61 6e 64 20 6f 74 68 65 |emory-, |and othe|
|00005b80| 72 0d 0a 72 65 73 6f 75 | 72 63 65 20 6d 61 6e 61 |r..resou|rce mana|
|00005b90| 67 65 6d 65 6e 74 20 66 | 75 6e 63 74 69 6f 6e 73 |gement f|unctions|
|00005ba0| 20 72 65 71 75 69 72 65 | 64 20 6f 66 20 61 20 63 | require|d of a c|
|00005bb0| 6f 6d 70 6c 65 74 65 20 | 6f 70 65 72 61 74 69 6e |omplete |operatin|
|00005bc0| 67 0d 0a 73 79 73 74 65 | 6d 2e 20 20 48 6f 77 65 |g..syste|m. Howe|
|00005bd0| 76 65 72 2c 20 69 74 20 | 64 6f 65 73 20 70 72 6f |ver, it |does pro|
|00005be0| 76 69 64 65 20 61 20 6d | 75 6c 74 69 74 61 73 6b |vide a m|ultitask|
|00005bf0| 69 6e 67 20 7b 5c 65 6d | 20 65 6e 76 69 72 6f 6e |ing {\em| environ|
|00005c00| 6d 65 6e 74 7d 0d 0a 7b | 5c 65 6d 20 77 69 74 68 |ment}..{|\em with|
|00005c10| 69 6e 20 61 20 70 72 6f | 67 72 61 6d 7d 20 74 68 |in a pro|gram} th|
|00005c20| 61 74 20 79 6f 75 20 77 | 72 69 74 65 20 77 69 74 |at you w|rite wit|
|00005c30| 68 20 69 74 2e 20 20 41 | 6e 64 20 62 65 63 61 75 |h it. A|nd becau|
|00005c40| 73 65 20 74 68 65 20 63 | 6f 64 65 0d 0a 66 6f 72 |se the c|ode..for|
|00005c50| 20 4d 61 69 6c 62 6f 78 | 20 69 73 20 65 61 73 69 | Mailbox| is easi|
|00005c60| 6c 79 20 70 6f 72 74 65 | 64 20 61 6e 64 20 69 74 |ly porte|d and it|
|00005c70| 73 20 69 6e 74 65 72 66 | 61 63 65 20 69 73 20 74 |s interf|ace is t|
|00005c80| 68 65 20 73 61 6d 65 20 | 6f 6e 20 61 6c 6c 0d 0a |he same |on all..|
|00005c90| 6d 61 63 68 69 6e 65 73 | 2c 20 79 6f 75 72 20 6f |machines|, your o|
|00005ca0| 77 6e 20 6d 75 6c 74 69 | 74 61 73 6b 69 6e 67 20 |wn multi|tasking |
|00005cb0| 63 6f 64 65 20 63 61 6e | 20 61 6c 73 6f 20 62 65 |code can| also be|
|00005cc0| 20 70 6f 72 74 61 62 6c | 65 2e 0d 0a 0d 0a 54 72 | portabl|e.....Tr|
|00005cd0| 61 64 69 74 69 6f 6e 61 | 6c 6c 79 2c 20 6d 75 6c |aditiona|lly, mul|
|00005ce0| 74 69 74 61 73 6b 69 6e | 67 2c 20 77 68 65 6e 20 |titaskin|g, when |
|00005cf0| 61 76 61 69 6c 61 62 6c | 65 2c 20 68 61 73 20 62 |availabl|e, has b|
|00005d00| 65 65 6e 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 6f |een a fu|nction o|
|00005d10| 66 0d 0a 74 68 65 20 6f | 70 65 72 61 74 69 6e 67 |f..the o|perating|
|00005d20| 20 73 79 73 74 65 6d 20 | 61 6e 64 20 75 73 75 61 | system |and usua|
|00005d30| 6c 6c 79 20 6d 61 63 68 | 69 6e 65 20 73 70 65 63 |lly mach|ine spec|
|00005d40| 69 66 69 63 2e 20 20 54 | 68 65 20 4d 61 63 69 6e |ific. T|he Macin|
|00005d50| 74 6f 73 68 0d 0a 4d 75 | 6c 74 69 66 69 6e 64 65 |tosh..Mu|ltifinde|
|00005d60| 72 20 70 72 6f 76 69 64 | 65 73 20 6c 69 6d 69 74 |r provid|es limit|
|00005d70| 65 64 20 6d 75 6c 74 69 | 74 61 73 6b 69 6e 67 20 |ed multi|tasking |
|00005d80| 73 75 70 70 6f 72 74 2c | 20 62 75 74 20 69 74 73 |support,| but its|
|00005d90| 20 70 72 6f 67 72 61 6d | 73 0d 0a 77 68 69 63 68 | program|s..which|
|00005da0| 20 75 73 65 20 69 74 20 | 77 69 6c 6c 20 62 65 20 | use it |will be |
|00005db0| 6c 69 6d 69 74 65 64 20 | 74 6f 20 74 68 65 20 4d |limited |to the M|
|00005dc0| 61 63 69 6e 74 6f 73 68 | 2e 20 20 4d 69 63 72 6f |acintosh|. Micro|
|00005dd0| 73 6f 66 74 27 73 20 4f | 53 2f 32 2c 0d 0a 77 68 |soft's O|S/2,..wh|
|00005de0| 65 6e 20 69 74 20 69 73 | 20 72 65 6c 65 61 73 65 |en it is| release|
|00005df0| 64 2c 20 70 72 6f 6d 69 | 73 65 73 20 61 6e 20 69 |d, promi|ses an i|
|00005e00| 6d 70 72 65 73 73 69 76 | 65 20 6c 69 62 72 61 72 |mpressiv|e librar|
|00005e10| 79 20 6f 66 20 6d 75 6c | 74 69 74 61 73 6b 69 6e |y of mul|titaskin|
|00005e20| 67 0d 0a 66 75 6e 63 74 | 69 6f 6e 73 2c 20 62 75 |g..funct|ions, bu|
|00005e30| 74 20 4f 53 2f 32 20 69 | 73 20 68 69 67 68 6c 79 |t OS/2 i|s highly|
|00005e40| 20 49 42 4d 20 41 54 20 | 73 70 65 63 69 66 69 63 | IBM AT |specific|
|00005e50| 2e 20 20 54 68 6f 75 67 | 68 20 55 4e 49 58 20 64 |. Thoug|h UNIX d|
|00005e60| 6f 65 73 0d 0a 70 72 6f | 76 69 64 65 20 70 6f 72 |oes..pro|vide por|
|00005e70| 74 61 62 6c 65 20 6d 75 | 6c 74 69 7b 5c 65 6d 20 |table mu|lti{\em |
|00005e80| 70 72 6f 63 65 73 73 69 | 6e 67 7d 2c 20 74 68 65 |processi|ng}, the|
|00005e90| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|00005ea0| 6d 20 69 73 20 73 74 69 | 6c 6c 0d 0a 75 73 75 61 |m is sti|ll..usua|
|00005eb0| 6c 6c 79 20 66 6f 75 6e | 64 20 6f 6e 6c 79 20 6f |lly foun|d only o|
|00005ec0| 6e 20 77 6f 72 6b 73 74 | 61 74 69 6f 6e 73 20 61 |n workst|ations a|
|00005ed0| 6e 64 20 6d 61 69 6e 66 | 72 61 6d 65 73 2c 20 61 |nd mainf|rames, a|
|00005ee0| 6e 64 20 69 74 73 20 63 | 6f 6d 6d 6f 6e 20 42 53 |nd its c|ommon BS|
|00005ef0| 44 0d 0a 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |D..distr|ibution |
|00005f00| 70 72 6f 63 65 73 73 65 | 73 20 61 72 65 20 62 69 |processe|s are bi|
|00005f10| 67 20 61 6e 64 20 60 60 | 65 78 70 65 6e 73 69 76 |g and ``|expensiv|
|00005f20| 65 27 27 20 61 6e 64 20 | 63 61 6e 6e 6f 74 20 73 |e'' and |cannot s|
|00005f30| 68 61 72 65 0d 0a 6d 65 | 6d 6f 72 79 2e 0d 0a 0d |hare..me|mory....|
|00005f40| 0a 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 4d 61 69 |.\subsec|tion{Mai|
|00005f50| 6c 62 6f 78 27 73 20 4c | 61 79 65 72 73 20 6f 66 |lbox's L|ayers of|
|00005f60| 20 50 6f 72 74 61 62 69 | 6c 69 74 79 7d 0d 0a 0d | Portabi|lity}...|
|00005f70| 0a 54 68 65 20 4d 61 69 | 6c 62 6f 78 20 70 61 63 |.The Mai|lbox pac|
|00005f80| 6b 61 67 65 20 69 73 20 | 62 75 69 6c 74 20 6f 6e |kage is |built on|
|00005f90| 20 74 68 72 65 65 20 7b | 5c 65 6d 20 6c 61 79 65 | three {|\em laye|
|00005fa0| 72 73 20 6f 66 20 70 6f | 72 74 61 62 69 6c 69 74 |rs of po|rtabilit|
|00005fb0| 79 7d 2e 0d 0a 45 61 63 | 68 20 6c 61 79 65 72 20 |y}...Eac|h layer |
|00005fc0| 61 64 64 73 20 61 20 63 | 65 72 74 61 69 6e 20 64 |adds a c|ertain d|
|00005fd0| 65 67 72 65 65 20 6f 66 | 20 66 75 6e 63 74 69 6f |egree of| functio|
|00005fe0| 6e 61 6c 69 74 79 20 61 | 6e 64 20 6d 61 63 68 69 |nality a|nd machi|
|00005ff0| 6e 65 0d 0a 69 6e 64 65 | 70 65 6e 64 65 6e 63 65 |ne..inde|pendence|
|00006000| 2e 20 20 54 68 65 20 6c | 6f 77 65 73 74 20 61 6e |. The l|owest an|
|00006010| 64 20 6d 6f 73 74 20 64 | 65 76 69 63 65 2d 64 65 |d most d|evice-de|
|00006020| 70 65 6e 64 65 6e 74 20 | 6c 61 79 65 72 2c 20 4d |pendent |layer, M|
|00006030| 50 54 48 44 2c 0d 0a 69 | 6d 70 6c 65 6d 65 6e 74 |PTHD,..i|mplement|
|00006040| 73 20 74 68 65 20 62 61 | 73 69 63 20 63 6f 6e 74 |s the ba|sic cont|
|00006050| 65 78 74 20 73 77 69 74 | 63 68 69 6e 67 20 72 65 |ext swit|ching re|
|00006060| 71 75 69 72 65 64 20 66 | 6f 72 20 61 6e 79 20 6d |quired f|or any m|
|00006070| 75 6c 74 69 74 61 73 6b | 69 6e 67 0d 0a 70 61 63 |ultitask|ing..pac|
|00006080| 6b 61 67 65 3b 20 69 74 | 20 70 72 6f 76 69 64 65 |kage; it| provide|
|00006090| 73 20 74 68 72 65 61 64 | 73 20 6f 66 20 65 78 65 |s thread|s of exe|
|000060a0| 63 75 74 69 6f 6e 2e 20 | 20 54 68 65 20 6d 69 64 |cution. | The mid|
|000060b0| 64 6c 65 20 6c 61 79 65 | 72 2c 20 4d 50 54 53 4b |dle laye|r, MPTSK|
|000060c0| 2c 0d 0a 69 6d 70 6c 65 | 6d 65 6e 74 73 20 73 63 |,..imple|ments sc|
|000060d0| 68 65 64 75 6c 69 6e 67 | 20 61 6e 64 20 69 6e 74 |heduling| and int|
|000060e0| 65 72 70 72 6f 63 65 73 | 73 20 63 6f 6d 6d 75 6e |erproces|s commun|
|000060f0| 69 63 61 74 69 6f 6e 2c | 20 6e 6f 6e 2d 70 72 65 |ication,| non-pre|
|00006100| 65 6d 70 74 69 76 65 0d | 0a 6d 75 6c 74 69 74 61 |emptive.|.multita|
|00006110| 73 6b 69 6e 67 20 62 61 | 73 65 64 20 6f 6e 20 4d |sking ba|sed on M|
|00006120| 50 54 48 44 27 73 3b 20 | 69 74 20 70 72 6f 76 69 |PTHD's; |it provi|
|00006130| 64 65 73 20 69 6e 64 65 | 70 65 6e 64 65 6e 74 2c |des inde|pendent,|
|00006140| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6e 67 0d 0a | communi|cating..|
|00006150| 74 61 73 6b 73 2e 5c 66 | 6f 6f 74 6e 6f 74 65 7b |tasks.\f|ootnote{|
|00006160| 41 6c 6c 20 67 6c 6f 62 | 61 6c 20 6e 61 6d 65 73 |All glob|al names|
|00006170| 20 69 6e 20 74 68 65 20 | 4d 61 69 6c 62 6f 78 20 | in the |Mailbox |
|00006180| 70 61 63 6b 61 67 65 20 | 61 72 65 20 70 72 65 66 |package |are pref|
|00006190| 65 78 65 64 0d 0a 77 69 | 74 68 20 74 68 65 20 61 |exed..wi|th the a|
|000061a0| 75 74 68 6f 72 73 20 69 | 6e 69 74 69 61 6c 73 20 |uthors i|nitials |
|000061b0| 28 4d 50 29 20 74 6f 20 | 70 72 65 76 65 6e 74 20 |(MP) to |prevent |
|000061c0| 6e 61 6d 69 6e 67 20 63 | 6f 6e 66 6c 69 63 74 73 |naming c|onflicts|
|000061d0| 20 77 69 74 68 20 6f 74 | 68 65 72 0d 0a 67 6c 6f | with ot|her..glo|
|000061e0| 62 61 6c 20 6e 61 6d 65 | 73 20 79 6f 75 72 20 65 |bal name|s your e|
|000061f0| 6e 76 69 6f 72 6e 6d 65 | 6e 74 20 6d 61 79 20 68 |nviornme|nt may h|
|00006200| 61 76 65 2e 7d 20 20 54 | 68 65 20 74 6f 70 20 6c |ave.} T|he top l|
|00006210| 61 79 65 72 2c 20 4d 50 | 52 45 53 2c 0d 0a 69 6d |ayer, MP|RES,..im|
|00006220| 70 6c 65 6d 65 6e 74 73 | 20 62 61 73 69 63 20 72 |plements| basic r|
|00006230| 65 73 6f 75 72 63 65 20 | 6d 61 6e 61 67 65 6d 65 |esource |manageme|
|00006240| 6e 74 20 66 6f 72 20 61 | 6c 6c 20 73 74 61 6e 64 |nt for a|ll stand|
|00006250| 61 72 64 20 72 65 73 6f | 75 72 63 65 73 20 61 6e |ard reso|urces an|
|00006260| 64 0d 0a 74 68 6f 73 65 | 20 79 6f 75 20 6d 61 79 |d..those| you may|
|00006270| 20 61 64 64 2c 20 70 72 | 65 65 6d 70 74 69 76 65 | add, pr|eemptive|
|00006280| 20 6d 75 6c 74 69 74 61 | 73 6b 69 6e 67 20 62 61 | multita|sking ba|
|00006290| 73 65 64 20 6f 6e 20 4d | 50 54 53 4b 27 73 2e 0d |sed on M|PTSK's..|
|000062a0| 0a 0d 0a 5c 62 65 67 69 | 6e 7b 66 69 67 75 72 65 |...\begi|n{figure|
|000062b0| 7d 0d 0a 5c 63 61 70 74 | 69 6f 6e 7b 4d 61 69 6c |}..\capt|ion{Mail|
|000062c0| 62 6f 78 27 73 20 50 6f | 72 74 61 62 69 6c 69 74 |box's Po|rtabilit|
|000062d0| 79 2f 46 75 6e 63 74 69 | 6f 6e 61 6c 69 74 79 20 |y/Functi|onality |
|000062e0| 4c 61 79 65 72 73 7d 0d | 0a 0d 0a 5c 62 65 67 69 |Layers}.|...\begi|
|000062f0| 6e 7b 64 65 73 63 72 69 | 70 74 69 6f 6e 7d 0d 0a |n{descri|ption}..|
|00006300| 0d 0a 09 5c 69 74 65 6d | 5b 4d 50 52 45 53 5d 09 |...\item|[MPRES].|
|00006310| 7b 5c 65 6d 20 52 65 73 | 6f 75 72 63 65 20 4d 61 |{\em Res|ource Ma|
|00006320| 6e 61 67 65 6d 65 6e 74 | 7d 5c 0d 0a 09 09 50 72 |nagement|}\....Pr|
|00006330| 65 2d 65 6d 70 74 69 76 | 65 20 63 6f 6e 63 75 72 |e-emptiv|e concur|
|00006340| 72 65 6e 74 20 70 72 6f | 63 65 73 73 69 6e 67 3b |rent pro|cessing;|
|00006350| 20 72 65 67 75 6c 61 74 | 65 64 20 61 63 63 65 73 | regulat|ed acces|
|00006360| 73 0d 0a 74 6f 20 74 68 | 65 20 62 61 73 69 63 20 |s..to th|e basic |
|00006370| 72 65 73 6f 75 72 63 65 | 73 2c 20 77 69 74 68 20 |resource|s, with |
|00006380| 70 72 6f 76 69 73 69 6f | 6e 73 20 66 6f 72 20 73 |provisio|ns for s|
|00006390| 6f 70 68 69 73 74 69 63 | 61 74 65 64 20 75 73 65 |ophistic|ated use|
|000063a0| 72 0d 0a 72 65 73 6f 75 | 72 63 65 73 2c 20 72 65 |r..resou|rces, re|
|000063b0| 73 6f 75 72 63 65 20 6d | 61 6e 67 65 72 73 2c 20 |source m|angers, |
|000063c0| 61 6e 64 20 6f 70 74 69 | 6d 69 7a 61 74 69 6f 6e |and opti|mization|
|000063d0| 73 2e 0d 0a 0d 0a 09 5c | 69 74 65 6d 5b 4d 50 54 |s......\|item[MPT|
|000063e0| 53 4b 5d 09 7b 5c 65 6d | 20 54 61 73 6b 20 4f 72 |SK].{\em| Task Or|
|000063f0| 67 61 6e 69 7a 61 74 69 | 6f 6e 7d 5c 0d 0a 09 09 |ganizati|on}\....|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.