NachOS 3 - Practical presentation

Transcripts - NachOS 3 - Practical presentation

2.
Networking on NachosPractical partWe found that nachOS already providesmessage delivery with this characteristics:● Unreliable● Has fixed-size● Messages can be dropped

3.
PostOffice ClassThis class is defined in the files post.h and post.cc in thenetwork directoryThis class is like its name a postoffice or a collection ofmailboxes.Here its defined two main operations:● Send -> send a message to a remote machine● Receive-> waits for a message in the mailboxIn this class are used threads for sending messages and forreceiving messages in the mailbox.

4.
Mail ClassThis class defines the format of themessages that will be sent and receivedThe constructor of this class initialize onlyone message, by using:● PacketHeader● MailHeader

5.
MailHeader ClassIs a part of the message that is put at thebegining of the message by the PostOfficebefore the message is sent.This header contains:● Destination mailbox address● Number of bytes in the message

6.
MailBoxDefines a single mailbox for receivingmessages.Incoming messages are placed by thePostOffice into the mailbox.So the messages can be taken by a threadof the machine that is receiving the messageA mailbox is implemented as a list ofmessages using SynchList object

7.
NetworkThe emulation of a physical networkconnection is implemented in the filesnetwork.h and network.cc in the machinedirectory.In this file (network.cc) is defined the classPacketHeader, which defines that, a packetheader.