210 Multithreading is a technique in which a process executing an application

210 multithreading is a technique in which a process

This preview shows page 12 - 15 out of 112 pages.

2.10 Multithreading is a technique in which a process, executing an application, is divided into threads that can run concurrently. A A NSWERS TO NSWERS TO P P ROBLEMS ROBLEMS 2.1 The answers are the same for (a) and (b) . Assume that although processor operations cannot overlap, I/O operations can. 1 Job: TAT = NT Processor utilization = 50% 2 Jobs: TAT = NT Processor utilization = 100% 4 Jobs: TAT = (4N – 2)T Processor utilization = 100% 2.2 I/O-bound programs use relatively little processor time and are therefore favored by the algorithm. However, if a processor-bound process is denied processor time for a sufficiently long period of time, the same algorithm will grant the processor to that process since it has not used the processor at all in the recent past. Therefore, a processor-bound process will not be permanently denied access. 2.3 With time sharing, the concern is turnaround time. Time-slicing is preferred because it gives all processes access to the processor over a short period of time. In a batch system, the concern is with throughput, and the less context switching, the more processing time is available for the processes. Therefore, policies that minimize context switching are favored.
Image of page 12
-13- 2.4 A system call is used by an application program to invoke a function provided by the operating system. Typically, the system call results in transfer to a system program that runs in kernel mode. 2.5 The system operator can review this quantity to determine the degree of "stress" on the system. By reducing the number of active jobs allowed on the system, this average can be kept high. A typical guideline is that this average should be kept above 2 minutes [IBM86]. This may seem like a lot, but it isn't.
Image of page 13
-14- C HAPTER 3 P ROCESS D ESCRIPTION AND C ONTROL A A NSWERS TO NSWERS TO Q Q UESTIONS UESTIONS 3.1 An instruction trace for a program is the sequence of instructions that execute for that process. 3.2 New batch job; interactive logon; created by OS to provide a service; spawned by existing process. See Table 3.1 for details. 3.3 Running: The process that is currently being executed. Ready: A process that is prepared to execute when given the opportunity. Blocked: A process that cannot execute until some event occurs, such as the completion of an I/O operation. New: A process that has just been created but has not yet been admitted to the pool of executable processes by the operating system. Exit: A process that has been released from the pool of executable processes by the operating system, either because it halted or because it aborted for some reason. 3.4 Process preemption occurs when an executing process is interrupted by the processor so that another process can be executed. 3.5 Swapping involves moving part or all of a process from main memory to disk. When none of the processes in main memory is in the Ready state, the operating system swaps one of the blocked processes out onto disk into a suspend queue, so that another process may be brought into main memory to execute.
Image of page 14
Image of page 15

You've reached the end of your free preview.

Want to read all 112 pages?

  • Fall '16
  • M Emad
  • Virtual memory, Central processing unit, ........., main memory

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture