Disks: Difference between revisions

From COMP15212 Wiki
pc>Yuron
No edit summary
 
gravatar W81054ch [userbureaucratinterface-adminsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
-->{{#invoke:Dependencies|add|IO,3}}
-->{{#invoke:Dependencies|add|IO,3}}
<blockquote>
<blockquote>
This article is very much an <em>overview</em> of what is logically thought
This article is very much an <em>overview</em> of what is logically thought of as a “disk”.  It does not delve into lots of detail about the operation of a [https://en.wikipedia.org/wiki/Hard_disk_drive hard disk drive].
of as a “disk”.  It does not delve into lots of detail about the
operation of a [https://en.wikipedia.org/wiki/Hard_disk_drive hard disk drive].
</blockquote>
</blockquote>
Firstly, what is generically referred to as a “disk” is
Firstly, what is generically referred to as a “disk” is <em>probably</em> a magnetic disk (actually a stack of several physical
<em>probably</em> a magnetic disk (actually a stack of several physical
disks) but could be an optical disc or some non-circular form of storage: Solid-State Drives (<strong>SSDs</strong>) such as a “memory stick” which uses semiconductor [https://en.wikipedia.org/wiki/Flash_memory “Flash” memory].  Some ‘drives’ even employ DRAM.  Other “disks” may be hybrid systems with both magnetic media and an internal semiconductor cache.
disks) but could be an optical disc or some non-circular form of
storage: Solid-State Drives (<strong>SSDs</strong>) such as a “memory
stick” which uses semiconductor [https://en.wikipedia.org/wiki/Flash_memory “Flash” memory].  Some
‘drives’ even employ DRAM.  Other “disks” may
be hybrid systems with both magnetic media and an internal
semiconductor cache.


The point here is that the “disk” is really an [https://en.wikipedia.org/wiki/Auxiliary_memory auxiliary memory] and its
The point here is that the “disk” is really an [https://en.wikipedia.org/wiki/Auxiliary_memory auxiliary memory] and its <em>details</em> can typically be abstracted away.  (However some influence of the evolution from spinning disks may still be evident!)
<em>details</em> can typically be abstracted away.  (However some influence
of the evolution from spinning disks may still be evident!)


A computer’s ‘main’ [[memory]] (“primary” storage) architecture is set by the processor’s [[Extra:ISA|ISA]]; thus a 64-bit x86 processor is able to address
A computer’s ‘main’ [[memory]] (“primary” storage) architecture is set by the processor’s [[Extra:ISA|ISA]]; thus a 64-bit x86 processor is able to address (<em>virtually</em>) 2<sup>64</sup> locations – each location potentially containing an 8-bit (byte) value – directly.
(<em>virtually</em>) 2<sup>64</sup> locations – each location potentially
containing an 8-bit (byte) value – directly.


In auxiliary storage the addressing is managed in software so the
In auxiliary storage the addressing is managed in software so the address range can be different – indeed larger.  On the other hand, access times are <em>much</em> greater so auxiliary (or “secondary”) storage is used for <strong>blocks</strong> of data much
address range can be different – indeed larger.  On the other hand,
larger than a byte which are addressed as indivisible units.  Thus a block number (address) may refer to (say) 512 <em>bytes</em> (4096 bits) rather than 8 bits of data.
access times are <em>much</em> greater so auxiliary (or
“secondary”) storage is used for <strong>blocks</strong> of data much
larger than a byte which are addressed as indivisible units.  Thus a
block number (address) may refer to (say) 512 <em>bytes</em> (4096 bits)
rather than 8 bits of data.


[[Image:all_memory.png|link=|alt=All memory]]
[[Image:all_memory.png|link=|alt=All memory]]


=== Speeds ===
=== Speeds ===
A desktop processor cycles in around 500 ps.  Primary memory
A desktop processor cycles in around 500 ps.  Primary memory (SDRAM) is <em>much</em> slower (say 100x) <em>but</em> much of this is alleviated by [[caching]].
(SDRAM) is <em>much</em> slower (say 100x) <em>but</em> much of this is alleviated
by [[Caching | caching]].


Solid-State Drives (SSDs) may <em>be</em> SDRAM, which suggests they are a
Solid-State Drives (SSDs) may <em>be</em> SDRAM, or at least contain its own SDRAM cache, which suggests that most Solid-State storage would be a couple of orders of magnitude slower.
couple of orders of magnitude slower.


Magnetic disk access is dominated by the <em>seek time</em> and the time it
Magnetic disk access is dominated by the <em>seek time</em> and the time it takes for the disk to rotate to the correct place to start the read. Together these may add up to a few milliseconds, thus of the order of 10<sup>7</sup>x slower than the effective primary memory speed.
takes for the disk to rotate to the correct place to start the read.
Together these may add up to a few milliseconds, thus of the order of
10<sup>7</sup>x slower than the effective primary memory speed.


=== Uses ===
=== Uses ===
Secondary memory is primarily useful for:
Secondary memory is primarily useful for:


*[[Paging | Paging]] in [[Virtual_Memory | virtual memory]] systems.
*[[Paging]] in [[Virtual Memory|virtual memory]] systems.
*[[Filing_System | File store]].
*[[Filing System|File store]].


----
----
 
{{BookChapter|11|449-485}}
{{PageGraph}}
{{PageGraph}}

Latest revision as of 10:02, 5 August 2019

Depends on IO

This article is very much an overview of what is logically thought of as a “disk”. It does not delve into lots of detail about the operation of a hard disk drive.

Firstly, what is generically referred to as a “disk” is probably a magnetic disk (actually a stack of several physical disks) but could be an optical disc or some non-circular form of storage: Solid-State Drives (SSDs) such as a “memory stick” which uses semiconductor “Flash” memory. Some ‘drives’ even employ DRAM. Other “disks” may be hybrid systems with both magnetic media and an internal semiconductor cache.

The point here is that the “disk” is really an auxiliary memory and its details can typically be abstracted away. (However some influence of the evolution from spinning disks may still be evident!)

A computer’s ‘main’ memory (“primary” storage) architecture is set by the processor’s ISA; thus a 64-bit x86 processor is able to address (virtually) 264 locations – each location potentially containing an 8-bit (byte) value – directly.

In auxiliary storage the addressing is managed in software so the address range can be different – indeed larger. On the other hand, access times are much greater so auxiliary (or “secondary”) storage is used for blocks of data much larger than a byte which are addressed as indivisible units. Thus a block number (address) may refer to (say) 512 bytes (4096 bits) rather than 8 bits of data.

All memory

Speeds

A desktop processor cycles in around 500 ps. Primary memory (SDRAM) is much slower (say 100x) but much of this is alleviated by caching.

Solid-State Drives (SSDs) may be SDRAM, or at least contain its own SDRAM cache, which suggests that most Solid-State storage would be a couple of orders of magnitude slower.

Magnetic disk access is dominated by the seek time and the time it takes for the disk to rotate to the correct place to start the read. Together these may add up to a few milliseconds, thus of the order of 107x slower than the effective primary memory speed.

Uses

Secondary memory is primarily useful for:


Also refer to: Operating System Concepts, 10th Edition: Chapter 11, pages 449-485