LABORATORY. 14 Disk Scheduling OBJECTIVE REFERENCES. Watch how the operating system schedules the reading or writing of disk tracks.



Similar documents
LSGMI REMOTE DESKTOP SERVICES.

T R O U B L E S H O O T I N G T I P S

Devices and Device Controllers

Lab 3: Evaluating Application Performance across a WAN

Adobe Digital Signatures in Adobe Acrobat X Pro

Jump-Start Tutorial For ProcessModel

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005

LAB 1: Evaluating Internet Connection Choices for a Small Home PC Network

Online Employment Application Guide: Seattle Public Schools

Fi TV Gold Quick Start Guide

Fi TV Gold Quick Start Guide

Table of Contents. Real Magnet netforum Integration User s Guide

Live Agent for Support Agents

COS 116 The Computational Universe Laboratory 9: Virus and Worm Propagation in Networks

USER MANUAL SlimComputer

Model Run Analysis. Technical Documentation Version 6.7. Center for Advanced Decision Support for Water and Environmental Systems

Using 2Can. There are three basic steps involved in migrating all of your data from your BlackBerry to your Android phone:

Far-western University Central Office, Mahendranagar Operating System

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

How can I use the internet to make free calls?

Lab 1: Evaluating Internet Connection Choices for a Small Home PC Network

DVR GUIDE. Using your DVR/Multi-Room DVR WAVE-123 wavebroadband.com

Microsoft Security Essentials Installation and Configuration Guide

After Effects CS4. Getting Started. Getting Started. Essential Training Introduction

Setting Up Monthly Reporter

Home Networking Evaluating Internet Connection Choices for a Small Home PC Network

16.1 REQUIREMENTS AND INSTALLATION

Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1

MATH 140 Lab 4: Probability and the Standard Normal Distribution

Operating Systems. III. Scheduling.

User Tutorial on Changing Frame Size, Window Size, and Screen Resolution for The Original Version of The Cancer-Rates.Info/NJ Application

Guide for usage of digital signatures in Microsoft Office Documents

5. Tutorial. Starting FlashCut CNC

Microsoft Windows Overview Desktop Parts

Everything You Need to Know to Use Your Personal Digital Certificate at the Health Science Center. Word

Getting Started on the Computer With Mouseaerobics! Windows XP

DECS DER APPLE WIRELESS HELPER DOCUMENT

Kodak Asset Management Software Client Module

SalonTouch SQL and.net Database Backup Instructions Updated 10/16/2006

VHDL Test Bench Tutorial

Chapter 1 What s in the box

Using the Educator Dashboard

TCP/IP Networking, Part 2: Web-Based Control

Introduction to Apache Kafka And Real-Time ETL. for Oracle DBAs and Data Analysts

Mini Amazing Box Update for Windows XP with Microsoft Service Pack 2

Internet basics 2.3 Protecting your computer

TIPS FOR DOING STATISTICS IN EXCEL

Support Desk Help Manual. v 1, May 2014

Troubleshooting And Support

Linux Process Scheduling Policy

msigna Getting Started

Timing of a Disk I/O Transfer

High Impact & Alpha Five: A Mail Merge Guide.

Online Employment Application Guide. 1. Find Jobs

Lab 11. Simulations. The Concept

Chapter 28: Expanding Web Studio

Pathway help: Class Search/Browse Catalog

istar User Manual for Comsol USB Flash Drive

Online Employment Application Guide

Movie Instructions: Downloading, Saving, & Watching

TIPS FOR USING OS X 10.8 MOUNTAIN LION

MyPrint instructions; printing, scanning and copying. version 1.3 EN march 2015

Stage One - Applying For an Assent Remote Access Login

Clearing Browser Cache/History

Horizon Patient Folder User s Guide

Setting up in Outlook Express

User Guide for Patients

JORAM 3.7 Administration & Monitoring Tool

DeskPRO Helpdesk Software: Agent Interface Quick Start Guide

Driver Updater Manual

Introduction. - Please be sure to read and understand Precautions and Introductions in CX-Simulator Operation Manual and

Which local broadcast channels can I watch using the Dyle mobile TV service?

Paragon HFS+ for Windows

W4118 Operating Systems. Instructor: Junfeng Yang

Elavon Payments App. Revolutionising digital interaction.

Making it easier to do business online.

and forms from multiple folders simultaneously to send out for e signing as the system will automatically create a Queue as you select documents.

Life after Lotus Notes

Managing Documents in the Citrix XenApp Remote Desktop

Getting Started with GRUFF

ESS Internet Report Access System (IRAS) Applicant Tracking System (ATS) Instructions 4-12

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Remote Access Using the USDA LincPass

Downloading ebooks To Android Devices

How to test and debug an ASP.NET application

Systems Modelling and Simulation (Lab session 3)

Accessing The Doctors Clinic Physician Connect

CREATING A 3D VISUALISATION OF YOUR PLANS IN PLANSXPRESS AND CORTONA VRML CLIENT

Gaggle Account How-To. How do I login to my Gaggle Account? To login, follow these steps: Go to:

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

3. Programming the STM32F4-Discovery

1: Meditech Information Systems On-line Help 2: Links to Micromedex 3: Print page view 4: Lock Session: temporarily minimize the session and lock it

Transcription:

Dmitriy Shironosov/ShutterStock, Inc. LABORATORY 14 Disk Scheduling OBJECTIVE Watch how the operating system schedules the reading or writing of disk tracks. REFERENCES Software needed: 1) Disk Scheduling app from the Lab Manual website (Disk Scheduler.jar)

Disk Scheduling 147 BACKGROUND Review these topics from your textbook, lecture notes, or online resources: First-come, first-served disk scheduling Shortest seek time first disk scheduling SCAN disk scheduling ACTIVITY The Operating Systems lab simulated how the operating system places jobs into memory and schedules jobs. In this lab, we ll look at how the operating system handles scheduling the reading and writing of disk tracks. The Disk Scheduling app presents an imaginary 100-track, single-surface disk drive. That is the tall yellow bar on the left side of the screen. Track 0 is at the top, and track 99 is at the bottom. Requests arrive continuously and are kept in a list. Depending on the scheduling algorithm that the operating system uses, a given request may be processed when it is received or much later, depending on where the disk read/write currently is.

148 Laboratory 14 For this app, you ll type in a list of requests. To simplify things, our requests have been stripped down to just which track should be visited next. (In the real world, a request would include information like whether this is a read or a write, which sector to read, what data are to be written, etc.) Once you have entered some track numbers, click on the Run button. You can also preload a list of requested track numbers by clicking on Example. To start the simulation, click Run. As the simulator is running, you can add new requests by typing in new track numbers into the text field next to the Add button, and then clicking on the Add button or simply hitting Enter. In the real world of operating systems, the disk driver is constantly receiving a stream of requests from user programs, which is what you are simulating when you add a new track request. The read/write head s position is symbolized by a red bar that moves up and down inside the yellow area. As the operating system handles requests, the red bar stops briefly at the current track number; the operating system then removes the request and its number when the request has been completed. Exactly where the red bar moves to next is the subject of the scheduling algorithm. This app allows you to experiment with the three scheduling algorithms. Select one of the three from the pull-down menu. The benefits and drawbacks of each algorithm are explained in textbooks, lecture notes, and online resources.

Disk Scheduling 149 EXERCISE 1 Name Date Section 1) Start the Disk Scheduling app. 2) Click on the Example button, which fills the list with some requests. 3) Select First-Come First-Served from the pull-down menu and click the Run button. Time the app with your watch or the computer s clock, and write down how many seconds it takes. 4) Select Shortest Seek Time First and run the app again. Measure the time that takes and write it down. Also write down the order of the tracks that are visited. (This is different from the original request list.) 5) Repeat step 4 after selecting SCAN Disk (elevator). 6) Which algorithm took the least time? 7) Based on your observations of the three algorithms on the example request list, state what kind of request list would make first-come, first-served take up a lot of time. In other words, what pattern would the numbers in the request list have to follow so that first-come, first-served consumes a lot of time?

150 Laboratory 14 EXERCISE 2 Name Date Section 1) Some request lists might cause the disk scheduler to act the same when the three different algorithms are run. Create a request list of five track numbers that will cause all three algorithms to visit the same tracks in the same order. 2) If shortest seek time first starts with the disk head positioned at either 0 or 99, instead of at 50 (in the middle), which algorithm would it resemble: first-come, first-served or SCAN? Why? 3) Based on your past lab experiences with stacks and queues, is the request list of the disk scheduler a stack or a queue?

Disk Scheduling 151 EXERCISE 3 Name Date Section 1) Start the Disk Scheduling app and type the following numbers into the Requests text area: 8 20 35 80 10 90 5 87 26 94 These numbers have been chosen so that there are two clusters, one at the lower end of the scale and the other at the upper end. 2) Select First-Come First-Served and click on Run. When the disk head has reached 35, type 30 into the Add area and press Enter. This will add a request to seek to track 30 to the list. What happens? Does the disk drive respond to this new request or not? 3) Stop the app and remove 30 from the end of the list. Choose Shortest Seek Time First and rerun the app. When it consumes 35, type 30 into the add area, and press Enter. Write down what happens. (Warning! You have to be fast, because the app might move into the upper cluster quickly. In that case, just retry.)

152 Laboratory 14 4) Stop the app, remove 30 from the end of the list, and choose SCAN. Run it, and when it consumes 35, type 30 again. Write down what happens. Again, you must be fast! 5) Which algorithm is least responsive to new requests? 6) Stop the app, remove 30 from the end of the list, choose Shortest Seek Time First, and click on Run. Now try to trap the disk head into the lower cluster by typing in disk tracks that are in the lower half of the disk drive, pressing Enter after each one. Write down what happens. You have to be quick, and you may have to try it several times. 7) Redo step 6, but choose SCAN instead. Once again, try to trap the disk head into the lower cluster by typing in disk tracks that are in the lower half of the disk drive, pressing Enter after each one. Were you successful?

Disk Scheduling 153 8) In real life, disk drives may see a cluster of track requests that could trap it in one section of the disk drive. What implications does this have for programs that requested tracks outside the busy area? (Hint: Computer scientists have a gruesome term for this phenomenon: starvation. Why do you think they chose this term?)

154 Laboratory 14 DELIVERABLES Turn in your handwritten answers. DEEPER INVESTIGATION The next time you are standing in front of an elevator, waiting for it to arrive, think about the conflicts between fairness and efficiency that the elevator (and operating systems) have to resolve. Though you are undoubtedly the most important person waiting for the elevator, the controlling computer probably isn t aware of this and you won t get priority treatment. What would happen to these scheduling algorithms if some requests did have a higher priority? Do you suppose operating systems ever prioritize disk track requests? Under what circumstances would that be a good idea? What kinds of unforeseen effects might result?