关键词 > Python代写

NETWORKS AND OPERATING SYSTEMS ESSENTIALS 2

发布时间:2022-12-12

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

NETWORKS AND OPERATING SYSTEMS

ESSENTIALS 2

1.           Networked Systems

(a)  Describe what is meant by a best-effort service and explain why the Internet offers such a service.      [4]

(b)  The Open Systems Interconnection (OSI) reference model provides a standard layered system model. Name the seven layers used in the OSI reference model, in order from lowest (closest to hardware) to highest (closest to the user), and explain what this layering means for the implementers of each layer.                     [6]

(c)  Consider the network graph pictured below. Nodes represent devices on the network, edges represent links and the numbers by the edges represent the cost of forwarding a message across that link.  Assume that the network is using a Distance Vector protocol, that all message exchanges happen at the beginning of every round of the protocol, and that hosts update their state after they’ve received all messages destined to them in the current round. Show the initial routing state of all nodes in the network, and their routing state after every round of the protocol. In your answer please show the routing table entries (distance/next hop) of all nodes in the network (i.e., a 5 x 5 matrix), for each iteration of the algorithm. Your answer should include 3 such matrices, including the one for the original state (i.e., nodes only know of themselves and their 1-hop neighbours).

A

4

2

B

1

2

1

C

[8]

(d)  At the network layer, the Internet is a connectionless best-effort packet network. On the other hand, the traditional telephone network provides a reliable circuit switched service.  Discuss what are the advantages and disadvantages of these two approaches to network  design.                  [6] (e)  You have written a basic server program in the first assessed exercise for this course, using

the Python programming language and the Berkeley Sockets API. List the basic steps required to set up a server socket, receive a connection and serve it to completion. You can provide either code or a description of the function of the respective code.                   [6]

(f)  Explain what important problem is solved by public-key cryptography that is not solved by symmetric cryptography. Briefly explain why and how public-key cryptography solves this problem.              [4]

2.           Operating Systems

(a)  Consider a cache with 3 slots and the following stream of requests:

C, D, A, B, D, A, C, B, C, D, A

Give the contents of the cache after each request and indicate cache misses, when the cache is using (i) the LRU algorithm (5 marks) and (ii) the LFU algorithm (5 marks). Show your work (i.e., recentness order for LRU, frequency of access for LFU).           [10]

(b)  Consider the following set of processes:

Process ID

Arrival Time

Burst Time

Priority

P1

0

5

2

P2

1

2

3

P3

1

3

1

P4

3

5

2

P5

6

1

1

Show the scheduling order and execution times of individual process, and compute the turnaround time of each process and the average waiting time over all processes, for each of the following scheduling algorithms: FCFS, SJF, non-preemptive priority (a smaller priority number implies a higher priority), and pre-emptive RR (quantum = 3).                       [16]