CS3530 Assignment 6

Kennesaw State University   


Department of Computer Science
Operating Systems CS3530/01
Assignment # 6 / I/O Device Scheduling Techniques




Dalibor Labudovic



07/20/12013









Initial Problem Statement:
The simulation models are implemented in C++ and use Psim3. The models apply the disk scheduling algorithms for FCFS, SSTF, and SCAN. These models use the normal distribution for generating a queue of I/O requests. The C++ file implementations are:
  dsfcfsn.cpp, dssstfn.cpp, and dscann.cpp.

Structure your report according to the outline described in the syllabus.
Respond to the general questions in the syllabus for assignments, and the
following additional questions:

Answer the following questions :

1. How would you modify the programs that implement the disk scheduling policies to reflect a disk with 30\% faster seek time, and 40\% faster transfer time. How does this affect the performance of the disk management?

3. How would you modify the models that use the normal distribution to generate the disk requests, use different values of the standard deviation. Chart the results using an appropriate type of chart with a spreadsheet program. What are your conclusions?

4. Compare the FCFS disk scheduling policy with the other three. Use several values for the workload parameters. Can you reach any conclusion that would generalize why FCFS is the least favorable policy to use, and which of the other three should be used? Give your arguments.

Additional questions:

Why are the techniques used in the models called disk scheduling techniques?
What is the main problem that this model is helping you to understand?
What can you observe by analyzing the trace from the simulation runs?
What are the results for this type of model?
What are the main differences with previous models of OS (in this course)?
How can you compute the waiting time (average) for these disk requests?

Follow the general report structure as described in the syllabus.
Your observations, comments and conclusions are very important.

Detail description of the solution and used in the project:
In this assignment, we are given three I/o scheduling simulation models that measure number of requests, number of serviced requests, average seek-time and CPU utilization. The solution to the assignment is to provide faster transfer rate and faster seek-time. To increase transfer rate and seek-time, I changed the parameters within each simulation model, those parameters where transfer rate and seek time units.

Table of results:
dsfcfsn.cpp
Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1376
Average waiting time: 2245.92
Disk utilization: 0.78564
Modified dsfcfsn.cpp
Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1376
Average waiting time: 402.01
Disk utilization: 0.383729
Dscann.cpp
Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1126
Average waiting time: 949.301
Disk utilization: 0.643825
Modified Dscann.cpp
Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1208
Average waiting time: 425.982
Disk utilization: 0.514635
Dssstfn.cpp
Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1208
Average waiting time: 773.987
Disk utilization: 0.69034


Modified Dsssftn.cpp
Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1208
Average waiting time: 283.996
Disk utilization: 0.469283

Comments and Conclusion:
In conclusion, what I have learned is that with different I/o scheduling policies there are different results but the core principle is alike with processor(s) scheduling. The only difference is the throughput is measured in different units and the requests in I/o are much slower then in processor throughput. With this in mind, I was able to learn more about I/o and why requests are slower and how to increase speed of I/o but also the core knowledge learned in the OS and I/o is to decrease dependency of I/o therefore to increase overall performance of the OS.

Questions and Answers:
1. How would you modify the programs that implement the disk scheduling policies to reflect a disk with 30\% faster seek time, and 40\% faster transfer time. How does this affect the performance of the disk management?
To increase faster seek time and increase transfer time, I changed the parameters within each simulation disk scheduling policies. Those parameters where seek time from 15.6 time units to 10.6 time units. This decrease in time units has increase the seek time per request. Downturn was more head movement and lower CPU utilization. Another parameter changed was the transfer time rate, from 3 to 7, which as a result I saw a decrease in average waiting time.

3. How would you modify the models that use the normal distribution to generate the disk requests, use different values of the standard deviation. Chart the results using an appropriate type of chart with a spreadsheet program. What are your conclusions?

4. Compare the FCFS disk scheduling policy with the other three. Use several values for the workload parameters. Can you reach any conclusion that would generalize why FCFS is the least favorable policy to use, and which of the other three should be used? Give your arguments.
Comparing FCFS disk Scheduling policy with the other three I came to a conclusion is to why it is the least favorable. FCFS is overall slower, FCFS has more head movement and also longer average wait time compared to the other three. The reason FCFS is overall slower is because it takes requests in on first come first serve basis and this policy is not efficient because the head will move from one part of the disk to the other part and this increase head movement, seek time. I would suggest using the Disk Scan policy because it is efficient and faster. The reason it is efficient is because it scanns the disk first then organizes the request based on the head movement from the backward motion from where it originated and serves the requests based on the head position and not per request in the queue.

Additional questions:

Why are the techniques used in the models called disk scheduling techniques?
The techniques used in the models are called disk scheduling techniques because they are policies on how organize requests and how to best serve those requests. It is not a matter of scheduling policy like in CPU but the it is a technique to get the overall sense of requests then follow a pattern of how to serve those requests.

What is the main problem that this model is helping you to understand?
The main problem that this model is helping me understand is the additional work the I/o has to perform in order to fill requests. The reasons why I/o is slower compared to CPU and those reasons are because of the physical movement of electromagnetic parts.

What can you observe by analyzing the trace from the simulation runs?
One trace that I observe by analyzing the simulation runs is that with my optimization of each simulation model, I decreased CPU utilization. But the overall purpose of multiprogramming is to increase CPU utilization, this baffled me and I think further runs and result analyzing is required to both increase I/o performance and increase CPU utilization.

What are the results for this type of model?
The results for this type of model are average wait time, head movement , cpu utilization, and number of requests and number of served requests.

What are the main differences with previous models of OS (in this course)?
The main difference that I have noticed is the degree of parameter has to be greater in order to get desired results from the models. For example to increase seek time by 40%, you cant simply increase the parameter by 40% , you have to increase the results by 40%, it requires fiddling with the parameter. Trail and error type of models.
How can you compute the waiting time (average) for these disk requests?
To computer the waiting time for the disk request, it involves two parts. The first part is time measured for the seek time and the second part is the transfer time. Those two parts added will give the waiting time for a disk request.

Script:
Script started on Wed 24 Jul 2013 08:36:00 AM EDT
[dlabudov@cs3 dlabudov]$ ./psim3c dsfcfsn.cpp
#[H#[J#[H#[J-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./a.out | tee dsfcfsn.txt
Psim3 project: Disk FCFS Sched (Normal)
Simulation date: Wed Jul 24 08:37:18 2013




Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1376
Average waiting time: 2245.92
Disk utilization: 0.78564
--------------------------------------------------
 End of simulation Disk FCFS Sched (Normal) Wed Jul 24 08:37:18 2013


[dlabudov@cs3 dlabudov]$ nano dsfcfsn.cpp
-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c dsfcfsn.cpp####################nano dsfcfsn.cpp#[K################./a.out | tee dsfcfsn.txt####2.txt#####[C#[C#[C#[C
Psim3 project: Disk FCFS Sched (Normal)
Simulation date: Wed Jul 24 08:38:58 2013


Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1376
Average waiting time: 2251.53
Disk utilization: 0.786767
--------------------------------------------------
 End of simulation Disk FCFS Sched (Normal) Wed Jul 24 08:38:58 2013

-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./a.,o##[K##[Kout | tee dsfcfsn3##[K2.txt
Psim3 project: Disk FCFS Sched (Normal)
Simulation date: Wed Jul 24 08:43:00 2013

Total number of requests that arrived: 42
Total number of serviced requests: 23
Total head movement in cylinders: 723
Average waiting time: 3070
Disk utilization: 0.905467
--------------------------------------------------
 End of simulation Disk FCFS Sched (Normal) Wed Jul 24 08:43:00 2013


[dlabudov@cs3 dlabudov]$ nano dsfcfsn.cpp

------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c dsfcfsn.cpp####################nano dsfcfsn.cpp#[K################./a.out | tee dsfcfsn2.txt
Psim3 project: Disk FCFS Sched (Normal)
Simulation date: Wed Jul 24 08:44:57 2013

Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1376
Average waiting time: 402.01
Disk utilization: 0.383729
--------------------------------------------------
 End of simulation Disk FCFS Sched (Normal) Wed Jul 24 08:44:57 2013
-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c dssstfn.cpp####################clear#[K#####nano dsfcfsn.cpp###txt################./a.out | tee dsfcfsn2.txt#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K####d.txt#####.txt#[K####s.txt####s.txt####s.txt####t.txt####f.txt####n.txt#####[C#[C#[C#[C
Psim3 project: Disk SSTF Sched (Normal)
Simulation date: Wed Jul 24 08:48:25 2013


Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1208
Average waiting time: 773.987
Disk utilization: 0.69034
--------------------------------------------------
 End of simulation Disk SSTF Sched (Normal) Wed Jul 24 08:48:25 2013


-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
^[[Aa.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c dssstfn.cpp####################nano dssstfn.cpp#[K################./a.out | tee dssstfn.txt####2.txt#####[C#[C#[C#[C
Psim3 project: Disk SSTF Sched (Normal)
Simulation date: Wed Jul 24 08:49:58 2013

Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1208
Average waiting time: 283.996
Disk utilization: 0.469283
--------------------------------------------------
 End of simulation Disk SSTF Sched (Normal) Wed Jul 24 08:49:58 2013

[dlabudov@cs3 dlabudov]$ na##[K##[Kclear
#[H#[J[dlabudov@cs3 dlabudov]$ clear#####./a.out | tee dssstfn2.txt########################psim3c dssstfn.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K#####.cpp#[K####s.cpp####c.cpp####a.cpp####n.cpp####n.cpp####
#[H#[J#[H#[J-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c dscann.cpp###################clear#[K#####./a.out | tee dssstfn2.txt#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K#####.txt#[K####s.txt####c.txt####a.txt####n.txt####n.txt####
Psim3 project: Disk SCAN Sched with Normal Dist.
Simulation date: Wed Jul 24 08:50:57 2013


Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1126
Average waiting time: 949.301
Disk utilization: 0.643825
--------------------------------------------------
 End of simulation Disk SCAN Sched with Normal Dist. Wed Jul 24 08:50:57 2013


-------------------------------------------------------------------------------
------ Psim3 C++ (POSIX threads) package for object oriented simulation -------
------------------ (C) J. M. Garrido, 2004-2012 -----------
-------------------------------------------------------------------------------
a.out created.
                 
[dlabudov@cs3 dlabudov]$ ./psim3c dscann.cpp###################nano dscann.cpp#[K###############./psim3c dscann.cpp###################nano dscann.cpp#[K###############clear#[K#####nano scann.cpp##############./a.out | tee dscann.txt####2.txt####
Psim3 project: Disk SCAN Sched with Normal Dist.
Simulation date: Wed Jul 24 08:53:50 2013

Total number of requests that arrived: 42
Total number of serviced requests: 42
Total head movement in cylinders: 1208
Average waiting time: 425.982
Disk utilization: 0.514635
--------------------------------------------------
 End of simulation Disk SCAN Sched with Normal Dist. Wed Jul 24 08:53:50 2013


[dlabudov@cs3 dlabudov]$
exit

Script done on Wed 24 Jul 2013 08:55:30 AM EDT

Comments

Popular posts from this blog

CS3150 Assignment 1

CS4500 Test 4 Study Guide

CS4150 Assignment 2