⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc817.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 3 页
字号:
problems, there are some other, more subtle problems associated with  anoutboard implementation of a protocol.  We will return to these problemslater.     There  is  a  way  of  attaching  a  communications  processor to amainframe host which  sidesteps  all  of  the  mainframe  implementationproblems, which is to use some preexisting interface on the host machineas  the  port  by  which  a  communications processor is attached.  Thisstrategy is often used as a last stage of desperation when the  softwareon  the host computer is so intractable that it cannot be changed in anyway.  Unfortunately, it is almost inevitably the case that  all  of  theavailable  interfaces  are  totally  unsuitable for this purpose, so theresult is unsatisfactory at best.  The most common  way  in  which  thisform  of attachment occurs is when a network connection is being used tomimic local teletypes.  In this case, the  front-end  processor  can  beattached  to  the mainframe by simply providing a number of wires out ofthe front-end processor, each corresponding to a connection,  which  are                                   10plugged  into teletype ports on the mainframe computer.  (Because of theappearance  of  the  physical  configuration  which  results  from  thisarrangement,  Michael  Padlipsky  has  described  this  as  the "milkingmachine" approach to computer networking.)   This  strategy  solves  theimmediate  problem  of  providing  remote  access  to  a host, but it isextremely inflexible.  The channels  being  provided  to  the  host  arerestricted  by  the host software to one purpose only, remote login.  Itis impossible to use them for any other purpose, such as  file  transferor  sending mail, so the host is integrated into the network environmentin an extremely limited and inflexible manner.  If this is the best thatcan be done, then it  should  be  tolerated.    Otherwise,  implementorsshould be strongly encouraged to take a more flexible approach.     4.  Protocol Layering     The  previous  discussion suggested that there was a decision to bemade as to where a protocol ought to  be  implemented.    In  fact,  thedecision  is  much  more  complicated  than that, for the goal is not toimplement a single protocol, but to implement a whole family of protocollayers, starting with a device driver or local  network  driver  at  thebottom,  then  IP  and  TCP,  and  eventually  reaching  the applicationspecific protocol, such as Telnet, FTP and SMTP on the  top.    Clearly,the bottommost of these layers is somewhere within the kernel, since thephysical  device  driver for the net is almost inevitably located there.Equally clearly, the top layers of this package, which provide the  userhis  ability  to  perform the remote login function or to send mail, arenot entirely contained within the kernel.  Thus,  the  question  is  not                                   11whether  the  protocol family shall be inside or outside the kernel, buthow it shall be sliced in two between that part  inside  and  that  partoutside.     Since  protocols  come  nicely layered, an obvious proposal is thatone of the layer interfaces should be the point at which the inside  andoutside components are sliced apart.  Most systems have been implementedin  this  way,  and  many have been made to work quite effectively.  Oneobvious place to slice is at the upper interface  of  TCP.    Since  TCPprovides  a  bidirectional byte stream, which is somewhat similar to theI/O facility provided by most operating systems, it is possible to  makethe  interface  to  TCP  almost  mimic  the  interface to other existingdevices.  Except in the matter of opening a connection, and dealing withpeculiar failures, the software using TCP need not know  that  it  is  anetwork connection, rather than a local I/O stream that is providing thecommunications  function.  This approach does put TCP inside the kernel,which raises all the problems addressed  above.    It  also  raises  theproblem that the interface to the IP layer can, if the programmer is notcareful,  become  excessively  buried  inside  the  kernel.   It must beremembered that things other than TCP are expected to run on top of  IP.The  IP interface must be made accessible, even if TCP sits on top of itinside the kernel.     Another obvious place to slice is above Telnet.  The  advantage  ofslicing  above  Telnet  is  that  it solves the problem of having remotelogin channels emulate local teletype channels.    The  disadvantage  ofputting  Telnet into the kernel is that the amount of code which has now                                   12been  included  there  is  getting  remarkably  large.    In  some earlyimplementations, the size of the  network  package,  when  one  includesprotocols  at  the  level  of Telnet, rivals the size of the rest of thesupervisor.  This leads to vague feelings that all is not right.     Any attempt to slice through a lower layer  boundary,  for  examplebetween  internet  and  TCP,  reveals  one fundamental problem.  The TCPlayer, as well as the IP layer, performs a  demultiplexing  function  onincoming  datagrams.   Until the TCP header has been examined, it is notpossible to know for which  user  the  packet  is  ultimately  destined.Therefore,  if  TCP,  as  a  whole,  is  moved outside the kernel, it isnecessary to create one separate process called the TCP  process,  whichperforms  the TCP multiplexing function, and probably all of the rest ofTCP processing as well.  This means that incoming data  destined  for  auser  process  involves  not  just a scheduling of the user process, butscheduling the TCP process first.     This suggests an  alternative  structuring  strategy  which  slicesthrough  the  protocols,  not  along  an established layer boundary, butalong a functional boundary having to do with demultiplexing.   In  thisapproach, certain parts of IP and certain parts of TCP are placed in thekernel.    The amount of code placed there is sufficient so that when anincoming datagram arrives, it is possible to know for which process thatdatagram is ultimately destined.  The datagram is then  routed  directlyto  the  final  process,  where  additional  IP  and  TCP  processing isperformed on it.  This removes from the kernel any requirement for timerbased actions, since they can be done by the  process  provided  by  the                                   13user.    This  structure  has  the  additional advantage of reducing theamount of code required in the  kernel,  so  that  it  is  suitable  forsystems where kernel space is at a premium.  The RFC 814, titled "Names,Addresses,  Ports, and Routes," discusses this rather orthogonal slicingstrategy in more detail.     A related discussion of protocol layering and multiplexing  can  befound in Cohen and Postel [1].     5.  Breaking Down the Barriers     In  fact, the implementor should be sensitive to the possibility ofeven more  peculiar  slicing  strategies  in  dividing  up  the  variousprotocol  layers  between the kernel and the one or more user processes.The result of the strategy proposed above was that part  of  TCP  shouldexecute  in  the process of the user.  In other words, instead of havingone TCP process for the system, there is one TCP process per connection.Given this architecture, it is not longer necessary to imagine that  allof  the  TCPs  are  identical.    One  TCP  could  be optimized for highthroughput applications, such as file transfer.  Another  TCP  could  beoptimized  for small low delay applications such as Telnet.  In fact, itwould be possible to produce a TCP which was  somewhat  integrated  withthe  Telnet  or  FTP  on  top  of  it.  Such an integration is extremelyimportant,  for  it  can  lead  to  a  kind  of  efficiency  which  moretraditional  structures are incapable of producing.  Earlier, this paperpointed out that one of the important rules to achieving efficiency  wasto  send  the minimum number of packets for a given amount of data.  Theidea of protocol layering interacts very strongly (and poorly) with this                                   14goal,  because  independent  layers  have  independent  ideas about whenpackets should be sent, and unless these layers can somehow  be  broughtinto  cooperation,  additional  packets  will flow.  The best example ofthis is the operation of server telnet in a character at a  time  remoteecho  mode  on top of TCP.  When a packet containing a character arrivesat a server host, each layer has a different response  to  that  packet.TCP  has  an obligation to acknowledge the packet.  Either server telnetor the application layer above has an obligation to echo  the  characterreceived  in the packet.  If the character is a Telnet control sequence,then Telnet has additional actions which it must perform in response  tothe  packet.    The  result  of  this,  in most implementations, is thatseveral packets are sent back in response to the  one  arriving  packet.Combining  all of these return messages into one packet is important forseveral reasons.  First, of course, it reduces  the  number  of  packetsbeing sent over the net, which directly reduces the charges incurred formany common carrier tariff structures.  Second, it reduces the number ofscheduling  actions  which  will  occur inside both hosts, which, as wasdiscussed above, is extremely important in improving throughput.     The way to achieve this goal of packet sharing is to break down thebarrier between the layers of the protocols, in a  very  restrained  andcareful  manner, so that a limited amount of information can leak acrossthe barrier to enable one layer to optimize its behavior with respect tothe desires of the layers above and below it.   For  example,  it  wouldrepresent  an  improvement  if TCP, when it received a packet, could askthe layer above whether or not it would  be  worth  pausing  for  a  fewmilliseconds  before  sending  an acknowledgement in order to see if the                                   15upper  layer  would  have  any  outgoing  data to send.  Dallying beforesending  the  acknowledgement  produces  precisely  the  right  sort  ofoptimization  if  the client of TCP is server Telnet.  However, dallyingbefore sending an acknowledgement is absolutely unacceptable if  TCP  isbeing used for file transfer, for in file transfer there is almost neverdata  flowing  in  the  reverse  direction, and the delay in sending theacknowledgement probably translates directly into a delay  in  obtainingthe  next  packets.  Thus, TCP must know a little about the layers aboveit to adjust its performance as needed.     It would be possible to imagine a general  purpose  TCP  which  wasequipped  with  all  sorts of special mechanisms by which it would querythe layer above and modify its behavior accordingly.  In the  structuressuggested above, in which there is not one but several TCPs, the TCP cansimply  be modified so that it produces the correct behavior as a matterof course.  This structure has  the  disadvantage  that  there  will  beseveral  implementations  of TCP existing on a single machine, which canmean more maintenance headaches if a problem is found where TCP needs tobe changed.  However, it is probably the case that each of the TCPs willbe substantially simpler  than  the  general  purpose  TCP  which  wouldotherwise  have  been  built.    There  are  some  experimental projectscurrently under way which suggest that this approach may make  designingof  a  TCP, or almost any other layer, substantially easier, so that thetotal effort involved in bringing up a complete package is actually lessif this approach is followed.  This approach is by  no  means  generallyaccepted, but deserves some consideration.                                   16     The  general conclusion to be drawn from this sort of considerationis that a layer boundary has both a benefit and a penalty.    A  visiblelayer  boundary,  with  a  well  specified interface, provides a form ofisolation between two layers which allows one to  be  changed  with  theconfidence  that  the  other  one  will  not  stop  working as a result.However, a firm layer boundary almost inevitably  leads  to  inefficientoperation.    This  can  easily be seen by analogy with other aspects ofoperating systems.  Consider, for example,  file  systems.    A  typicaloperating  system  provides  a file system, which is a highly abstractedrepresentation of a disk.   The  interface  is  highly  formalized,  andpresumed  to  be highly stable.  This makes it very easy for naive usersto have access to  disks  without  having  to  write  a  great  deal  ofsoftware.  The existence of a file system is clearly beneficial.  On theother  hand,  it is clear that the restricted interface to a file systemalmost inevitably leads to inefficiency.  If the interface is  organizedas  a  sequential read and write of bytes, then there will be people whowish to do high throughput transfers who cannot achieve their goal.   Ifthe  interface  is  a  virtual  memory  interface, then other users willregret the necessity of building a byte stream interface on top  of  thememory  mapped file.  The most objectionable inefficiency results when ahighly sophisticated package, such as a data  base  management  package,must  be  built  on  top  of  an  existing  operating  system.    Almostinevitably, the implementors of the database system  attempt  to  rejectthe  file  system  and  obtain  direct  access  to the disks.  They havesacrificed modularity for efficiency.     The same conflict appears in networking, in a rather extreme  form.                                   17The concept of a protocol is still unknown and frightening to most naiveprogrammers.   The idea that they might have to implement a protocol, oreven part of a protocol, as part  of  some  application  package,  is  adreadful thought.  And thus there is great pressure to hide the functionof  the  net behind a very hard barrier.  On the other hand, the kind ofinefficiency which results from this is a particularly undesirable  sortof  inefficiency, for it shows up, among other things, in increasing thecost of the communications resource used up to achieve  the  applicationgoal.   In cases where one must pay for one's communications costs, theyusually turn out to be the dominant cost within the system.  Thus, doingan excessively good job of packaging up the protocols in  an  inflexiblemanner  has  a  direct  impact  on  increasing  the cost of the criticalresource within the system.  This is a dilemma which will probably  onlybe solved when programmers become somewhat less alarmed about protocols,so that they are willing to weave a certain amount of protocol structureinto their application program, much as application programs today weaveparts  of  database  management  systems  into  the  structure  of theirapplication program.     An extreme example of putting the protocol package  behind  a  firm

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -