March 6, 2006
Coverage:
[USP] Chapter 7
The Fibonacci Series on the Ring
- [USP] §7.4
- in-class exercise
- we were able to compute up to and including
the 78th Fibonacci number, using 77 processes
- using unsigned long long and the %llu conversion
specifier
Flushing Buffers
- standard output is typically line buffered
- means that the buffer is flushed when it contains a newline
- it is on our system
- output written to named pipes on our system is not line buffered
- must explicitly call fflush (stdout), or
- use setvbuf to turn line buffering on
References
[USP] K. A. Robbins and S. Robbins. UNIX Systems Programming: Concurrency,
Communication, and Threads. Prentice Hall, 2003