Notes - MIECT
Sistemas De Operação
Notes - MIECT
Sistemas De Operação
  • Sistemas de Operação
  • Processes in Unix/Linux
    • Process
    • Multiprocessing vs. Multiprogramming
    • Processes in Unix
    • Execution of a C/C++ program
  • Introduction to operating systems
    • Global view
    • Evolution of computational systems
    • Key topics
  • Semaphores and Shared memory
    • Concepts
    • Semaphores
    • Shared memory
    • Unix IPC primitives
  • Threads, mutexes and condition variables in Unix/Linux
    • Threads
      • In linux
    • Monitors
    • Unix IPC primitives
  • Processes
    • Process
      • Diagrams
    • Process control table
    • Context switching
    • Threads
  • Processor Scheduling
    • Processor Scheduler
    • Short-term processor scheduler
    • Scheduling algorithms
    • Scheduling criteria
    • Priorities
    • Scheduling policies
      • In Linux
  • Interprocess communication
    • Concepts
    • Philosopher dinner
    • Access primitives
      • Software solutions
      • Hardware solutions
    • Semaphores
    • Monitors
    • Message-passing
    • Unix IPC primitives
  • Deadlock
    • Introduction
    • Philosopher dinner - Solution 1
      • Deadlock prevention
    • Philosopher dinner - Solution 2
      • Deadlock prevention
    • Philosopher dinner - Solution 3
      • Deadlock prevention
    • Philosopher dinner - Solution 4
    • Deadlock avoidance
    • Deadlock detection
  • Memory management
    • Introduction
    • Address space
    • Contiguous memory allocation
    • Memory partitioning
    • Virtual memory system
    • Paging
    • Segmentation
    • Combining segmentation and paging
    • Page replacement
      • Policies
    • Working set
    • Thrashing
    • Demand paging vs. preparing
Powered by GitBook
On this page
  • FCFS / FIFO
  • Example
  • RR
  • Example
  • SPN
  • Example
  1. Processor Scheduling

Scheduling policies

PreviousPrioritiesNextIn Linux

Last updated 2 years ago

FCFS / FIFO

First-Come-First-Server (FCFS) scheduler.

  • Also known as First-In-First-Out (FIFO).

  • The oldest process in the READY queue is the first to be selected.

  • Non-preemptive (in strict sense).

    • Can be combined with a priority schema (in which case preemption exists).

  • Favours CPU-bound processes over I/O-bound.

  • Can result in bad use of both processor and I/O devices.

Example

Draw processor utilization, assuming FCFS policy and no priorities.

RR

Round robin (RR) scheduler.

  • Preemptive (base on a clock).

    • Each process is given a maximum slice of time before being preempted (time quantum).

    • Also known as time slicing.

  • The oldest process in the READY queue is the first one to be selected (no priorities).

    • Can be combined with a priority schema.

  • The principal design issue is the time quantum.

    • very short is good, because short processes will move through the system quickly and response time is minimized.

    • very short is bad, because every context switching involves a processing overhead.

  • Effective in general purpose time-sharing systems and in transaction processing systems.

  • Favours CPU-bound processes over I/O-bound.

  • Can result in bad use of I/O devices.

Example

Draw processor utilization, assuming RR policy with a time quantum of 2 and no priorities.

SPN

Shortest Process Next (SPN) scheduler.

  • Also known as shortest job first (SJF).

  • Non-preemptive.

  • The process with the shortest expected next CPU burst time is selected next.

    • FCFS is used to tie up (in case several processes have the same burst time).

  • Maximum throughput.

  • Minimum average waiting time and turnaround time.

  • Risk of starvation for longer processes.

  • Requires the knowledge in advance of the (expected) processing time.

    • This value can be predicted, using the previous values.

  • Used in long-term scheduling in batch systems.

    • Where users are motivated to estimate the process time limit accurately.

Example

Draw processor utilization, assuming SPN policy and no priorities.