Expert Answer:Operating Systems Fundamentals short answer questi

Answer & Explanation:Please complete 10 questions in HW10.DOCX, two ppt are for references. Please write the answer clearly and well explained. Please let me kw if u need more guide or resource. Thank you so much.
lecture_15_disk_management_1_.pptx

lecture_16_input_output__2_.pptx

hw_10__1_.docx

Unformatted Attachment Preview

IT-342
Operating System
Fundamentals
Lecture #15
Disk Management
Disk Management

Includes



Scheduling
Buffering
Swap Space Management
Disk

Large one-dimensional Array of logical
blocks


Typically 512 bytes per block



Yes logical
But can be other sizes
Blocks mapped into sectors
Tracks are skewed to account for time it
takes to move head between tracks
Mapping from logical to
physical

Conversion is difficult


Defective sectors
Sectors per track not always constant

Constant Linear Velocity


Like CD-ROM
Constant Angular Velocity

Like Magnetic Disk
Access Time

Total time to fetch some data

Seek Time


Rotational Latency


Time to rotate disk to position under head
Access time is sum of these and ignoring electrical
delays is the time to fetch the first byte



Time to move head and allow it to stabilize
Wait for device
Wait for channel
Transfer Time

Time for number of needed bytes to pass under head
Total Time

Time =


Seek Time +
Rotational Delay (1/2r) +


R = disk speed, ½ is on average half of disk
Transfer Time

Bytes/(rotation speed * bytes on track)
Example to retrieve 1.28 MB





Seek 4 ms
100 sectors / track
512 byte blocks
5 blocks / sector
7500 rpm disk

125 rps
Example to retrieve 1.28 MB

Time =




4 ms +
1/(2*125/sec)+
1.28M/(125/sec*512*5*100)
=

4 ms + 4 ms + 41.9 ms

= 49.9 ms

What’s wrong here?
What’s Wrong

1.28MB is This is 525 sectors



Probably add rotational delays as well


So its 6 tracks
That’s 6 seeks, not 1, adds 20 ms
That’s another 5*4 = 20 ms
Total is 89.9 ms
Then What

Once the data is retrieved it is sent to
computer memory via some interface

SATA (Serial ATA) operates at 375 MB/s

For our problem here that’s another

3.4 ms
Workload

Sequential


Taking all information from disk on a track
then moving to next track
Random

Moving to exact locations to get small
amounts of information
Sequential workload is orders of magnitude faster than random.
Disk Scheduling

The OS manages how and when files
are transferred from the disks.





Fist In, First Out (FIFO) aka First Come
First Served (FCFS)
Shortest Seek Time First (SSTF)
SCAN
C-SCAN
Variations of SCAN and C-SCAN


LOOK and C-LOOK
R-SCAN and R-CSCAN
FCFS



Disk I/O handled in order it is received
Simple
The disk arm must move to each
location in turn
FCFS
FCFS
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
SSTF

Order the requests that minimize the
arm movement


Closest request to current track is served
next
May suffer from starvation
SSFT
SSFT
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
11
SCAN

Moves to beginning then to end then to
beginning, etc.


The elevator algorithm
Starts at beginning and end no matter
what the requests are.
SCAN
SCAN
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
11
12
13
C – SCAN


Starts at end with most requests then
goes to other end, then returns
(without requests)
Services requests in only one direction
C-SCAN
C – SCAN
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
11
12
13
LOOK

Looks for request in the given direction
before continuing

Doesn’t go to first or last cylinder unless
needed
LOOK
LOOK
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
11
C – LOOK

Services in one direction only but
doesn’t go to first or last cylinder unless
needed
C-LOOK
C – LOOK
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
5
6
7
8
9
10
11
R-SCAN



Variation of SCAN that allows small
seeks going the other way to avoid
extra rotational delays
It is rotationally aware
R-CSAN is similar except it generally
only satisfies requests in one direction
(with the occasional back track).
How do they compare?
Disk Scheduling
200
180
160
140
120
100
80
60
40
20
0
1
2
3
4
FCFS
5
SSFT
6
SCAN
7
8
C-SCAM
9
LOOK
10
C LOOK
11
12
13
Formatting

Low-level

Fills each sector with special data structure



Header
Data Area
Trailer


Partitions


Includes Error correction codes
Each treated as a separate disk
Logical Formatting
Logical Formatting

Blocks grouped to form clusters


Blocks used for disk I/O
Clusters used for file I/O
Booting

Bootstrap program initializes the system
such as CPU registers, device
controllers, main memory


Normally in ROM
Today initial part in ROM

Remainder on disk so changes can be made
Bad Blocks

IDE handles manually



Can write a special value to indicate its bad
Controllers can maintain a list of bad
blocks
Spare sectors set up not visible to OS

When bad block found, it is replaced
Swap Space

System dependent on what it is used
for



Process swapping
Interim page holding
Location


In normal file system
On separate partition

Uses swap-space storage manager

Optimized for speed not storage
Solid State Drives



Basically flash storage (a memory
technology)
Better random I/O performance than a
disk
Significantly more expensive than a disk
Internals

Uses a floating gate transistor



The gate holds an electrical charge for
months or years without power
Can be charged or discharged via electron
tunneling with a sufficiently high voltage
next to it
The charge can be detected with a lower
threshold voltage
Types

Single Level


Multi-Level


Each transistor stores multiple bits by storing differing
charge levels
NOR


Each transistor stores one bit (charge or no charge)
Wired to allow individual words to be written and read
NAND


Wired to allow reads and writes of a page at a time (2kB to
4kB)
Denser than NOR
Operation

Must first be erased


Set each cell to a logical 1
Can only erase in large blocks (called erasure blocks)



Write


128kB to 512kB in size
Takes several milliseconds
For NAND takes tens of microseconds (one page at a time)
Read

For NAND a page at a time (tens of microseconds)
Nuances

Because you must erase large blocks
before you can write

Flash Translation Layer


Maps logical flash pages to physical pages
Means you are writing lots of untouched data
Lifetime and errors

Holds state for months to years.


Circuits do degrade over time (few million
cycles)
Read disturb error

Can disturb surrounding cells charges
Solutions to errors


Error correcting codes
Page and block management


Wear Leveling


Mark it and stop using
Continue moving data around the device
Spare pages and blocks


Allows leveling
Keeps size the same as pages and blocks
wear out
Example (Intel 710 series)
circa 2011







300 GB NAND in 4kB pages
Bandwidth: 270MB/s Read, 210MB/s Write
Latency: 75 usec
R/W per second: 38,500 Read, 2,000 Write
(2,400 with 20% reserve)
Interface: SATA 3Gb/s
Life: 1.1 to 1.5 PB
Power 3.7w (0.7w when idle)
SLED

Single Large Expensive Disk
Not in book
RAID

Redundant Array of Independent Disks





(Redundant Array of Inexpensive Disks)
A set of physical Drives
OS Views as one drive
Data distributed across them
May have redundant capacity
RAID Levels


0 to 7
Optimizes on a primarily three features




Redundancy
Space or Capacity
Speed
Under 0 to 7 with n disks each holding m
data

Can store from ½ mn (Level 1) to mn (Level 0)

Others in between
RAID today

Figure out what you want




Speed
Capacity
Redundancy on the fly
Purchase what you need

The details are handled by the device

The OS only sees one drive.
IT-342
Operating System
Fundamentals
Lecture #16
Input / Output
Reason for Input / Output
(I/O)

Normally the primary purpose of a
computer

Most applications don’t do much
processing

It’s just moving information
I/O Objectives

Efficiency


I/O operations are usually the bottleneck
I/O devices are slow compared to CPU


Everything is on the disk (or similar device)
Generality

Handle all devices uniformly
OS Role in I/O

Manage and control


I/O Operations
I/O Devices
I/O Categories

Human Readable


Machine Readable



Printers, terminals, video displays, mouse
Communication with equipment
Disk drives, USB keys, sensors
Communication

Communication with remote devices

Modems, line drivers
Not in book
Issues with I/O

Devices vary in function, speed,
methods of control
Trends in I/O
1.
2.
Increasing standardization of SW &
HW interfaces
Entirely new devices are being placed
on the market
Bus





Set of wires
Maybe some hardware
Strict protocol
Direct connection to CPU is referred to as
back side bus
Examples




PCI bus
IDE Disk Controller
SCSI
Expansion
Daisy Chain

Peripheral connected to each other


Disk Drives
USB
Communication with I/O


Direct through bus
Memory Mapped
Methods of I/O

Polling



Interrupts


Aka Busy Waiting or programmed I/O
CPU continually (periodically) checks device
Peripheral sends a signal when it needs to be
serviced
Direct Memory Access (DMA)

Controller that can directly access Memory
Interrupt Issues


May have priorities
Must identify proper subroutine (handler)


Through interrupt vector
Can be blocked for critical sections of code
Handling Interrupt Issues




Multiple IRQ (Interrupt Request Lines)
Post address to access proper Interrupt
Vector
For large numbers of devices use
chaining
Include priority levels
DMA Configurations
Single Bus with detached DMA
CPU
DMA
Memory
I/O
Single Bus with Integrated DMA
CPU
DMA
I/O
Memory
DMA
I/O
I/O
DMA Configurations
Double Bus
CPU
Memory
DMA
I/O
I/O
I/O
I/O
I/O Device Characterization

Method of Data Transfer


Access Method


Sharable or Dedicated
I/O Direction


Synchronous or Asynchronous
Sharing


Sequential or Random
Transfer Schedule


Block or Character
Read, Write, Bi-directional
Device Speed
Blocking

Blocking I/O


Non-blocking I/O


Process blocks when I/O occurs
Process does not block but continues
through another thread
Asynchronous I/O

Process continues other tasks and picks up
when I/O completed
Buffering



Accounts for differences of speed
between two devices
Breaks transfer into smaller pieces
Support copy semantics
Types of Buffering

Single Buffer



I/O Device
Process
I/O Device
Process
Two buffers
Circular Buffer

Process
One buffer
Double Buffer

I/O Device
More than two buffers
IT 342 HW 10 (20 pts)
1. (2) Describe a typical Disk Drive and some issues that must be considered for its use?
2. (2) What is the total time to fetch some data from a disk (access time)?
3. (2) Given the following tracks that are in the queue, which Disk Scheduling algorithm would most
efficiently retrieve the data from a disk with 200 tracks? 86, 172, 28, 132, 13, 150, 55, 60, 20, 180 –
last data retrieved was on track 40.
4. (1) What doesn’t problem 3 account for?
5. (3) You are implementing a RAID storage system and have found a system with eight 100 GB
drives. How much storage space will you have available? How does the OS handle this RAID?
6. (2) What is the difference between a block device and character device. Give an example of each.
7. (1) What are the drawbacks for contiguous file allocation?
8. (3) What are the three methods of I/O handling and how do they work?
9. (1) What are the purposes of buffering?
10. (3) Show three methods to connect a DMA to a system.
For your own use. I’ll post a solution but will not grade these.
A. For I/O, with all other specifications identical, which is better: a 10,000 rpm disk drive or a 7,500
rpm disk drive. Show why
B. What is the total time to retrieve one sector of data from a 10,000 rpm disk drive with a
4 msec seek time if there are 50 sectors on a track, 10 blocks / sector, and 512 bytes per
block. How much data is retrieved?

Purchase answer to see full
attachment

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more