Logout

Home Topic 2 Last Next

--- Secondary memory ---

2.1.5

Identify the need for persistent storage.

 

Teaching Note:

Persistent storage is needed to store data in a non-volatile device during and after the running of a program.

LINK Consequences of data loss.

TOK If there are no consequences of data loss, why is it stored.

TOK There is no such thing as persistent storage.

AIM 9 An appreciation of the issues related to both the ever increasing amount of data and a need to retain it.


Sample Question 1 - FORMER CURRICULUM AND LIKELY NOT NEEDED <----------- (But put here so not lost, in case applies somewhere else.):

Define the term direct access. [2 marks]

Sample Question 2:

...Sequential file access is used to update individual product prices when they change.

(b) State one disadvantage of using sequential access in this way. [1 mark]

(c) State an alternative file access method and briefly explain one advantage of using
this method. [2 marks]

 

JSR Notes:

 

Identify the need for persistent storage

The need for persistent storage is simply so that we can keep changes to our data over a long period of time - specifically, without having to keep electricity flowing in a perfectly uninterrupted way through the RAM of our primary memory - which is neither financially, nor practically realistic.

Or the way that the Teaching Note puts it: "Persistent storage is needed to store data in a non-volatile device during and after the running of a program."


Temporary Storage vs. Permanent Storage

The History of Permanent (IT) Storage

It makes sense with this assessment statement, as with many that deal with the fundamentals of how computers are put together, to think about "back in The Day", when these terms and concepts and technologies were developed. So, back in The Day, the original computers were doing calculations, and that was cool, but that was it. In fact, you can think of them as having been nothing more than big calculators. Any result that they needed to permanently stored could be stored by paper by pen, or typewriter. So storage itself, back then was not a big consideration.

There was no "Big Data" back then, or even multimedia files of Megabytes and Gigabytes. There were just, mainly, numeric solutions that came out at the end from a complex and multi-step calculation that was done remarkably quickly by a machine. So not much to store, and easily done an old fashioned way; it was the complicated calculation, done quickly, itself that was the big thing.

Persistent Storage instead of just RAM

But sooner or later, it did indeed make sense to have a way to store results to calculations, and, more generally, all data, in some permanent way. Without getting into the history of magnetic tape, to hard drives, to today's Flash memory, all those 0s and 1s of the on and off electrical circuits had to be put in some non-volatile form. And do make sure at this point that you know what "non-volatile" means - that electricity is not required to keep it. In the case of tape, hard drives, and all other magnetic media, the way this is achieved is by patterns of "0"s and "1"s as tiny regions that are magnetic to one degree (the 0s) or magnetic to another, higher degree (the 1s). These magnetic states can be kept - for all intents and purposes - permanently.

Note that this kind of "persistent" storage can also be called "secondary storage", "secondary memory", or simply "storage". And whatever we refer to it as, it's permanence is in contrast to the non-permanent nature of RAM and cache.

We satisfy the need for persistent storage with things such as: hard drives, solid-state drives (SSDs), flash sticks, SD cards, and optical discs (CDs & DVDs).

Saving Files

Now-a-days just about everything we do on a computer has some sort of "result" that we want to "store". Be it an essay we write, a financial spreadsheet we enter values into, a digital song we compose, or a photo we adjust in Photoshop, sooner or later we will usually want to open up and work with, or even just look, at that "result", and so we store it permanently. Even with more transient pursuits on a computer, like playing a video game, there are still very often results we want to save. In the examle of a game, these results can take the form of levels already achieved, and high scores, both of which we will want to store for use the next time we continue playing the game.

 

Data That Must Be Saved

So there is a general "need" for permanent storage because of the volatile nature of RAM, and there is also the general need to work with files again. But beyond these two general facts, there are a variety of specific reasons why we "need" to store certain data safely and permanently. And this is actually what most reflects what the Teaching Notes are getting at.

- Banking records - Why? To keep track of the money everyone has.

- Logs of Internet activity - Why? For tracing crimes and terrorism - looking at massive amounts of present and historical data to try to make connections.

- Medical records - Why? The medical history of people helps the diagnosis and the administration of cures.

- Financial/economical stuff like stock markets - Why? If markets malfunction due to loss of data, economies can be sent into turmoil.

- Criminal records - Why? So criminals can be known and anticipated etc. and not allowed into situations where they could repeat their crimes.


Summary

So in conclusion, there is **need** for persistent storage for two related reasons. Number one, volatile memory is not persistent, so there is a need for some other form. And number two, there are things we do need to store long-term.

 

Finally, something on each Teaching Note:

 

LINK Consequences of data loss. - See above, and refer back to 1.1.12 (and if haven't covered Topic 1 yet, take a peek)

TOK If there are no consequences of data loss, why is it stored.

Question: What could we lose and not be worried about? For example, having turned in your EE, what about your EE? Why is it still stored?
Answers: Proof you turned it in, in case they lose it. You may want to refer to it for other work later on in your academic career. So there are reasons for EEs being saved.

What about things from 8th grade? There is surely a point where many things no longer need to be saved (and be continually taking up the computing and cooling resources needed to keep them in the cloud, for example)...

TOK There is no such thing as persistent storage.

Hard drive can be destroyed. And one day they may all degrade enough so as to become useless. So what does persistent mean?...

AIM 9 (Recall "AIM" is "the promotion of specific subject aims") An appreciation of the issues related to both the ever increasing amount of data and a need to retain it.

Issues are "Cloud" issues, and "Big Data" issues. For example, is it environmentally wise for people around the world to be saving their data to Apple's "cloud", which is an enormous warehouse packed with servers in South Carolina etc.?... As noted below, the equivalent of over 50 coal plants in the US alone.

Issues: $$$ environmental damage by big server farms.... and, folks at places like the NSA keeping a record of ****E V E R Y T H I N G***** every phone call, every e-mail. So huge privacy issues... which Edward Snoden unovered for the world to see.

And now-a-days, it's not just governments keeping track of everything, to greater and lesser extents, it's every company with whom you sign up on your phone and other IT devices. Not just everything you link to, and every word you type, but everywhere you go. But back to the AIM point; not only is this a huge privacy concern, but an environmental concern also.

Go Pro camera to record everything - advantages and disadvantages. But huge amounts of data.

Example of sensors in car seat storing huge amounts of data about sitting position to analyze and warn a driver when they are about to go to sleep. Definite pluses to this...

 

----------------------------

EXTRA - NOT NEEDED, BUT ADDED FOR YOUR INTEREST/ENRICHMENT

(Any "EXTRAS" or "Beyond the Curriculum" etc. material at the bottom of notes pages is not necessary to take a look at, but is here for your interest.)

 

First of all, some videos of various things menitoned in class - some more directly related than others to the assessment statement above.

Russian Cyber Attack on Estonia 2007


Inside a Google Data Center


Energy used by Data Centers (the equivalent of 51 coal plants for the US alone)


Big Data


Inside a giant circuit board factory in China


Early computer with punch card reader (can you believe this is how I started my programming?)


One other neat thing we can do in class, is use "Grand Perspective" to see what's taking up the most space in our hard drives. And one interesting thing you can note doing this, in relation to 2.1.2 also (primary memory), is the "Sleep Image", which naturally will be exactly the number of Gigabytes as the RAM of your laptop, since that's what a sleep image is, an image of what's in the RAM when you put the computer to sleep (& so no longer supply the RAM with the electricity it needs to maintain its data).

 

 

 

 

 

 

 

 

JSR Notes: - FORMER CURRICULUM AND LIKELY NOT NEEDED - <------------ (But put here so not lost, in case applies somewhere else.) - 3.2.6 Outline the characteristics of secondary memory and define sequential and direct access.

The first part of this assessment statement is quite broad indeed.  And the textbook does a quite good job covering all of the various secondary storage techniques.  Use it as your prime source, and use this for clarifications.   But on the off chance that the change in focus was missed: we had just been talking about primary memory, and now we are talking about secondary memory.  Primary memory is basically RAM and cache; it’s the fast memory that is held temporarily.  Secondary memory, otherwise know as secondary storage, or storage memory, is just that: memory used for storing data long-term.

Tapes
So, the first clarification that must be made is that the textbook is a little out of date regarding the latest in storage techniques; it acknowledges this fact.  The main point in this regard to note is that tapes are still very much in the world of the textbook.  And though they definitely are still used frequently today for storage, they don’t have to be, with the price and capacity of hard drives what it is.  But it is convenient that the textbook is able to focus on tapes, since tapes are the one secondary storage device that allow focus on sequential access.  And sequential access is a bit deal in this assessment statement.

Sequential Access Vs. Direct Access
The first thing to draw to your attention here is that the second part of this assessment statement is actually quite straight-forward: “define sequential and direct access”.  Certainly it’s good to go beyond just a definition, but for what it’s worth, the definitions are required knowledge, so here you go:
Sequential access: Access to data on a storage device that is based on the order of the data, and any particular data record cannot be accessed except with reference to the data records that came before it.  Tapes are the most common device that use sequential access.
Direct access: Access to data on a storage device that is direct; it does not require reference to the other data records that came before it to be accessed.  It is also called random access.  It is the kind of access used on most storage devices now-a-days, including hard drives.

Now, here’s a little more background on the difference between sequential and direct access.  Like I say, it’s covered pretty well in the textbook, but it would’t hurt to be reiterated.  Of the secondary storage devices mentioned, only tapes use sequential access.  And this is out of necessity.  The way they are physically structured, there is no choice but to “fast-forward” or “re-wind” past other material to get to the data that you require.  Not so with all the other secondary storage; one way or another, they are able to more-or-less directly pick out what they are looking for.  In the case of a disk drive, there are times involved rotating the read/write arm, and waiting for the desired data to spin around to where it is, but you’re talking about milliseconds, and you certainly don’t have to go past all the other data on the disk to get to where you want.  So this is as direct as can be, and is very different from the sequential access of a tape. ***Look at the textbook for details on the differences and advantages/disadvantages, page 147, 148; it’s good enough that I don’t have to clarify anything else here.***

Serial Vs. Sequential
It also wouldn’t hurt at this point to clear up the difference between “serial” and “sequential”.  As the name implies, sequential files should actually be sequences, i.e. ordered somehow – usually alphanumerically by some key field of the records (more on this in topic 7).  But serial just implies one after the other, though not necessarily in any particular order.  In the olden days, distinguishing between these two types of storage was a big deal.  But for now the main take-away point is that tapes are able to be most efficiently searched if they indeed do keep things ordered, i.e. that they are indeed sequential files.  Meantime, though, and importantly, all direct access storage techniques are not required to be ordered, since one way or another (more in Topic 7 about how) the read/write head, etc. is able to find them directly.

Two important points to keep in mind
And again, it’s important to keep in mind that sequential access existed out of necessity, and now, given the choice, you’ll almost always go with direct access techniques.  But another point not to be missed is that in situations where the given data is always read in a certain way anyway, sequential access is actually faster, and so to be preferred.

The teaching note
The first teaching note says you should be aware of which kind of access each of the listed storage media use, and the answer is direct access, except for tape.  And I’ll not bother putting here a response to the teaching note that says you should be able to give an application of all the different storage media, but do stop to consider for a moment at least one advantage, and one disadvantage of each of:
Tape
CD/DVD
Hard Drives
Flash
Can you??  If not, look at the Mr Rayworth handout/link “How Computers Work and What Makes Them Faster”.  Perhaps the only one to add here now is that Flash is very fast, but still relatively expensive compared to other storage media.

The last thing to mention is that the technical details of tracks, sectors, and so on are more Topic 7 that Topic 3.  But for HL students, remember that there are some good details back here, when you get to Topic 7.