NachOS 3 - Practical presentation

8

Click here to load reader

Transcript of NachOS 3 - Practical presentation

Page 1: NachOS 3 - Practical presentation

NACHOS 3

Networking and encryption

Page 2: NachOS 3 - Practical presentation

Practical part

We found that nachOS already provides message delivery with this characteristics: ● Unreliable● Has fixed-size● Messages can be dropped

Networking on Nachos

Page 3: NachOS 3 - Practical presentation

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.

PostOffice Class

Page 4: NachOS 3 - Practical presentation

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

Mail Class

Page 5: NachOS 3 - Practical presentation

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

MailHeader Class

Page 6: NachOS 3 - Practical presentation

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

MailBox

Page 7: NachOS 3 - Practical presentation

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.

Network

Page 8: NachOS 3 - Practical presentation