NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


03
More About Memory
Recall that our operating system is stored in secondary memory. But wait—why is such an important piece of software not stored in primary memory? Is there even such a thing as primary memory? And while we’re at it, why is memory important for coding?

Primary vs. Secondary Memory
The short answer is yes, primary memory does exist, but it is mainly for short-term storage. Programs that you’re currently using will store their data in primary memory so your computer can access it faster, which helps you get through your tasks on the computer faster. In contrast, secondary memory holds things like an operating system that you want to store for a long time.
.
Think of primary memory like a backpack; it’s useful for toting things around for a short amount of time, but when you really want to keep something safe for the long-term, you might look for a more permanent storage option.

Why these distinctions? Well, the main difference between primary and secondary memory is that primary memory is volatile. Let’s take a closer look at what that means.


These days, you’ll likely hear about volatile and non-volatile memory more often than primary and secondary memory.

Types of Memory
Let’s look at a few examples of both primary and secondary memory to see how they function in our thinking machines.

Hard Drives
The hard drive is the slowest, least expensive type of computer memory and is considered secondary/non-volatile (as it retains its data when the computer is turned off).

A magnetic hard drive has a spinning metal plate that works kind of like a record player. A little arm glides over the disk and writes your data onto it by magnetizing little bits of the metal. The arm can then read that data back whenever you like to load up your data. Because the data is stored by magnetizing little chunks of metal, hard drives don’t erase themselves when you unplug them. The only reason anyone uses this kind of hard drive anymore is because it is very affordable and non-volatile. (Most people use solid-state drives at this point).

Solid-State Drives
Another type of storage has become quite popular lately: solid-state drives (SSDs). These are like magnetic hard drives in that they are non-volatile, but flash cells inside of special memory chips store data on SSDs rather than magnetizing metal to store data,. These chips are much faster than a magnetic hard drive, but they are still non-volatile—they don’t forget everything when they turn off. SSD storage is the fastest non-volatile memory we currently have, though efforts are underway to develop even faster options.

Random Access Memory
If you tried to run a whole computer directly off an SSD, you would soon discover that they are too slow to be usable by modern standards. This is because everything is stored on the SSD while the computer is off because the SSD (or hard drive) is the only component that doesn’t wipe itself when the power cuts out—again, they’re non-volatile.

When you start a computer or run a program, the computer copies the program from the slower SSD or hard drive to the much faster (but volatile, or primary) RAM (random access memory)

By adding or upgrading your computer’s RAM, you can increase the processing speed of the computer.

RAM is about a thousand times faster than an SSD but is volatile, so you can’t use it to store anything you’d want to access regularly or permanently.

L Caches
Beyond RAM, there are even faster types of memory called L caches that are built into modern CPUs. This kind of volatile/secondary memory is stored directly on your computer’s CPU—the “brain” of the computer—and helps it process data as quickly as possible.

Memory Management
Recall that our computer systems operate in four layers: the user (that’s you!), application, operating system/software, and hardware. Memory management is a team effort for your computer hardware, operating system, and applications. These components work together to coordinate computer memory. Your computer does this automatically, so you’ve probably never thought about it, but someone had to code your operating system to give your computer specific instructions about how to assign different portions of physical storage to various programs as they run so that everything goes smoothly.

By now, you might be wondering how memory usage impacts coding. Recall that we will be learning to code using the language Python in the web-based tool PythonAnywhere. For certain other coding languages, the memory on our actual computer does matter. However, PythonAnywhere actually handles all of these memory functions for us, so there’s nothing in particular we will need to think about in terms of memory as we learn to code. This is good because there will be plenty to think about as we integrate new coding concepts!

© eDynamic Learning ULC | All Rights Reserved.
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.