NACHOS 3
Networking and encryption
Networking on Nachos
Practical part


We found that nachOS already provides
message delivery with this characteristics:

● Unreliable
● Has fixed-size
● Messages can be dropped
PostOffice Class
This class is defined in the files post.h and post.cc in the
network directory

This class is like its name a postoffice or a collection of
mailboxes.

Here its defined two main operations:
●   Send -> send a message to a remote machine
●   Receive-> waits for a message in the mailbox

In this class are used threads for sending messages and for
receiving messages in the mailbox.
Mail Class
This class defines the format of the
messages that will be sent and received

The constructor of this class initialize only
one message, by using:

● PacketHeader
● MailHeader
MailHeader Class
Is a part of the message that is put at the
begining of the message by the PostOffice
before the message is sent.

This header contains:
● Destination mailbox address
● Number of bytes in the message
MailBox
Defines a single mailbox for receiving
messages.

Incoming messages are placed by the
PostOffice into the mailbox.

So the messages can be taken by a thread
of the machine that is receiving the message

A mailbox is implemented as a list of
messages using SynchList object
Network
The emulation of a physical network
connection is implemented in the files
network.h and network.cc in the machine
directory.

In this file (network.cc) is defined the class
PacketHeader, which defines that, a packet
header.
NachOS 3 - Practical presentation

NachOS 3 - Practical presentation

  • 1.
  • 2.
    Networking on Nachos Practicalpart We found that nachOS already provides message delivery with this characteristics: ● Unreliable ● Has fixed-size ● Messages can be dropped
  • 3.
    PostOffice Class This classis defined in the files post.h and post.cc in the network directory This class is like its name a postoffice or a collection of mailboxes. Here its defined two main operations: ● Send -> send a message to a remote machine ● Receive-> waits for a message in the mailbox In this class are used threads for sending messages and for receiving messages in the mailbox.
  • 4.
    Mail Class This classdefines the format of the messages that will be sent and received The constructor of this class initialize only one message, by using: ● PacketHeader ● MailHeader
  • 5.
    MailHeader Class Is apart of the message that is put at the begining of the message by the PostOffice before the message is sent. This header contains: ● Destination mailbox address ● Number of bytes in the message
  • 6.
    MailBox Defines a singlemailbox for receiving messages. Incoming messages are placed by the PostOffice into the mailbox. So the messages can be taken by a thread of the machine that is receiving the message A mailbox is implemented as a list of messages using SynchList object
  • 7.
    Network The emulation ofa physical network connection is implemented in the files network.h and network.cc in the machine directory. In this file (network.cc) is defined the class PacketHeader, which defines that, a packet header.