Lab 4: Tutorial
This is ONLY a preview of the tutorial. If you would like to view the entire tutorial, you must purchase the tutorial.
Understanding Networking
Distribution of computation between several physical processors has become common in computer systems. This document discusses the networking component of operating systems. We first discuss networking in general terms and then explain the network implementation in Nachos.
Networking
Two schemes are in vogue for distributed computation. In a multiprocessor system, the processors share memory and a clock, and communication usually takes place through shared memory. In a distributed system, the processors do not share memory or a clock and communicate with one another through various communication networks, such as high-speed buses or telephone lines. From the point of view of a specific processor in a distributed system, the rest of the processors are remote, whereas its own resources are local. The processors in a distributed system may be called a host, site, or a node. When a process at site A wants to communicate with a process at site B, the message needs to routed properly to that site. This is the responsibility of a router. It can either be a host computer with routing software or a special-purpose device. Various routing protocols exist for determining the actual route on which a message will be sent.
The sites in a distributed network can be connected physically in a number of ways. We list the most common ones below:
Fully Connected Networks Each site is directly linked with all other sites in the system. The cost of this configuration is high since a direct communication line must be present between all the sites. Messages however, can be sent fast; only one link needs to be used. Reliability of such systems is also high since many links must fail for the system to become partitioned.
Partially Connected Networks Direct links exist between some, but not all pairs of sites. The cost of configuration is lower than that of the above scheme. However, a message from one site to another may have to be sent through several intermediate sites, resulting in slower communication.
Hierarchical Networks The sites are organized as a tree. Each site has a unique parent and possibly some children. The parent and the child communicate directly and the children communicate through the parent site. In general, the failure of any node (except a leaf) in this configuration partitions the network into several disjoint sub trees. This configuration is commonly used for corporate networks.
Star Networks One of the sites in the system is connected to all other sites. None of the other sites are connected to any other. The cost of this system is linear in the number of sites. The communication cost is also low, because a message requires at most two transfers.
Ring Networks Each site is connected to exactly two other sites. The ring can either be unidirectional or bi-directional. In the former, a site can send a message to only one of its neighbors and all the sites must send the messages in the same direction. A single site failure partitions the network in this case. In a bi-directional ring, a site can send a message to both of its neighbors. However, two links must fail before the network is partitioned.
Multi-access Bus Networks There is a single shared link (the bus) to which all sites in the network are connected. The sites may be organized as a straight line or as a ring and communicate directly with each other through the shared link. The failure of one site does not affect communication along the link. However, if the link fails, the network is partitioned completely. The Ethernet network is based on this model.
Hybrid Networks Different types of networks are connected together. That is, each site in the network can have a different configuration. Communication between sites is complicated because multiple protocols must be followed.
The actual design (and implementation) of a network is specified by the International Standards Organization (ISO). In the ISO model, the network is organized as seven layers on each site. Each layer on a site communicates with the equivalent layer on the remote site. These are briefly listed below:
Physical Layer Concerned with transmitting raw bits over a communication channel.
Data-link Layer Responsible for handling the frames, or fixed-length parts of packets, including any error detection and recovery that occurred in the physical layer.
Network Layer Responsible for providing connections and for routing packets in the communication network. Routers work at this layer.
Transport Layer Responsible for low-level access to the network and for transfer of messages between the clients.
Session Layer Responsible for implementing sessions, or process-to-process communication protocols.
Presentation Layer Responsible for resolving the differences in formats among the various sites in the network, including character conversions.
Application Layer Interacts directly with the users of the network. Deals with file transfer, remote-login protocols, email etc.
Networking in Nachos
Nachos provides the abstraction of unreliable, ordered, fixed-size message delivery to mailboxes on other directly connected machines. Messages can be dropped by the network but are never corrupted. Any thread running on Nachos can send a message to a mailbox on a directly connected machine using the PostOffice object. The PostOffice delivers packets to a specific buffer (a MailBox), based on the mailbox number stored in the packet header. Mail waits in the mailbox until a thread asks for it; if the mailbox is empty, threads can wait for mail to arrive in it. Thus, the PostOffice de-multiplexes incoming packets, delivering them to the appropriate thread. Each message contains a return address which is the id of the machine that sent the message, and a from box which is the number of the mailbox on the sending machine to which the receiving thread can send an acknowledgement.
This is ONLY a preview of the tutorial. If you would like to view the entire tutorial, you must purchase the tutorial.
Each tutorial comes with the following:
Assignment overview. Details on each topic in a general level and how they are implemented in Nachos.
Walk-through. A complete step-by-step guide on how to implement the code necessary to complete each assignment.
Frequently asked questions. Questions and answers to common problems students face while completing each assignment.
Helpful links. Links to academic and other websites that offer Nachos assistance and documentation.
Documentation. Detailed documentation listing all of the classes, structures, functions defined in Nachos.
Roadmap. High-level overview of the source code, focusing on the big picture rather than on the details.
Source code. The source code solution to each assignment.
This includes both documentation on understanding the concepts for each assignment and how to get started. Topics are accompanied with animations.
All 5 Assignments Tutorial Package |
$149.99 Save 40% |
|
Thread Synchronization Assignment Tutorial |
$29.99 |
|
Multiprogramming and System Calls Assignment Tutorial |
$49.99 |
|
Virtual Memory Assignment Tutorial |
$49.99 |
|
Distributed Networking Assignment Tutorial |
$39.99 |
|
File System Assignment Tutorial |
$39.99 |
|
|
Nachos
Tutorials
Roadmap
Source Code
Introduction
Threads
Interrupts
Synchronization
System Calls
Exception Handling
Multiprogramming
File System
Networking
Tutorials
Lab 1 Tutorial
Lab 2 Tutorial
Lab 3 Tutorial
Lab 4 Tutorial
Lab 5 Tutorial
|