Download presentation
1
Homework Assignment #2 J. H. Wang Nov. 1, 2013
2
Homework #2 Chap.4: 4.2, 4.19* Chap.5: 5.8, 5.19, 5.22
(Optional: End-of-chapter project for Chap. 4 & 6) Due: two weeks (Nov. 15, 2013)
3
Chap. 4 4.2: Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-threaded solution on a single-processor system?
4
4. 19. : Write a multithreaded program that outputs prime numbers
4.19*: Write a multithreaded program that outputs prime numbers. 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.
5
Optional End-of-Chapter Programming Projects
Programming Project for Chap. 4: 1. Sudoku solution validator Passing parameters to each thread Returning results to the parent thread 2. Multithreaded sorting application
6
Optional End-of-Chapter Programming Projects
Programming Projects for Chap. 6: Project 1: The Sleeping Teaching Assistant Room: 1 desk with a chair and computer Hallway: 3 chairs POSIX threads, mutex locks, and semaphores Project 2: The Dining Philosophers Problem Pthread mutex locks and condition variables Project 3: Producer-Consumer Problem Producer and consumer threads Pthreads mutex locks/semaphores Windows mutex locks/semaphores
7
Any Question or Comments?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.