Solution Manual for Operating Systems Design and Implementation 3E 3rd Edition

Solution Manual for Operating Systems Design and Implementation 3E 3rd Edition

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

View Full Document Right Arrow Icon
3 SOLUTIONS TO CHAPTER 2 PROBLEMS 1. It is central because there is so much parallel or pseudoparallel activity— multiple user processes and I/O devices running at once. The multiprogramming model allows this activity to be described and modeled better. 2. The states are running, blocked and ready. The running state means the process has the CPU and is executing. The blocked state means that the process cannot run because it is waiting for an external event to occur, such as a message or completion of I/O. The ready state means that the process wants to run and is just waiting until the CPU is available. 3. You could have a register containing a pointer to the current process table entry. When I/O completed, the CPU would store the current machine state in the current process table entry. Then it would go to the interrupt vector for the interrupting device and fetch a pointer to another process table entry (the service procedure). This process would then be started up. 4. Generally, high level languages do not allow one the kind of access to CPU hardware that is required. For instance, an interrupt handler may be required to enable and disable the interrupt servicing a particular device, or to
Image of page 1

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

View Full Document Right Arrow Icon
4 PROBLEM SOLUTIONS FOR CHAPTER 2 manipulate data within a process’ stack area. Also, interrupt service routines must execute as rapidly as possible. 5. The figure looks like this 1 2 3 4 Blocked Running Ready 1. Process blocks for input 2. Scheduler picks another process 3. Scheduler picks this process 4. Input becomes available 5. Process is terminated New Terminated 5 0 0. New process made ready 6. It would be difficult, if not impossible, to keep the file system consistent using the model in part (a) of the figure. Suppose that a client process sends a request to server process 1 to update a file. This process updates the cache entry in its memory. Shortly thereafter, another client process sends a request to server 2 to read that file. Unfortunately, if the file is also cached there, server 2, in its innocence, will return obsolete data. If the first process writes the file through to the disk after caching it, and server 2 checks the disk on every read to see if its cached copy is up-to-date, the system can be made to work, but it is precisely all these disk accesses that the caching system is try- ing to avoid. 7. A process is a grouping of resources: an address space, open files, signal handlers, and one or more threads. A thread is just an execution unit. 8. Each thread calls procedures on its own, so it must have its own stack for the local variables, return addresses, and so on. 9. A race condition is a situation in which two (or more) process are about to perform some action. Depending on the exact timing, one or other goes first.
Image of page 2
Image of page 3
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