{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4 - 4003-440 and 4003-713 Operating Systems Homework#4...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
4003-440 and 4003-713 Operating Systems Homework #4 Due January 15, 2007 Name:  __________TJ Wasik ______________________ Section: ____01 ____________________ 1 . The program shown in Figure 4.11 of your textbook (page 148) uses the Pthreads API. What would be output from the program at LINE C and LINE P? Explain your answer (just stating that you ran the program and that was what was output is not acceptable – you must explain why the program produced the output, in terms of threads). The output at line C is 5 because it prints when the pid is 0 the value of 'value' is that of the child, or second thread created, and the output at line P is 0 because that is the output of the first original parent thread. 2. Consider a multiprocessor system and a multithreaded program written using the many-to-many threading model. Let the number of user-level threads in the program be more than the number of processors in the system. Discuss the performance implications of the following scenarios: a. The number of kernel threads allocated to the program is less than the number of processors.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern