Computer Science

Primary storage

Primary storage, also known as main memory or internal memory, is a type of computer memory that is directly accessible by the CPU. It is used to store data and instructions that are currently being processed by the computer. Primary storage is volatile, meaning that its contents are lost when the computer is turned off.

Written by Perlego with AI-assistance

7 Key excerpts on "Primary storage"

  • Operating  Systems
    eBook - ePub

    Operating Systems

    Evolutionary Concepts and Modern Design Principles

    To negotiate such situations of space scarcity and speed disparity, computer memory came out with perhaps the widest range of type, technology, organization, and performance as well as its cost to keep the cost/performance of a computer system within an affordable limit. A typical computer system thus equipped with a diverse spectrum of memory subsystems maintaining a well-defined hierarchy; some are internal to the system to hold information that is directly accessible and referenced by the CPU, called primary memory or physical memory, and some are external to the system to store information, called secondary memory, accessed by the CPU via an I/O module. When data and programs are referenced by the CPU for execution, they are loaded in primary memory from this secondary memory; otherwise they remain saved in secondary memory (on a storage device). Discussions of secondary memory are outside the domain of this chapter and will be provided in Chapter 6, “Device Management”. While primary memory has faster access times than secondary memory, it is volatile, and secondary memory, on the other hand, is comparatively slower in operation but is a long-term persistent one that is held in storage devices, such as disk drives, tape drives, and CD-ROM. However, all processes (programs) must be resident in a certain portion of primary (main) memory before being activated. In other words, anything present in primary memory is considered active. The primary memory is therefore part of the executable memory (and is also sometimes called executable memory), since the CPU can fetch information only from this memory. Information can be loaded into CPU registers from primary memory or stored from these registers into the primary memory
  • Programming for Problem-solving with C
    eBook - ePub

    Programming for Problem-solving with C

    Formulating algorithms for complex problems (English Edition)

    Figure 2.7 illustrates the connection between memory and the processor.
    Figure 2.7: The connection between memory and processor
    Computer memory is of two types, which are as follows:
    • Primary/main/working memory
    • Secondary/auxiliary memory/external memory
    Primary memory
    Primary memory is temporary storage, also known as working memory or main memory. This memory is directly (primarily) accessed by the CPU, which is why it is known as primary memory. It stores all the current temporary data/instructions while the computer runs.
    Primary memory is further categorized into the following three parts:
    • RAM
    • ROM
    • Cache memory
    Generally, RAM is considered primary memory. It is volatile (the data is erased when the computer is switched off) in nature. The secondary memory is not directly connected to the CPU. It is also called auxiliary memory or tertiary memory.
    RAM
    RAM is an abbreviation for random access memory. It stores data as well as instructions before the execution by the CPU and the result after execution by the CPU. It is known as random access because the stored content can be directly accessed from any location randomly or in any order. The data which is currently used by the CPU is placed in it. It holds data or instruction temporarily as it is said to be volatile in nature (erased data when the power goes off or turned off). It needs a constant power supply to retain data. In order to run data or a program in a computer, it must load first in RAM. If the memory (RAM) is too low, it might be unable to hold all the necessary data or programs that the CPU needs. When this happens, the CPU has to access the required data from the secondary memory, which is very slow and leads to slowing down the computer. So, to solve this problem, you only need to increase the size of the RAM in a computer. There are the following two types of RAM:
  • Foundations of Computing
    eBook - ePub

    Foundations of Computing

    Essential for Computing Studies, Profession And Entrance Examinations - 5th Edition

    • Pradeep K. Sinha, Priti Sinha(Authors)
    • 2022(Publication Date)
    • BPB Publications
      (Publisher)
    Storage capacity. It is the amount of data, which the storage unit can store. Larger storage capacity is desirable. As compared to secondary storage units, Primary storage units have less storage capacity.
  • Access time . It is the time required to locate and retrieve stored data from the storage unit in response to a program instruction. Faster access time is preferable. As compared to secondary storage units, Primary storage units have faster access time.
  • Cost per bit of storage. It refers to the cost of a storage unit for a given storage capacity. Lower cost is desirable. As compared to secondary storage units, Primary storage units have higher cost per bit of storage.
  • Volatile. If a storage unit can retain data stored in it even in case of power off or interruption of power, it is called non-volatile storage . On the other hand, if a storage unit loses data stored in it in case of power off or interruption of power, it is called volatile storage . Obviously, non-volatile storage is desirable. In almost all computer systems, Primary storage units are volatile and secondary storage units are non-volatile.
  • Random access. If the time taken to access a piece of data from a storage unit is independent of the location of the data in the storage unit, it is called random access storage or random access memory (RAM) . Each location of a RAM is as easy to access as any other location and takes the same amount of time. In almost all computer systems Primary storage units have random access property and secondary storage units have either pseudo-random access (access time is nearly same for all locations but not exactly same) or sequential access (access time depends on the location of the data) property.
  • Main Memory Organization

    Main memory of a computer system consists of several small storage areas called locations or cells. Each of these locations can store a fixed number of bits called word length of the memory. Hence, as Figure 4.4 shows, a given memory is divided into N words, where N is generally some power of 2. Each word or location has a built-in and unique number assigned to it. This number is called address
  • Exploring Computer Hardware
    eBook - ePub

    Exploring Computer Hardware

    The Illustrated Guide to Understanding Computer Hardware, Components, Peripherals & Networks

    Read Only Memory is useful for storing a program that very rarely change. An example is the BIOS program needed to start a PC, sometimes known as firmware. Passage contains an image

    Secondary Storage

    Secondary storage, also known as auxiliary storage is memory that is used to permanently store computer software and data. This type of memory is known as non-volatile memory as it can retain the data even when the power is turned off. Non-volatile memory is used for permanent storage and backup.
    When you install an Operating System, an application, or save a file, these are stored on a secondary storage device such as a hard disk drive. Secondary storage devices are divided into three types: magnetic, solid state, and optical.
    • Magnetic storage devices such as hard disk drives use a magnetic field to magnetise sections of the disk to store data. These devices tend to be large in capacity and cheap.
    • Solid state devices use flash memory to store data. These devices tend to be small in capacity, expensive, and are fast.
    • Optical devices use a laser to read data from a CD, DVD or Bluray disk. You can also write data to a disk, however this is usually permanent and can’t be erased.
    Secondary storage devices are usually connected to the motherboard using a SATA cable. Here you can see the hard disk drive on the right with the SATA cable leading to a SATA port on the motherboard. Passage contains an image

    Hard Disk Drive (HDD)

    The hard disk (also called a hard drive) is like a filing cabinet and permanently stores all your documents, photographs, music, your operating system (such as Microsoft windows) and your installed software (such as Microsoft word).
    When you start up an application such as Microsoft word, the Microsoft word software is loaded up off the hard disk into the computer’s primary memory (or RAM), where you can work on your documents. The capacity or size of the disk is usually measured in Gigabytes or Terabytes, eg 500GB, 1TB, 4TB.
    The disk spins at 7200rpm on most modern hard disk drives and connects to your computer’s motherboard using a SATA cable. Some cheaper drives run at 5400rpm and can be slow on modern computers, so keep this in mind when buying.
  • Computer Architecture and Security
    eBook - ePub

    Computer Architecture and Security

    Fundamentals of Designing Secure Computer Systems

    • Shuangbao Paul Wang, Robert S. Ledley(Authors)
    • 2012(Publication Date)
    • Wiley
      (Publisher)
    Chapter 3 Computer Memory and Storage
    In this chapter, we will progress from how to design a one bit memory to how a large memory module is organized and connected through the memory interface. We will also study different memories including external memory and what are the main advantages for each of them. This chapter ends with some security issues about memory and how to secure data stored in memory.
    Memory is the key component in computer systems. It determines greatly the speed of a computer system. Two of the most important parameters of memory are the speed and the cost. The “access time” of computer memory includes memory read time and memory write time. In order to make memory fast, we usually use the fastest memory circuits and add a considerable number of circuits to the main memory. This makes the memory expensive. To reduce the memory cost, data and programs not immediately needed by the system are normally stored in less expensive secondary memory such as hard drives. Secondary memory is also called storage. Data stored in the storage are brought into the main memory as the CPU needs them.

    3.1 A One Bit Memory Circuit

    People use flash memory to store photos and documents. However fewer people have asked how data on the flash memory are stored, what a single memory unit looks like and why it can hold data without need for a battery?
    First let us look at the computer memory. A memory is a device that data can be written in and read out. Moreover, data need to be kept (stored) even after the writing/reading action is completed.
    Figure 3.1 shows one of Edison's great inventions, a light bulb. When we turn on the switch K, the light is on and will stay on. When we turn off the switch, the light is off and will stay off until it is turned on again next time. Now we see that the bulb and switch device can remember.
    Figure 3.1 A light bulb and a switch
    We would not use this device to build a computer since every action (write) needs human interaction. A transistor can be used as an electronic switch. Figure 3.2
  • The Tao of Computing
    CHAPTER 4 Where Are Programs and Data Stored?
    A S WITH THE REPRESENTATION of data, many applications make the details of program and data storage transparent to users as they run programs. Thus, when running a program, we rarely worry about where the program was stored, how the main memory is allocated for our work, or how data move into the main memory or the CPU. Similarly, when we work with a file from a word processor, spreadsheet, database, or Web browser, we normally do not think much about where on the disk the material is stored, how we open a file, or how the machine knows where to look for it. However, it is natural to wonder how these materials are stored and retrieved. Sometimes a basic understanding of such matters can guide us in getting work done efficiently. This chapter reviews some basics of program storage and data storage and considers how we can use this knowledge in our regular use of computers.

    What are the types of memory?

    Chapter 1 began an answer to this question by describing basic functions of the CPU and its registers, cache memory, main memory, and I/O devices—all connected by a bus. Addressing this question here allows us to consider four additional elements of a computer’s memory:
    1. Types of main memory (RAM and ROM)
    2. Transitory versus permanent memory
    3. Files and their organization
    4. Virtual memory and its relationship to files and main memory
    When we are finished, we will have the hierarchical view of computer storage that is shown in Figure 4.1 . (Although Figure 4.1 serves as a nice summary to this section of the chapter, you may have to keep reading to learn what all of the terms in the figure mean; please be patient as you read ahead!)
    FIGURE 4.1 Hierarchical view of computer storage (rectangles not proportional to actual size).

    Types of main memory

    As we begin our consideration of computer storage, we need to consider a computer’s main memory a bit more carefully. When considering the main memory, most of it, called random access memory (RAM), functions as described in Chapter 1
  • IC3: Internet and Computing Core Certification Global Standard 4 Study Guide
    • Ciprian Adrian Rusen(Author)
    • 2015(Publication Date)
    • Sybex
      (Publisher)
    Hardware components are specialized for the jobs they do. For example, one component handles the sound that is played by the computer, another handles the image displayed on the screen, another handles the connection to the network, and so on. Generally, inside the case of a computer you will find the following hardware components:
    Processor   Also known as the CPU (central processing unit), it is the “brains” of a computer. The CPU is what carries out the instructions sent by the software you run. It’s the most important hardware component in a computer. You cannot have a running device without a processor.
    RAM   RAM means random access memory, and it is a volatile and very fast form of memory that allows data to be read and written in roughly the same amount of time. Software uses RAM to carry out calculations and operations as quickly as possible. When an application is closed, it no longer uses a portion of the available RAM, and it frees it up for other applications. RAM can’t be used for long-term storage, however, because all data in RAM disappears when a computer is restarted or shut down.
    Disk Storage   There are two types of disk storage solutions that are commonly used in computers:
    Hard Disk  This is the data storage device in your computer that is used for storing and retrieving information. Unlike RAM, a hard disk stores data permanently, and it can hold large amounts of information. Also, it is slower at writing and reading data. On a hard disk, data is usually read faster than it is written. In many modern computers, traditional hard disks are replaced with devices named SSDs.
    SSD  Solid-state disks (SSD) are also data storage devices, but they use different circuitry and methods for storing your data as well as fewer moving parts. They are much faster than traditional hard disks and consume less power when running. Generally, SSDs are at least five times faster than traditional hard disks. Due to their benefits and continuously lowering prices, they will ultimately replace hard disks.
    Graphics Card
  • Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.