1 / 18

Project: Protocol Development Framework for Virtual Networking

Project: Protocol Development Framework for Virtual Networking. Fred Kuhns Computer Science and Engineering Applied Research laboratory Washington University in St. Louis. Layered Protocol Stacks. Host A. Host B. get page. netscape. Apache. html document. HTTP: get url. HTTP. HTTL.

tien
Download Presentation

Project: Protocol Development Framework for Virtual Networking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project:Protocol Development Framework for Virtual Networking Fred Kuhns Computer Science and Engineering Applied Research laboratory Washington University in St. Louis

  2. Layered Protocol Stacks Host A Host B get page netscape Apache html document HTTP: get url HTTP HTTL HTTP: response: TCP: port, ctl, PDU TCP TCP TCP: port, ctl, PDU IP: addr, type, ctl, PDU IP IP IP: addr, type, ctl, PDU Ether: MAC, type, PDU Ethernet Ethernet Ether: MAC, type, PDU CS422 – Operating Systems Concepts

  3. Layers Architectural Pattern • protocols are a set of processing rules and data formats that describe how entities may communicate • format, content and meaning of messages are defined • routing (finding participants) and forwarding must also be defined • layers correspond to abstractions with the lowest layer concerned with the representation of bits on the physical medium. • OSI defines a 7 layer model: application, presentation, session, transport, network, data link and physical CS422 – Operating Systems Concepts

  4. Layering • Context: Large system requires decomposition • Problem: complexity – the problem domain can be divided into both horizontal and vertical concerns. • vertical: must address both low-level issues such as how 1’s and 0’s are representing on the physical medium and high level issues such as object representation, addressing and routing. • horizontal: communication often must traverse multiple devices in its journey from sender to receiver. The messages may traverse networks implementing different protocol suites requiring bridges and gateways. • Solution: structure solution in layers with each layer exporting a set of services to the layer above it. • Each layer shields lower level layers CS422 – Operating Systems Concepts

  5. Issues for Framework Developers • For each layer: • Specify services • Specify interfaces : consider facade pattern • Communication between layers: push versus pull model or the publish-subscriber and Pipes and Filters patterns. Try callbacks or the command pattern. • Layer coupling: for example one-way coupling where a layer knows about the layer below but not above. Command pattern and Reactor patterns help. Can use base classes and polymorphism for layer decoupling. • Error handling strategy CS422 – Operating Systems Concepts

  6. Protocol Design Issues • Addressing • Direction of message/data travel • Presence of logical channels, for example data and control. Relative priorities. • Error control – error detecting and correcting code. • Preservation of message order • Flow control: deal with possibility of under/over-flow. • Message fragmentation; disassemble, send and reassemble messages that are too large for the underlying communication medium. • Multiplexing and demultiplexing within a layer • Message routing and forwarding CS422 – Operating Systems Concepts

  7. Layer Services • Connection oriented: before communication may begin a connection is established between endpoints. Modeled after telephone service. Generally can expect message order to be preserved. • connection establishment may require negotiation between endpoints • Connectionless: no connection is established. Generally no guarantee message order will be preserved. • Quality of service • reliability: generally implemented by receiver acknowledging receipt of each message • Reliable, connection oriented service • Message stream: message boundaries are preserved • Byte stream: no message boundaries • Reliable, connectionless service: • acknowledges datagram service • Request-reply service • Unreliable, connectionless service • Datagram service CS422 – Operating Systems Concepts

  8. Reference model and concepts • In general the service interface will vary with the provided services. Can you think of a minimum set? Example for a reliable byte stream service • listen • connect • receive • send • disconnect • Three key concepts for each layer: • Services: defines the semantics • Interfaces: how other layers/application access the services. The layer’s syntax. • Protocols: How peer layers communication – the rules along with data format and meaning. CS422 – Operating Systems Concepts

  9. Requirements on framework • asynchronous event notification • directly or indirectly communicate with control entities • classification and table maintenance • queuing disciplines • message buffering • reside in user-space or kernel-space • if provided, requires bandwidth and delay guarantees from network/OS • ability to statically or dynamically bind to upper and lower layers • both global resource management and per communication channel management CS422 – Operating Systems Concepts

  10. TxQ TxQ RxQ RxQ Example layer: Simple Messaging AppN App1 App2 … send(msg) recv(msg) Connection table Mailbox0 MailboxN addr0, app0, Mailbox 4, State … addr1, app1, Mailbox 3, State addr2, app2 Mailbox 5, State … handle_msg(msg) addrN, appN, Mailbox 1, State Simple Message Protocol (SMP) Message: src:dst:control CS422 – Operating Systems Concepts

  11. Message Passing • Mechanisms used for communication and synchronization • Message Passing • message passing interfaces, mailboxes and message queues • sockets, STREAMS, pipes • Shared Memory: Non-message passing systems • In a Message passing system there are no shared variables. IPC facility provides two operations for fixed or variable sized message: • send(message) • receive(message) • If processes P and Q wish to communicate, they need to: • establish a communicationlink • exchange messages via send and receive • Implementation of communication link • physical (e.g., shared memory, hardware bus) • logical (e.g., syntax and semantics, abstractions) CS422 – Operating Systems Concepts

  12. Implementation Questions • How are links established? • Can a link be associated with more than two processes? • How are links made known to processes? • How many links can there be between every pair/group of communicating processes? • What is the capacity of a link? • Is the size of a message that the link can accommodate fixed or variable? • Is a link unidirectional or bi-directional? CS422 – Operating Systems Concepts

  13. Message Passing Systems • Exchange messages over a communication link • Methods for implementing a logical communication link and primitives (send/receive): • Direct or Indirect communications (Naming) • Symmetric or Asymmetric communications • Automatic or Explicit buffering • Send-by-copy or send-by-reference • fixed or variable sized messages CS422 – Operating Systems Concepts

  14. Direct Communication – Internet and Sockets • Processes must name each other explicitly: • Symmetric Addressing • send (P, message) – send to process P • receive(Q, message) – receive from Q • Asymmetric Addressing • send (P, message) – send to process P • receive(id, message) – rx from any; system sets id = sender • Properties of communication link • Links established automatically between pairs • processes must know each others ID • Exactly one link per pair of communicating processes • Disadvantage: a process must know the name or ID of the process(es) it wishes to communicate with CS422 – Operating Systems Concepts

  15. Indirect Communication - Pipes • Messages are sent to or received from mailboxes (also referred to as ports). • Each mailbox has a unique id. • Processes can communicate only if they share a mailbox. • Properties of communication link • Link established only if processes share a common mailbox • A link may be associated with more than 2 processes. • Each pair of processes may share several communication links. • Ownership: • process owns (i.e. mailbox is implemented in user space): only the owner may receive messages through this mailbox. Other processes may only send. When process terminates any “owned” mailboxes are destroyed. • system owns – then mechanisms provided to create, delete, send and receive through mailboxes. Process that creates mailbox owns it (and so may receive through it) but may transfer ownership to another process. CS422 – Operating Systems Concepts

  16. Indirect Communication • Mailbox sharing: • P1, P2, andP3 share mailbox A. • P1, sends; P2andP3 receive. • Who gets the message? • Solutions • Allow a link to be associated with at most two processes. • Allow only one process at a time to execute a receive operation. • Allow the system to select arbitrarily the receiver. Sender is notified who the receiver was CS422 – Operating Systems Concepts

  17. Synchronizing Message Flow • Message passing may be either blocking or non-blocking. • blocking send: sender blocked until message received by mailbox or process • nonblocking send: sender resumes operation immediately after sending • blocking receive: receiver blocks until a message is available • nonblocking receive: receiver returns immediately with either a valid or null message. CS422 – Operating Systems Concepts

  18. Buffering • All messaging system require framework to temporarily buffer messages. These queues are implemented in one of three ways: • Zero capacity – No messages may be queued within the link, requires sender to block until receives retrieves message. • Bounded capacity – Link has finite number of message buffers. If no buffers are available then sender must block until one is freed up. • Unbounded capacity – Link has unlimited buffer space, consequently send never needs to block. CS422 – Operating Systems Concepts

More Related