Discussion Section for November 8, 2012: Introduction to MP7
In Discussion Section
In ds9, you will use select() to perform I/O multiplexting. In ds9, you should:
- Create two pipes to communite with the two threads that are provided for you
- Launch the two threads, passing in the write-end of one of the pipes to each thread (each thread should get a unique fd)
- Use select() to read from the two pipes as soon as data is available
Compiling and Running
To compile and run, use the following commands from a terminal on a Linux machine:
$ make
$ ./ds9