IPC Flashcards

1
Q

What is Inter-process communication?

A
  • Allows for the exchange of data between multiple processes (or threads within processes)
  • The processes can reside and run on different computers (but connected by a network)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List 4 Reasons for using IPC

A
  1. Sharing data
  2. Accessing remote services
  3. Computational efficiency
  4. Distributed applications
    e. g. iCloud, iTunes, mobile games, social networking, Skype, Facetime, shared whiteboards, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

List some characteristics of inter-process communication

A
  • Message passing between two processes via send and receive
  • May involve the synchronisation of the two processes
  • Synchronous and Asynchronous communication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is synchronous communication?

A

Sender and receiver synchronise (send and receive are blocking operations)

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

What is asynchronous communication?

A

Send is non-blocking; sender is allowed to continue

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

What is meant by reliability?

A
  • Guaranteed delivery despite a ‘reasonable’ number of packets being dropped or lost
  • Integrity - messages must arrive uncorrupted and without duplication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between unicast and multicast communication?

A
  • Unicast communication is from one process to a single other process (e.g. socket communication)
  • Multicast is communication from one process to a group of processes (e.g. publish / subscribe message model)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

List 4 characteristics of Internet Protocol (IP)

A
  1. Delivers data packets to network devices
  2. Uses logical IP addresses for devices (rather than physical MAC, Media Access Control, addresses)
  3. IP address consists of a network part and a host part and is a ‘routable’ protocol – can forward packets to another network (i.e. inter-networking)
  4. An internet - two or more connected TCP/IP networks that can be reached by routing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

List 6 characteristics of Transmission Control Protocol (TCP)

A
  1. Connection-oriented ‘Transport layer’ protocol.
  2. Allows data packets to be sent reliably between devices (on same or different network).
  3. Ensures packet delivery if at all possible by establishing a connection with the receiving device and then sending the packets.
  4. Resends packets if they don’t arrive.
  5. Connection closed only after packet has been successfully delivered or an unrecoverable error has occurred.
  6. Used for one-to-one communications. (User Datagram Protocol (UDP) is used for multicast / broadcast).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Give examples of applications that rely on TCP

A
  • Web browser / server uses HTTP to send request / replies via TCP
  • Telnet (terminal emulation)
  • FTP (file transfer protocol – used for file exchange)
  • SMTP (simple mail transfer protocol).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

List 4 characteristics of User Datagram Protocol (UDP)

A
  1. Connectionless Transport layer protocol
  2. Used when the overhead of a connection isn’t required.
  3. Doesn’t guarantee delivery - UDP places a packet on the network (via the IP protocol) and forgets about it.
  4. Programmer may have to deal with confirming delivery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Give examples of applications that rely on UDP

A
  • DNS, the Domain Name System; used to lookup domain names / ip addresses. DNS sends a UDP packet to a DNS server to look up the domain and the domain’s IP address is returned in another UDP packet.
  • SNMP (Simple Network Management Protocol)
  • DHCP (Dynamic Host Configuration Protocol)
  • Voice and video applications normally use UDP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a socket address?

A

A socket address is a communication identifier that consists of a port number and an Internet address

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

Describe datagram communication?

A
  • Connectionless protocol – message-passing abstraction
  • Enables a sending process to transmit a single message to a receiving process
  • Each time you send datagrams, you also need to send local socket descriptor and the receiving socket’s address. - Additional data must be sent each time a communication is made
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe Stream Communication

A
  • Connection-oriented protocol – stream abstraction
  • A connection must first be established between pair of sockets. Two-way stream between sender and receiver.
  • One socket (the server) listens for a connection request, the other (a client) asks for a connection.
  • Once the sockets have been connected, data can be transmitted in one or both directions.
  • Information communication consists of a stream of data items with no message boundaries.
  • Used to implement some services such as remote login and file transfer.
  • Streams provide building blocks for producer-consumer communication - items ‘produced’, ‘queued’ and ‘consumed’.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Is UDP reliable?

A

No, there is no guarantee that the datagrams sent will be received in the same order by the receiving socket.

17
Q

Is TCP reliable?

A

Yes, it is guaranteed that packets will be received in the order in which they were sent.

18
Q

What are the size limits of data packages that can be sent via UDP or TCP?

A

UDP - 64KB

TCP - Unlimited

19
Q

What is the Java API for internet addresses?

A

InetAddress aComputer = InetAddress.getByName(“php.infc.ulst.ac.uk”);

20
Q

Describe an I/O stream?

A
  1. An I/O Stream represents an input source or an output destination.
  2. Supports different kinds of data:
    - bytes, primitive data types, localized characters, and objects.
    - some streams simply pass on data; others might modify the data.
  3. All streams have the same simple model for programs that use them: a stream is a sequence of data.
  4. A program uses an input stream to read data from a source, one item at a time
  5. A program uses an output stream to write data to a destination, one item at time