As you probably expected, we will now conclude this chapter with several questions to test your understanding of the material in this chapter:
- Why will reading from std::cin flush std::cout?
- What is the difference between a unit-buffered, a line-buffered, a fully-buffered, and an unbuffered stream?
- Why is std::iostream slower than std::filebuf, and why is fprintf() slower than puts()?
- Why is Linux killing processes if it feels like it?
- What is a page fault? What are their soft and hard page faults?
- What is thrashing?
- You are on Windows. You are starting up a program and your disk starts spinning like crazy. How would you investigate this problem?
- You are on a 32-bit system and have to hold several big images in memory. Then, you have to read another one from the camera, but there is not enough memory left. What do you do?