SlideShare a Scribd company logo
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

PDF
Fafl notes [2010] (sjbit)
Siddharaj Junnarkar
 
PPTX
Arm cortex-m4 programmer model
Mohammed Gomaa
 
PPTX
First-Come-First-Serve (FCFS)
nikeAthena
 
PPTX
Functions in php
Kamal Acharya
 
PPT
Disk scheduling algorithms
Paresh Parmar
 
PPT
Central processing unit and stack organization r013
arunachalamr16
 
PPTX
LLVM Instruction Selection
Shiva Chen
 
PDF
Final Exam OS fall 2012-2013 with answers
Arab Open University and Cairo University
 
Fafl notes [2010] (sjbit)
Siddharaj Junnarkar
 
Arm cortex-m4 programmer model
Mohammed Gomaa
 
First-Come-First-Serve (FCFS)
nikeAthena
 
Functions in php
Kamal Acharya
 
Disk scheduling algorithms
Paresh Parmar
 
Central processing unit and stack organization r013
arunachalamr16
 
LLVM Instruction Selection
Shiva Chen
 
Final Exam OS fall 2012-2013 with answers
Arab Open University and Cairo University
 

What's hot (20)

PPTX
Buffering.pptx
HarleenKaur183313
 
PPTX
State transition diagram 8085
ShivamSood22
 
PDF
INTRODUCTION TO ALGORITHMS Third Edition
PHI Learning Pvt. Ltd.
 
DOC
Branch and bound
Nv Thejaswini
 
PDF
Computer Organization and Architecture.pdf
mekelle university(EiT-M)
 
PPT
Arrays searching-sorting
Ajharul Abedeen
 
PPT
Assembly language programming_fundamentals 8086
Shehrevar Davierwala
 
PDF
Andes building a secure platform with the enhanced iopmp
RISC-V International
 
PPTX
Karnaugh map (k map)
Adeen Ali
 
PPTX
Linear Search Presentation
Markajul Hasnain Alif
 
PPSX
CPU Scheduling algorithms
Shanu Kumar
 
PPT
Hardware multithreading
Fraboni Ec
 
PPTX
First steps in C-Shell
Brahma Killampalli
 
PDF
Memory mapping
SnehalataAgasti
 
PPT
Interrupts for PIC18
raosandy11
 
PPT
Pipeline hazards in computer Architecture ppt
mali yogesh kumar
 
PPT
Instruction Level Parallelism and Superscalar Processors
Syed Zaid Irshad
 
PPTX
4 U 5 Slides With Notes
rameraja
 
PPT
16 control unit
dilip kumar
 
Buffering.pptx
HarleenKaur183313
 
State transition diagram 8085
ShivamSood22
 
INTRODUCTION TO ALGORITHMS Third Edition
PHI Learning Pvt. Ltd.
 
Branch and bound
Nv Thejaswini
 
Computer Organization and Architecture.pdf
mekelle university(EiT-M)
 
Arrays searching-sorting
Ajharul Abedeen
 
Assembly language programming_fundamentals 8086
Shehrevar Davierwala
 
Andes building a secure platform with the enhanced iopmp
RISC-V International
 
Karnaugh map (k map)
Adeen Ali
 
Linear Search Presentation
Markajul Hasnain Alif
 
CPU Scheduling algorithms
Shanu Kumar
 
Hardware multithreading
Fraboni Ec
 
First steps in C-Shell
Brahma Killampalli
 
Memory mapping
SnehalataAgasti
 
Interrupts for PIC18
raosandy11
 
Pipeline hazards in computer Architecture ppt
mali yogesh kumar
 
Instruction Level Parallelism and Superscalar Processors
Syed Zaid Irshad
 
4 U 5 Slides With Notes
rameraja
 
16 control unit
dilip kumar
 
Ad

Similar to Sstf scheduling.50 (20)

PPT
Disk scheduling algorithm.52
myrajendra
 
PPTX
Disk Scheduling In Operating System.pptx
Maharshi Dayanand University Rohtak
 
PPT
Look scheduling.51
myrajendra
 
PPTX
I/O buffering & disk scheduling
Rushabh Shah
 
PPT
Disk Scheduling Algorithms Mar 30 2024.ppt
Sonam Mittal
 
PPTX
Disk Scheduling concept of Operating System.pptx
viceprincipalbfc
 
PPT
Fcfs scheduling
myrajendra
 
PPT
Disk scheduling algo os
Rahul Narang
 
PPT
Disk Scheduling Algorithms
Adarsh Kr Sinha
 
PPT
Operating System
Subhasis Dash
 
PPT
C scan scheduling 50 2
myrajendra
 
PPTX
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
PPTX
FILE SYSTEMS AND ORGANISATION STRUCTURE.pptx
briantrixs
 
PDF
Os(18 cs43) module5
Shivanand Manjaragi
 
PPTX
Disk scheduling
Suraj Shukla
 
PDF
Operating system notes _ computer science
salamlakhan7
 
PPT
Disk scheduling geekssay.com
Hemant Gautam
 
PPT
Disk scheduling
NEERAJ BAGHEL
 
PPTX
I/O structure slide by Rajalakshmi SKC
RAJALAKSHMI RADHAKRISHNAN
 
Disk scheduling algorithm.52
myrajendra
 
Disk Scheduling In Operating System.pptx
Maharshi Dayanand University Rohtak
 
Look scheduling.51
myrajendra
 
I/O buffering & disk scheduling
Rushabh Shah
 
Disk Scheduling Algorithms Mar 30 2024.ppt
Sonam Mittal
 
Disk Scheduling concept of Operating System.pptx
viceprincipalbfc
 
Fcfs scheduling
myrajendra
 
Disk scheduling algo os
Rahul Narang
 
Disk Scheduling Algorithms
Adarsh Kr Sinha
 
Operating System
Subhasis Dash
 
C scan scheduling 50 2
myrajendra
 
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
FILE SYSTEMS AND ORGANISATION STRUCTURE.pptx
briantrixs
 
Os(18 cs43) module5
Shivanand Manjaragi
 
Disk scheduling
Suraj Shukla
 
Operating system notes _ computer science
salamlakhan7
 
Disk scheduling geekssay.com
Hemant Gautam
 
Disk scheduling
NEERAJ BAGHEL
 
I/O structure slide by Rajalakshmi SKC
RAJALAKSHMI RADHAKRISHNAN
 
Ad

More from myrajendra (20)

PPT
Fundamentals
myrajendra
 
PPT
Data type
myrajendra
 
PPTX
Hibernate example1
myrajendra
 
PPTX
Jdbc workflow
myrajendra
 
PPTX
2 jdbc drivers
myrajendra
 
PPTX
3 jdbc api
myrajendra
 
PPTX
4 jdbc step1
myrajendra
 
PPTX
Dao example
myrajendra
 
PPTX
Sessionex1
myrajendra
 
PPTX
Internal
myrajendra
 
PPTX
3. elements
myrajendra
 
PPTX
2. attributes
myrajendra
 
PPTX
1 introduction to html
myrajendra
 
PPTX
Headings
myrajendra
 
PPTX
Forms
myrajendra
 
PPT
Css
myrajendra
 
PPTX
Views
myrajendra
 
PPTX
Views
myrajendra
 
PPTX
Views
myrajendra
 
PPT
Starting jdbc
myrajendra
 
Fundamentals
myrajendra
 
Data type
myrajendra
 
Hibernate example1
myrajendra
 
Jdbc workflow
myrajendra
 
2 jdbc drivers
myrajendra
 
3 jdbc api
myrajendra
 
4 jdbc step1
myrajendra
 
Dao example
myrajendra
 
Sessionex1
myrajendra
 
Internal
myrajendra
 
3. elements
myrajendra
 
2. attributes
myrajendra
 
1 introduction to html
myrajendra
 
Headings
myrajendra
 
Forms
myrajendra
 
Views
myrajendra
 
Views
myrajendra
 
Views
myrajendra
 
Starting jdbc
myrajendra
 

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