homework about threads and scheduling