Showing posts with label IS215 - Processor Management. Show all posts
Showing posts with label IS215 - Processor Management. Show all posts

Saturday, November 24, 2007

IS215 - Processor Management Exercises - 2

11. Explain what is a fair scheduling algorithm?

12. What are the objectives of CPU scheduling?

Answer

The main objective of CPU scheduling is "to allocate the CPU so as to optimize system performance without sacrificing user convenience... To achieve the objective of CPU scheduling, we need to provide a good performance using the measures outlined above, meet user specified deadlines, and provide good utilization of other system resources."

13.Describe the advantages and disadvantages of two short-term scheduling policies that could be used to select which process next enters the run state.

14. State an undesirable feature associated with each of the following scheduling algorithms:
a) First-come-first-serve
b) Shortest job first
c) Shortest remaining processing

15. Round robin schedulers normally maintain a list of all runnable processes, with each process occurring exactly once in the list. What would happen if a process occurred twice in the list? Can you think of any reason for allowing this?

16. When is the response time of a process different from its waiting time.

17. Most operating systems usually use a two-level scheduler.
a) Give two advantages of this set-up.
b) Give two disadvantages of this set-up.
c) Describe the actions of a two-level scheduler when it is called to select a process to be dispatched.

18. Minimizing mean response time is the same as maximizing throughput. Prove this 'statement.

19. Evaluate the scheduling algorithms
a) First-Come-First-Serve
b) Shortest Job Next
c) Shortest Remaining Processing Time

in terms of the following criteria:
CPU utilization
throughput
turnaround time
waiting time.

20. Short time slices means better response times. Explain why this is so?

IS215 - Processor Management Exercises - 1

Making use of the decryption routine before, I took the exercises contents in the single processor PDF for a ride. However it turned out that the text in text areas don't render pasted text from the clipboard properly especially for non-alphanumeric characters. If I end up having free time soon, I'll try and refine the functionality further. Right now, I need to sleep already.

Anyway, here are the exercises for the processor management chapter after a few tweaks from the resulting text:


1. Providing good response time at a terminal might introduce large overheads that in effect will reduce the overall CPU utilization. Explain what are these overheads that will reduce CPU utilization.

2. When we view all the processes in the system, we can see that a state transition by one process could cause another process to make a state transition. Under what circumstances, if any, could the following cause-and-effect transitions occur?

a) block -> dispatch
b) preempt -> dispatch
c) block -> preempt
d) wake-up -> dispatch

3. Under what circumstances, if any, would the following transitions cause no other immediate transitions:

a) dispatch
b) preempt
c) block
d) wake-up

4. Differentiate preemptive from non-preemptive scheduling in terms of when to change the program currently in control of the CPU.

Answer

Preemptive scheduling refers to a scheduling strategy where "the CPU is suspended when a higher priority process is in the ready queue" while non-preemptive scheduling refers to a scheduling strategy where "even if a higher priority process is ready, the running process is allowed to continue until either it is blocked or completes its execution."

5. When no process is ready to take control of the CPU, we need to have something to keep the CPU busy. Why?

6. State the effect of

a) time slicing; and
b) increasing the time for one interaction

on the response time of a process.


7. What is the purpose of a dispatcher in an operating system? Illustrate your answer by showing the sequence of events and dispatcher actions that occur when a process enters the run state from the ready state.

8. Differentiate high-level scheduling of jobs and low-level scheduling of processes.

Answer

High-level scheduling of jobs refers to swapping processes in and out of memory. Issues concerning high-level scheduling include deciding if another process can still run, whether the process table is full, whether the user process limit has been reached and whether to load to swap space or memory. Low-level scheduling on the other hand refers to deciding which process in memory should get CPU time next.

9. The scoring system in high-level scheduling usually "age". Why is there a need to "aged" the scores?

10. Short-term scheduling can either be preemptive or non-preemptive. Differentiate these two methods of short-term scheduling.