SlideShare a Scribd company logo
1 of 26
SSTF, SCAN, C-SCAN algorithms




                      http://raj-os.blogspot.in/   1
HOME     PREVIOUS TOPIC NEXT
PREVIOUS QUESTION PAPERS FOR OS
CPP TUTORIALS




        http://raj-os.blogspot.in/   2
Recap

In the last class, you have learnt:

    - Disk scheduling its need

    – The FCFS disk scheduling algorithm

    – Advantages

    – Disadvantages

                           http://raj-os.blogspot.in/   3
Objectives

On Completion of this period, you would be able to

know :
• SSTF , SCAN, C-SCAN disk scheduling algorithm

• Advantages

• Disadvantages



                     http://raj-os.blogspot.in/      4
SSTF Scheduling

• The Shortest-Seek-Time-First Scheduling

  – Services the requests at the current head position

  – Before moving the head far away




                    http://raj-os.blogspot.in/           5
SSTF Scheduling

• Minimal seek time is the criteria for selection of
  requests

   – Seek time is proportional to the track difference between
     requests

   – Head is moved to the closest track in the request queue



                        http://raj-os.blogspot.in/               6
SSTF Scheduling

• Consider for example an ordered disk queue with
  requests involving
   – Tracks 98, 183, 37, 122, 14, 124, 65, 67

   – Head pointer 53

• The request queue (0-199)




                        http://raj-os.blogspot.in/   7
SSTF Scheduling

• If the disk head is initially at cylinder 53,

   – it will first move from 53 to 65,

   – then to next closest position 67, 37, 14, 98, 122, 124
     and 183 as shown in the next slides


• The total head movement of 236 tracks

                        http://raj-os.blogspot.in/            8
SSTF Scheduling




 Initial head position
  http://raj-os.blogspot.in/   9
SSTF Scheduling




Head movement from 53 to 65th track
        http://raj-os.blogspot.in/    10
SSTF Scheduling




Head movement from 65th to 67th track
        http://raj-os.blogspot.in/      11
SSTF Scheduling




Head movement from 67th to 37th track
        http://raj-os.blogspot.in/      12
SSTF Scheduling




Head movement from 37th track to 14th track
            http://raj-os.blogspot.in/        13
SSTF Scheduling




Head movement 14th track to 98th track
            http://raj-os.blogspot.in/   14
SSTF Scheduling




Head movement from 98th to 122 track
          http://raj-os.blogspot.in/   15
SSTF Scheduling




Head movement from 122 to 124
       http://raj-os.blogspot.in/   16
SSTF Scheduling




Head movement from 124 to 183rd track
          http://raj-os.blogspot.in/    17
http://raj-os.blogspot.in/   18
SSTF Scheduling


Advantages

• It is substantial improvement over FCFS
• It is a essential form of Shortest Job First
  Scheduling




                    http://raj-os.blogspot.in/   19
SSTF Scheduling


Disadvantages

• It may cause starvation of some requests

• It is not optimal

• The total head movement can be further reduced



                      http://raj-os.blogspot.in/   20
Summary


In this class, you have learnt:
• The SSTF, SCAN,C-SCAN Scheduling

• Advantages

• Disadvantages




                     http://raj-os.blogspot.in/   21
Frequently Asked Questions

1.   List the advantages and disadvantages of SSTF,SCAN, C-SCAN

     algorithms

2.   Compare SCAN and C-SCAN scheduling algorithm

3.   Explain SSTF scheduling algorithm with the help an example

4.   Explain SCAN scheduling algorithm with the help an example

5.   Explain C-SCAN scheduling algorithm with the help an example




                           http://raj-os.blogspot.in/               22
Quiz

1. The SSTF Scheduling is based on Minimal seek
   time criteria for selection of requests [T/F]
    TRUE
2. The SSTF Scheduling may cause starvation of some
   requests [T/F]
    TRUE




                    http://raj-os.blogspot.in/        23
Quiz

3. The SCAN Scheduling algorithm is also called
   elevator algorithm [T/F]
   TRUE

4. The SCAN Scheduling algorithm doesn't provide
   uniform wait time
    TRUE



                    http://raj-os.blogspot.in/     24
Quiz
5. C-SCAN Scheduling provides uniform waiting time
  than SCAN Scheduling [T/F]
   TRUE

6. C-SCAN Scheduling treats the cylinders as a circular
  list that wraps around from the last cylinder to the
  first one. [T/F]
   TRUE

                      http://raj-os.blogspot.in/         25
Other subject materials

•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home


                 http://raj-os.blogspot.in/   26

More Related Content

What's hot

Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithmssathish sak
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)nikeAthena
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and functiondilip kumar
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data StructureMeghaj Mallick
 
Look scheduling.51
Look scheduling.51Look scheduling.51
Look scheduling.51myrajendra
 
Advanced Sorting Algorithms
Advanced Sorting AlgorithmsAdvanced Sorting Algorithms
Advanced Sorting AlgorithmsDamian T. Gordon
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentationusmankiyani1
 
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Databricks
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSTomas Vondra
 
Process management in os
Process management in osProcess management in os
Process management in osMiong Lazaro
 
Operating system 15 micro kernel based os
Operating system 15 micro kernel based osOperating system 15 micro kernel based os
Operating system 15 micro kernel based osVaibhav Khanna
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First ServeKavya Kapoor
 

What's hot (20)

Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Swapping | Computer Science
Swapping | Computer ScienceSwapping | Computer Science
Swapping | Computer Science
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and function
 
Operating System Scheduling Algorithms
Operating System Scheduling AlgorithmsOperating System Scheduling Algorithms
Operating System Scheduling Algorithms
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
 
Basics of-linux
Basics of-linuxBasics of-linux
Basics of-linux
 
Look scheduling.51
Look scheduling.51Look scheduling.51
Look scheduling.51
 
Advanced Sorting Algorithms
Advanced Sorting AlgorithmsAdvanced Sorting Algorithms
Advanced Sorting Algorithms
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Operating system 15 micro kernel based os
Operating system 15 micro kernel based osOperating system 15 micro kernel based os
Operating system 15 micro kernel based os
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
 

Similar to Sstf scheduling.50

Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52myrajendra
 
C scan scheduling 50 2
C scan scheduling 50 2C scan scheduling 50 2
C scan scheduling 50 2myrajendra
 
Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49myrajendra
 
I/O buffering & disk scheduling
I/O buffering & disk schedulingI/O buffering & disk scheduling
I/O buffering & disk schedulingRushabh Shah
 
Scan scheduling 50 1
Scan scheduling 50 1Scan scheduling 50 1
Scan scheduling 50 1myrajendra
 
C look scheduling 51 1
C look scheduling 51 1C look scheduling 51 1
C look scheduling 51 1myrajendra
 
Process scheduling algorithms
Process scheduling algorithmsProcess scheduling algorithms
Process scheduling algorithmsShubham Sharma
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithmsPaurav Shah
 
Scheduling Algorithms-Examples.pptx
Scheduling Algorithms-Examples.pptxScheduling Algorithms-Examples.pptx
Scheduling Algorithms-Examples.pptxRevathi Kmp
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptxSHUJEHASSAN
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemMeghaj Mallick
 
Round-ribon algorithm presntation
Round-ribon algorithm presntationRound-ribon algorithm presntation
Round-ribon algorithm presntationJamsheed Ali
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-schedulingNazir Ahmed
 
Process scheduling : operating system ( Btech cse )
Process scheduling : operating system ( Btech cse )Process scheduling : operating system ( Btech cse )
Process scheduling : operating system ( Btech cse )HimanshuSharma1389
 

Similar to Sstf scheduling.50 (20)

Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52
 
C scan scheduling 50 2
C scan scheduling 50 2C scan scheduling 50 2
C scan scheduling 50 2
 
Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49
 
I/O buffering & disk scheduling
I/O buffering & disk schedulingI/O buffering & disk scheduling
I/O buffering & disk scheduling
 
Scan scheduling 50 1
Scan scheduling 50 1Scan scheduling 50 1
Scan scheduling 50 1
 
C look scheduling 51 1
C look scheduling 51 1C look scheduling 51 1
C look scheduling 51 1
 
Device Management
Device ManagementDevice Management
Device Management
 
Process scheduling algorithms
Process scheduling algorithmsProcess scheduling algorithms
Process scheduling algorithms
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Scheduling Algorithms-Examples.pptx
Scheduling Algorithms-Examples.pptxScheduling Algorithms-Examples.pptx
Scheduling Algorithms-Examples.pptx
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
 
Round-ribon algorithm presntation
Round-ribon algorithm presntationRound-ribon algorithm presntation
Round-ribon algorithm presntation
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 
Operating system
Operating systemOperating system
Operating system
 
Process scheduling : operating system ( Btech cse )
Process scheduling : operating system ( Btech cse )Process scheduling : operating system ( Btech cse )
Process scheduling : operating system ( Btech cse )
 
CPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdfCPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdf
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Tn6 facility layout
Tn6 facility layoutTn6 facility layout
Tn6 facility layout
 
Tn6 facility+layout
Tn6 facility+layoutTn6 facility+layout
Tn6 facility+layout
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

Sstf scheduling.50

  • 1. SSTF, SCAN, C-SCAN algorithms http://raj-os.blogspot.in/ 1
  • 2. HOME PREVIOUS TOPIC NEXT PREVIOUS QUESTION PAPERS FOR OS CPP TUTORIALS http://raj-os.blogspot.in/ 2
  • 3. Recap In the last class, you have learnt: - Disk scheduling its need – The FCFS disk scheduling algorithm – Advantages – Disadvantages http://raj-os.blogspot.in/ 3
  • 4. Objectives On Completion of this period, you would be able to know : • SSTF , SCAN, C-SCAN disk scheduling algorithm • Advantages • Disadvantages http://raj-os.blogspot.in/ 4
  • 5. SSTF Scheduling • The Shortest-Seek-Time-First Scheduling – Services the requests at the current head position – Before moving the head far away http://raj-os.blogspot.in/ 5
  • 6. SSTF Scheduling • Minimal seek time is the criteria for selection of requests – Seek time is proportional to the track difference between requests – Head is moved to the closest track in the request queue http://raj-os.blogspot.in/ 6
  • 7. SSTF Scheduling • Consider for example an ordered disk queue with requests involving – Tracks 98, 183, 37, 122, 14, 124, 65, 67 – Head pointer 53 • The request queue (0-199) http://raj-os.blogspot.in/ 7
  • 8. SSTF Scheduling • If the disk head is initially at cylinder 53, – it will first move from 53 to 65, – then to next closest position 67, 37, 14, 98, 122, 124 and 183 as shown in the next slides • The total head movement of 236 tracks http://raj-os.blogspot.in/ 8
  • 9. SSTF Scheduling Initial head position http://raj-os.blogspot.in/ 9
  • 10. SSTF Scheduling Head movement from 53 to 65th track http://raj-os.blogspot.in/ 10
  • 11. SSTF Scheduling Head movement from 65th to 67th track http://raj-os.blogspot.in/ 11
  • 12. SSTF Scheduling Head movement from 67th to 37th track http://raj-os.blogspot.in/ 12
  • 13. SSTF Scheduling Head movement from 37th track to 14th track http://raj-os.blogspot.in/ 13
  • 14. SSTF Scheduling Head movement 14th track to 98th track http://raj-os.blogspot.in/ 14
  • 15. SSTF Scheduling Head movement from 98th to 122 track http://raj-os.blogspot.in/ 15
  • 16. SSTF Scheduling Head movement from 122 to 124 http://raj-os.blogspot.in/ 16
  • 17. SSTF Scheduling Head movement from 124 to 183rd track http://raj-os.blogspot.in/ 17
  • 19. SSTF Scheduling Advantages • It is substantial improvement over FCFS • It is a essential form of Shortest Job First Scheduling http://raj-os.blogspot.in/ 19
  • 20. SSTF Scheduling Disadvantages • It may cause starvation of some requests • It is not optimal • The total head movement can be further reduced http://raj-os.blogspot.in/ 20
  • 21. Summary In this class, you have learnt: • The SSTF, SCAN,C-SCAN Scheduling • Advantages • Disadvantages http://raj-os.blogspot.in/ 21
  • 22. Frequently Asked Questions 1. List the advantages and disadvantages of SSTF,SCAN, C-SCAN algorithms 2. Compare SCAN and C-SCAN scheduling algorithm 3. Explain SSTF scheduling algorithm with the help an example 4. Explain SCAN scheduling algorithm with the help an example 5. Explain C-SCAN scheduling algorithm with the help an example http://raj-os.blogspot.in/ 22
  • 23. Quiz 1. The SSTF Scheduling is based on Minimal seek time criteria for selection of requests [T/F] TRUE 2. The SSTF Scheduling may cause starvation of some requests [T/F] TRUE http://raj-os.blogspot.in/ 23
  • 24. Quiz 3. The SCAN Scheduling algorithm is also called elevator algorithm [T/F] TRUE 4. The SCAN Scheduling algorithm doesn't provide uniform wait time TRUE http://raj-os.blogspot.in/ 24
  • 25. Quiz 5. C-SCAN Scheduling provides uniform waiting time than SCAN Scheduling [T/F] TRUE 6. C-SCAN Scheduling treats the cylinders as a circular list that wraps around from the last cylinder to the first one. [T/F] TRUE http://raj-os.blogspot.in/ 25
  • 26. Other subject materials • Web designing • Micro processors • C++ tutorials • java home http://raj-os.blogspot.in/ 26