📄 rfc150.txt
字号:
receiver catch up with it. By pinpointing bottlenecks, it can be used todetect design mismatches. Unless the channel has no outstanding messages or it is dead,there is the possibility that concurrently with the request thereceiving process will accept another message. This being the case, thecount returned can not be assumed to be exact but must be considered asonly an upper bound.ABILITY TO GET WAKEUPS WHEN MESSAGES ARE ACCEPTED In conjunction with the above it should be possible for a userprocess to be alerted when the number of messages that have been sentover a particular channel and not accepted at the far end falls below aspecified threshold. Thus a process, upon discovering that twentymessages are still outstanding, can elect to enter the shade until thisnumber has fallen to less than five. By doing so the process can run in'burst mode'. Rather than being swapped in and out of core fifteen timesand each time being allowed to send one message, it is loaded once andsends fifteen messages. There is no penalty for doing this since thebottleneck on throughput is at the receiving process. If swapping costsfor the local process are significant, there may be considerableeconomic advantage to this mode of operation. If the remote process dies or issues a channel 'close', the countof undelivered messages becomes frozen. If the receiving process isexpecting this type of wakeup, it should get one at this time eventhough the count has not reached the desired threshold. The process isthus alerted to do a postmortem on the channel. [Page 6]RFC #150 Use of IPC Facilities 5 May 1971ABILITY TO LEARN ABOUT MESSAGES QUEUED FOR INPUT A process should be able to learn of the status of the Nth logicalmessage queued on a given input channel. It should a least be able todetermine if it is available, whether or not it is complete, how long itis and what it contains. This facility allows a program to make general preparations beforeaccepting a message. It offers some escape from being put into theawkward position of having accepted input and not being able to disposeof it. If for example, it is known that processing the message willresult in two more messages being sent, then it is advantageous to getguarantees that the output can be generated before the input isaccepted. Under circumstances in which one end of a channel is moved fromone process to another, for example, moving a teletype connectionbetween a user program and a debugging program, this ability to scanahead in the input stream allows a process to check whether or notpending input is really meant for it. If it is, the input will then beaccepted normally, otherwise, the end of the channel must be first movedto another receiving process. Accepting input should be viewed as a grave responsibility, not tobe undertaken unless there is reasonable assurance that the input can beprocessed. One of the first rules of asynchronous system design is todetect errors as soon as possible. If propagated, the tangled resultsmay be hopeless to unravel.ABILITY TO LEARN HOW MANY MESSAGES ARE WAITING A process should be able to determine how many messages areleft to be processed on a given input channel. Two uses are readilythought of. Given pending inputs on several channels a process should beable to exercise preference. One decision might be to take input firstfrom the channel with the most messages queued. This might have theeffect of increasing throughput since by freeing message buffers theremote transmitting process might be allowed to run. Another possibilitymight be that the receiving process has some control over the sendingprocess and, upon observing the backlog on inputs, it could tell thatprocess to slow down. Assuming that the remote process is still able to send messages,the number of inputs reported is only a lower bound. New inputs may beadded concurrently. If the foreign process has died or has otherwiseclosed the connection then the bound can be made exact. The localprocess should be able to learn when it is exact. [Page 7]RFC #150 Use of IPC Facilities 5 May 1971GUARANTEE THAT INPUT WILL STAY AVAILABLE This requirement states that if a process has been told that it isable to receive N messages on a given channel, that those messages arereally available and buffered within the host machine. If promised to auser process, messages should not mysteriously become unavailable. Anexample of how this might happen is illustrated in RFC60. There, duringa panic for buffer space, messages are destroyed and reported as beingin error. They are later recovered from backup copies contained in theforeign host.ABILITY TO RECEIVE A WAKEUP WHEN INPUTS ARRIVE A process should be able to enable a wakeup when the number ofmessages queued on an input channel exceeds a specified value or hasreached its maximum value. This allows a program to process input in aburst mode fashion and to economize on swapping costs. It also permitsinputs to be combined in a simple manner. If, for example, two inputsare needed before anything can be done, then the appropriate interruptcan be easily generated. The same interrupt should be generated if the maximum number ofinputs have been received. Two cases are distinguished. Either theforeign process has closed the channel and is therefore not sending moremessages, or the system will not allocate more buffers until some inputis accepted. In this way the process can be informed that there is nopoint in waiting for the condition it anticipates.ABILITY TO SPECIFY SPECIAL WAKEUPS A process, when trying to run efficiently, should be able tospecify arbitrarily complicated wakeup conditions. This allows a usermanaged way of minimizing the number of premature wakeups. Thisgenerality is perhaps most easily provided for by allowing the mainprocess to designate a small low overhead interrupt driven routine thatwill check for the desired conditions and issue a wakeup to the mainprocess whenever they are met.ABILITY TO MEASURE CHANNEL CAPACITY There has been much discussion about the measure of a data streamand in the heat of committee, much confusion has been generated. It isour feeling that, within the present domain of discussion, there is nosingle measure of the capacity of a message channel. Two completelyorthogonal concepts must be measured -- 1) the number of messagesbuffered and 2) the number of bits of encoded data represented. Thesystem overhead associated with each is very much implementationdependent and hence no general equation can express the measure of one [Page 8]RFC #150 Use of IPC Facilities 5 May 1971in terms of the other. By making an arbitrary assumption (eg. a messageboundary equals 100 bits of buffer), a system runs the risk of excludingnew nodes that are unable to meet the old criterion.ABILITY TO FIND OUT MAXIMUM CHANNEL CAPACITY There should be provided a system call that enables a user processto learn of the maximum current capacity of any given channel. Thisshould be reported as a pair of numbers, namely the maximum bit countand the maximum message count.ABILITY TO CONSTRAIN CHANNEL CAPACITY A process using a channel should be able to set new bounds on thecapacity of a given channel. If possible the system should try to meetthis bound. It should be noted that the actual bounds imposed must meetthe constraints of at least four different sources -- local and remoteuser process, local and remote system -- by setting a arbitrarily highbound, no guarantee is made that it can be met. Similarly, a low boundcan not always be met until buffered messages are consumed. Thus a receiving process, by setting the current message bound tozero, effectively disables the transmission of new messages. Thus,without the cooperation of the transmitting process, message generationcan be temporarily disabled, while outstanding message buffers areflushed. Later the message allocation can be raised to its originallimit and transmission can be resumed.ABILITY TO CLOSE A CHANNEL AT ANY TIME A process should be able to close down a channel at any time. Ifthe process has died, the system should be able to close all openchannels for it. For channels over which the process was receiving data,pending input should be thrown away and indications returned to thetransmitting system marking the channel as dead and identifying the lastdata item accepted. This identification will be in terms of the numberof logical messages discarded and the number of bits left in the oldestmessage. If a process closes a channel over which it had been sending,buffered output should be sent normally, and with it should be sent anindication that this is all of the input that will ever appear. [Page 9]RFC #150 Use of IPC Facilities 5 May 1971ABILITY TO GIVE AWAY CHANNEL PRIVILEGES The right to perform any of the operations discussed here isnormally reserved by the process that established the channel. At timesthat process may wish to transfer some of its delegated power to anotherprocess, especially in an environment where one process may spawnanother and resources must be passed to the newly created process. Schemes for such reassignment can become arbitrarily complicated.One could, for example, assign each of the various aspects of usageindividually and then separately assign the various rights ofreassignment. Fortunately it is not always necessary that it become soelaborate, it is expected that in most cases the following simplestrategy can suffice. The ability to close a channel is retainedexclusively by the process that established the channel. If the channelis still open when the process dies, it is automatically closed by thesystem. All other uses of the channel remain outside system control. Thechannel is known by name and all processes to which the name has beengiven may make use of the channel. It is left to user level coordinationto insure that only one process is actually making use of it at any onetime.ABILITY TO INITIATE CHANNEL CREATION For most cases channel establishment can be handled quite simply.A process announces to its local system that it listening on a specified channel. It is connected to the first remote process that'dials' the right number. Identification of the caller takes placeonly after the channel has been established. In the event of a wrongnumber, the channel can be closed and the listening resumed. Callerstrying to reach preestablished channels will get a 'busy signal'. To 'dial' a remote process a process must specify a channel onwhich it is listening and a remote number. The system will thenattempt to establish the connection. The channel will become 'busy'during this time. For processes that prefer to avoid the complications ofidentifying remote callers, an additional feature can be added. Byspecifying both the local and remote channel identifiers a process cantransfer to the system the responsibility for screening callers forthe proper identification. The connection will only be accepted fromthe caller specified. [Page 10]RFC #150 Use of IPC Facilities 5 May 1971ABILITY TO REPORT TRANSMISSION ERRORS If after prescanning an input message a process should decidethat it contains some sort of transmission error, it should be able toreject the message. The system should then invoke any internal errorrecovery mechanism that it may have implemented.POSTSCRIPT The author welcomes any comments, questions, or corrections tothis document. Even the most informal note or telephone call will beappreciated. Especially of interest are opinions about the usefulnessof the discussion and wether or not there should be more papersdirected at other of the basic questions of computer networking. Ifthe consensus tends to the affirmative, then others are encouraged tocontribute working papers on the problems of flow control, errorhandling, process ownership, accounting, resource control, and thelike.RBK/TX2 [ This RFC was put into machine readable form for entry ] [ into the online RFC archives by Michael Baudisch 9/97 ] [Page 11]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -