This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 4003-440 and 4003-713 Operating SystemsHomework #5Due January 22, 2007Name: _______TJ Wasik________________________Section: ____________01____________1. Write a multithreaded Pthreads program called sieve.c that outputs prime numbers using the Sieve of Eratosthenes algorithm. See http://en.wikipedia.org/wiki/Sieve_of_Eratosthenesfor information on the algorithm. This program should work as follows: The user will run the program and will enter a number on the command line. The program will then create a separate thread that outputs all the prime numbers less than or equal to the number entered by the user. Submit your code using:submit v 440-grd homework-5-01 sieve.cif you are in section 01, orsubmit v 440-grd homework-5-02 sieve.cif you are in section 02.2. Why is it important for the scheduler to distinguish I/O-bound programs from CPU-bound programs?Because I/O bound operations just use a little CPU resources and the wait for I/O so if you can determine which ones they are you can get them done and then go on to...
View Full Document
- Winter '06