Distributed systems Flashcards

1
Q

What is a distributed system?

A

• A collection of loosely coupled nodes interconnected by a communication network.
• Each node views its own resources as local; others are remote.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why are nodes in distributed systems referred to as sites or hosts?

A

• ‘Site’ indicates the location of a machine.
• ‘Node’ refers to a specific system at a site.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main benefits of distributed systems?

A

• Reliability
• Scalability
• Flexibility
• Speedup
• Openness
• High performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What challenges do distributed systems face?

A

• Troubleshooting difficulties
• Software support limitations
• High network infrastructure costs
• Security vulnerabilities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do distributed systems improve reliability?

A

• By continuing operation despite individual site failures, leveraging redundancy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do processes communicate across different hosts?

A

• By exchanging messages over a communication network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What defines a client and server in communication?

A

• Client: Initiates the communication session.
• Server: Waits to be contacted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a socket in networking?

A

• A logical door between processes across networks, allowing data sending and receiving.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does a socket’s destination address include?

A

• Destination host’s IP address
• Destination port number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two main types of sockets?

A

• UDP Socket: Connectionless, unreliable, datagram-oriented
• TCP Socket: Connection-oriented, reliable, byte stream-oriented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In the basic client-server diagram, what role does Site A play?

A
  • Site A acts as the server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is happening between Site A and Site B?

A
  • Communication between the server at Site A and the client at Site B over a network.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How is the socket used in the UDP client-server diagram?

A
  • Client creates a socket and sends a datagram to the server without handshaking.
  • Server reads the datagram and responds via the socket.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What Python function is used by the UDP client to send data?

A
  • clientSocket.sendto()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In the UDP server Python script, what happens inside the while True loop?

A
  • Server reads a message, capitalizes it, and sends it back to the client.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How are messages transmitted in UDP communication?

A
  • As independent, connectionless datagrams.
17
Q

What buffer size is used for receiving messages in the UDP examples?

A
  • 2048 bytes
18
Q

What is the TCP three-way handshake?

A
  • A connection setup procedure involving SYN, SYN-ACK, ACK messages.
19
Q

In TCP server code, what does serverSocket.listen(1) do?

A
  • Listens for incoming TCP connection requests.
20
Q

After accepting a client connection, what socket is used for data transfer?

A
  • connectionSocket
21
Q

How does TCP differ from UDP regarding reliability?

A
  • TCP guarantees reliable, ordered, and error-checked delivery.
22
Q

What happens when a TCP client connects to a server?

A
  • The server spawns a new socket to manage communication with that specific client.
23
Q

What is the main functionality of the EchoServer application?

A
  • Receives a message from the client and sends it back unchanged.
24
Q

How does the client handle messages in the EchoServer protocol?

A
  • Read message from user
  • Send message to server
  • Receive echoed message
  • Display message
25
How does the Knock-Knock network application differ from EchoServer?
* It includes jokes managed by an additional server class (KKState).
26
What does an RPC system provide to the client and server?
* Stubs that hide communication details.
27
What are the steps in an RPC?
* Client calls stub → Stub marshals parameters → Network transmission → Server stub invokes remote procedure → Results returned
28
What is 'marshalling' in RPC communication?
* Packaging parameters into a form suitable for network transmission.
29
What is a pipe in operating systems?
* A channel allowing two processes to communicate.
30
How do ordinary pipes differ from named pipes?
* Ordinary Pipes: Unidirectional, parent-child only * Named Pipes: Bidirectional, support unrelated processes
31
In the pipe diagram, which file descriptor is used for reading?
* fd[0]
32
What are examples of network applications?
• Web browsers (HTTP/HTTPS) • Email clients (SMTP) • File transfers (FTP)
33
What does TCP provide that UDP does not?
• Reliable transport, flow control, congestion control
34
What security measures can be added to TCP communication?
• TLS/SSL encryption for confidentiality and authentication.