1 / 17

Scheuduling

Scheuduling. Operating System Examples. Solaris scheduling Windows XP scheduling Linux scheduling. Solaris Dispatch Table. Solaris Scheduling. Unix Scheduling. Interactive processes are favored

marion
Download Presentation

Scheuduling

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scheuduling

  2. Operating System Examples • Solaris scheduling • Windows XP scheduling • Linux scheduling

  3. Solaris Dispatch Table

  4. Solaris Scheduling

  5. Unix Scheduling • Interactive processes are favored - Small CPU time slices are given to processes by a priority algorithm Round Robin for CPU-bound jobs • The more CPU time a process accumulates, the lower its priority becomes (negative feedback) • “Process aging” prevents starvation • Multi-level Feedback Queue with Round Robin within each priority queue • Priority is based on process type and execution history

  6. Windows XP Priorities

  7. Linux Scheduling • Constant order O(1) scheduling time • Two priority ranges: time-sharing and real-time • Real-time range from 0 to 99 and nice value from 100 to 140 • (figure 5.15)

  8. Linux Scheduling • Each process gets a time quantum, based on its priority • - Two arrays of runnable processes, active and expired • - Processes are selected to run from the active array • - When quantum exhausted, process goes on expired • - When active is empty, swap the two arrays

  9. Priorities and Time-slice length

  10. List of Tasks Indexed According to Priorities

  11. Algorithm Evaluation • Deterministic modeling – takes a particular predetermined workload and defines the performance of each algorithm for that workload • Queueing models • Implementation

  12. Evaluation of CPU schedulers by Simulation

  13. Java Thread Scheduling • JVM Uses a Preemptive, Priority-Based Scheduling Algorithm • FIFO Queue is Used if There Are Multiple Threads With the Same Priority

  14. Java Thread Scheduling (cont) JVM Schedules a Thread to Run When: • The Currently Running Thread Exits the Runnable State • A Higher Priority Thread Enters the Runnable State * Note – the JVM Does Not Specify Whether Threads are Time-Sliced or Not

  15. Time-Slicing Since the JVM Doesn’t Ensure Time-Slicing, the yield() Method May Be Used: while (true) { // perform CPU-intensive task . . . Thread.yield(); } This Yields Control to Another Thread of Equal Priority

  16. Thread Priorities PriorityComment Thread.MIN_PRIORITY Minimum Thread Priority Thread.MAX_PRIORITY Maximum Thread Priority Thread.NORM_PRIORITY Default Thread Priority Priorities May Be Set Using setPriority() method: setPriority(Thread.NORM_PRIORITY + 2);

  17. Solaris 2 Scheduling

More Related