Question

<Operating System> 1. Which scheduling objectives from module(CPU Scheduling) would also apply to disk scheduling? 2....

<Operating System>

1. Which scheduling objectives from module(CPU Scheduling) would also apply to disk scheduling?

2. Which disk scheduling algorithm is the most suitable for solid-state drives? Why?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)

Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O scheduling.

Disk scheduling is important because:

  • Multiple I/O requests may arrive by different processes and only one I/O request can be served at a time by the disk controller. Thus other I/O requests need to wait in the waiting queue and need to be scheduled.
  • Two or more request may be far from each other so can result in greater disk arm movement.
  • Hard drives are one of the slowest parts of the computer system and thus need to be accessed in an efficient manner.

There are many Disk Scheduling Algorithms but before discussing them let’s have a quick look at some of the important terms:

  • Seek Time:Seek time is the time taken to locate the disk arm to a specified track where the data is to be read or write. So the disk scheduling algorithm that gives minimum average seek time is better.
  • Rotational Latency: Rotational Latency is the time taken by the desired sector of disk to rotate into a position so that it can access the read/write heads. So the disk scheduling algorithm that gives minimum rotational latency is better.
  • Transfer Time: Transfer time is the time to transfer the data. It depends on the rotating speed of the disk and number of bytes to be transferred.
  • Disk Response Time: Response Time is the average of time spent by a request waiting to perform its I/O operation. Average Response time is the response time of the all requests. Variance Response Time is measure of how individual request are serviced with respect to average response time. So the disk scheduling algorithm that gives minimum variance response time is better.
  • Disk Scheduling Algorithms

  • FCFS: FCFS is the simplest of all the Disk Scheduling Algorithms. In FCFS, the requests are addressed in the order they arrive in the disk queue.
  • Advantages:

  • Every request gets a fair chance
  • No indefinite postponement
  • Disadvantages:

  • Does not try to optimize seek time
  • May not provide the best possible service
  • SSTF: In SSTF (Shortest Seek Time First), requests having shortest seek time are executed first. So, the seek time of every request is calculated in advance in the queue and then they are scheduled according to their calculated seek time. As a result, the request near the disk arm will get executed first. SSTF is certainly an improvement over FCFS as it decreases the average response time and increases the throughput of system.

2)

FCFS Disk Head Scheduling Algorithm

It works well under light load (few storage disk accesses) and is the primary algorithm used with Solid-State Drives.

Linux provides several I/O schedulers that allow one to tune performance for your use patterns. Traditionally disk scheduling algorithms have been designed for rotational drives where rotational latency and drive head movement latency need to be taken into consideration, hence the need for complex I/O schedulers. However a SSD does not suffer from the HDD latency issues - does this mean the default I/O scheduler choice needs to be re-thought?

I decided to benchmark a SanDisk pSSD to see the behaviour of the different I/O schedulers using the following tests:

a) untar kernel source

b) sync

c) copy kernel source tree

d) sync

e) copy tar file

f) sync

g) rm -rf kernel source tree

h) rm -rf copy of source tree

i) sync

For each of the I/O schedulers I ran the above sequence of tests 3 times and took an average of the total run time. My results are as follows:

cfq: 3m59s,

noop: 3m25s,

anticipatory: 3m51s,

deadline: 3m42s

So it appears the default cfq (Completely Fair Queuing) scheduler is least optimal and the noop scheduler behaves best. According to the noop wikipedia entry the noop scheduler is the best choice for solid state drives, so maybe my test results can be trusted after all :-)

SSDs do not require multiple I/O requests to be re-ordered since they do not suffer from traditional random-access latencies, hence the noop scheduler is optimal.

Add a comment
Know the answer?
Add Answer to:
<Operating System> 1. Which scheduling objectives from module(CPU Scheduling) would also apply to disk scheduling? 2....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • describe, in step-by-step form, the procedure that the operating system would use to switch from one...

    describe, in step-by-step form, the procedure that the operating system would use to switch from one user to another in a multiuser time sharing system. Discuss the steps that take place when a process is moved a) from ready state to running state; b) from running state to blocked state; c) from running state to ready state, and d) from blocked state to ready state. Explain deadlocking. The CPU scheduling algorithm (in UNIX) is a simple priority algorithm. The priority...

  • 1 Jobs arrive to a file server consisting of a CPU and two disks (disk 1 and disk 2). With probab...

    1 Jobs arrive to a file server consisting of a CPU and two disks (disk 1 and disk 2). With probability 13/20, a job goes from CPU to disk ĺ, and with probability 6/20, a job goes from CPU to disk 2. With probability 1/20, a job is finished after its CPU operation and is immediately replaced by another job. There are always 3 jobs in the system. The mean time to complete the CPU operation is .039 second The...

  • Operating System Theory and Design Write a program to simulate the operation of two of CPU...

    Operating System Theory and Design Write a program to simulate the operation of two of CPU scheduling methods. The program does the following: 1. Get the number of processes from the user. 2. Get the burst time of each process from the user 3. Assume that all processes arrive at "O" to the ready queue. 4. The program lets the user select one of the two methods to implement the o e oo implement the CPU scheduling. time. You can...

  • A system consists of 1 CPU, 1 Disk, and 1 Network Interface. A web server running...

    A system consists of 1 CPU, 1 Disk, and 1 Network Interface. A web server running on this system consists of a process that waits for an HTTP request. Once the request is received, the process services it by fetching the requested file from disk (an I/O operation) and then by sending the file content to the client. Assume that serving a request consists of the following phases: i. Process uses the CPU for 2 msec (parse request) // CPU...

  • Operating Systems Questions (Please help if you can) 1. A computer has cache, main memory, and...

    Operating Systems Questions (Please help if you can) 1. A computer has cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, 20ns are required to access it. If it is in main memory but not in the cache, 60ns are required to load it into the cache (this includes the time to originally check the cache), and then, the reference is started again. If the word is not in main memory,...

  • scheduling program in C, please help 1 Objectives This programming project is to simulate a few...

    scheduling program in C, please help 1 Objectives This programming project is to simulate a few CPU scheduling policies discussed in the class. You will write a C program to implement a simulator with different scheduling algorithms. The simulator selects a task to run from ready queue based on the scheduling algorithm. Since the project intends to simulate a CPU scheduler, so it does not require any actual process creation or execution. When a task is scheduled, the simulator will...

  • Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

    Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:Processburst TimePriorityP1103P211P323P414P552For each of the scheduling algorithms, FCFS, Shortest-Job-First (SJF, non-preemptive), Priority (smaller priority number implies higher scheduling priority), and RR (quantum = 1) do the following.Draw a Gantt chart to show how these processes would be scheduled.Give the turnaround time (total time from the first arrival into ready state until CPU-burst is completed) of each process.Give the waiting time (total time spent in the Ready state) of each process.Give...

  • 1. Consider a demand-paging system with the following time-measured utilizations: CPU utilization 20% Paging disk 5%...

    1. Consider a demand-paging system with the following time-measured utilizations: CPU utilization 20% Paging disk 5% Other I/O devices 97% Indicate which will improve system utilization and explain your answer.    a. Install a faster CPU . b. Install a bigger paging disk. c. Increase the degree of multiprogramming. d. Decrease the degree of multiprogramming. e. Install more main memory. f. Install a faster hard disk or multiple controllers with multiple hard disks. g. Add prepaging to the page-fetch algorithms....

  • I/O Scheduling Algorithms a) For each of the following scheduling algorithms, give a 1-2 sentence description...

    I/O Scheduling Algorithms a) For each of the following scheduling algorithms, give a 1-2 sentence description of how it works. The description should be precise enough to distinguish each algorithm from the others. Algorithms: FCFS, SSTF, SCAN, C-SCAN, C-LOOK. (1 point) b) Given a hard disk with 200 cylinders and a queue with jobs having the following cylinder requests: 80, 190, 70, 130, 30, draw a diagram of the movements of the head for each of the algorithms listed in...

  • Choose the correct answer 1. A virtual machine executes on a host operating system and a...

    Choose the correct answer 1. A virtual machine executes on a host operating system and a hypervisor provides an API to the actual hardware 2. The guest OS knows that it is not accessing the actual hardware so that it can perform better 3. The VM may supply an environment that is different than the actual host hardware 4. Applications running within the VM have an illusion that they are executing on a real machine Select one: a. All the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT