<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?
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:
There are many Disk Scheduling Algorithms but before discussing them let’s have a quick look at some of the important terms:
Disk Scheduling Algorithms
Advantages:
Disadvantages:
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.
<Operating System> 1. Which scheduling objectives from module(CPU Scheduling) would also apply to disk scheduling? 2....
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 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 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 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 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 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: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% 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 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 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...