CS代写 CMPUT 379 Lab Seminars

CMPUT 379 Lab Seminars
Discussion questions:
1. Assume that process A sends a long stream of data to process B through a FIFO. Can one detect the transmission activity by monitoring the ¡°size¡± of the FIFO on the file system (e.g., by repeatedly issuing a “ls -l” command)?
CMPUT 379 (E.S. Elmallah)

Copyright By PowCoder代写 加微信 powcoder

2. Can two processes running on two different hosts in the lab communicate using a FIFO?
Assume that both processes and the FIFO are owned by the same user.
CMPUT 379 (E.S. Elmallah)

Assume that A and B run on the same host.
Process A first opens a FIFO in the O_RDWR mode and waits for input from the user (without writing to the FIFO). Subsequently, while A is waiting for the user input, process B attempts to open the FIFO in a O_RDONLY mode.
Does B block when calling open()? CMPUT 379 (E.S. Elmallah)

4. Each of the following loops is intended to read one line from the stdin, and then echoes the line to the stdout using low level unbuffered I/O functions (commonly used in client-server programs).
Which loop (if any) works properly? Explain.
CMPUT 379 (E.S. Elmallah)

CMPUT 379 (E.S. Elmallah)

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com