Scheduling Policies. Announcements. Midterm vote: Keep current date (10/17)? Advance prior to 10/12 (drop off deadline)? Quiz 2 graded. Check out your grades on compass periodically
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Q1) Which pthreads function is the closest analogy to fork(), applied to threads? pthread_create() (1 point)
Q2) Which pthreads function is the closest analogy to wait(), applied to threads? pthread_join() (1 point)
Q3) What does the “Test-and-Set” instruction do? It tests a Boolean (returning its current value), and sets it to one atomically (1 point)
Q4) Answer true or false. Correct if wrong. (2 points)
A) All UNIX processes running on the same computer are descendants of the same process. TRUE
B) A child process becomes a “zombie” if it executes exit() but the parent never issues a wait(). TRUE
C) If a parent process sets some global variable x equal to 1 then creates a child process who increments x, the parent will see the incremented value of x only after the child returns. FALSE. It never sees the update.
D) fork() always returns 0 if the operation is successful. FALSE: It can also return child PID.
kill -SIGKILL pid.