Difference between Primary and Secondary Memory - GeeksforGeeks (2024)

Skip to content

Difference between Primary and Secondary Memory - GeeksforGeeks (1)

Last Updated : 08 Mar, 2024

Improve

Computer Memories store data and instruction. Memory system can be divided into 4 categories:

  • CPU register
  • Cache memory
  • Primary / Main memory
  • Secondary Memory / Mass Storage

They can be represented in an hierarchical form as:

Difference between Primary and Secondary Memory - GeeksforGeeks (2)

Computer Memory

1. Primary / Main memory: Primary memory is the computer memory that is directly accessible by CPU. It is comprised of DRAM and provides the actual working space to the processor. It holds the data and instructions that the processor is currently working on. 2. Secondary Memory / Mass Storage: The contents of the secondary memory first get transferred to the primary memory and then are accessed by the processor, this is because the processor does not directly interact with the secondary memory. Now, Let’s see the difference between Primary memory and Secondary memory:

Primary memorySecondary memory

The primary memory of a computer is the main memory that is utilized to store data temporarily.

Secondary memory defines to additional storage devices that are utilized to store data permanently.

Primary memory is temporary.Secondary memory is permanent.

Primary memory is faster than secondary memory because it is directly accessible to the CPU.

Secondary memory is non-volatile, which means it retains data even when the power is off.

Primary memory is directly accessible by Processor/CPU.Secondary memory is not directly accessible by the CPU.
Nature of Parts of Primary memory varies, RAM- volatile in nature. ROM- Non-volatile.It’s always Non-volatile in nature.

Primary memory is volatile, which means it is wiped out when the computer is turned off.

Since it is non-volatile, data can be retained in case of a power failure.

Primary memory devices are more expensive than secondary storage devices.Secondary memory devices are less expensive when compared to primary memory devices.
The memory devices used for primary memory are semiconductor memories.The secondary memory devices are magnetic and optical memories.

It can hold data/information currently being used by the processing unit.

It can hold data/information that are not currently being used by the processing unit.

The capacity of primary memory is usually within the range of 16 to 32 GB.

It stores a considerable amount of data and information. The capacity of secondary memory ranges from 200 GB to some terabytes.

Primary memory is also known as Main memory or Internal memory.Secondary memory is also known as External memory or Auxiliary memory.

It can be accessed by a data bus.

It can be accessed using I/O channels.

Examples: RAM, ROM, Cache memory, PROM, EPROM, Registers, etc.Examples: Hard Disk, Floppy Disk, Magnetic Tapes, etc.

Please Login to comment...

Similar Reads

Difference between Primary and Secondary Data

1. Primary Data : When a data is collected from beginning to end for the first time by an institution or researcher, such data is called primary data, it is the original data, i.e. the data which is first It is completely renewed, it is called primary data. It is collected from scratch a lot of money is spent on collecting primary data. At the same

2 min read

Difference Between Primary and Secondary Somatosensory Cortex

Difference Between Primary and Secondary Somatosensory Cortex: The primary somatosensory cortex and the secondary somatosensory cortex have distinct roles. The primary somatosensory cortex primarily handles the reception and processing of sensory information from the somatic senses proprioceptive senses and certain visceral senses. In contrast, the

5 min read

Difference Between Primary Cell and Secondary Cell

Difference between a Primary Cell and a Secondary Cell is that Primary Cells are the ones that cannot be charged but Secondary Cells are the ones that are rechargeable. Before learning about the detailed difference between Primary Cells and Secondary Cells, we will first learn about what a cell is, what are batteries, and the definitions of Primary

8 min read

Difference Between Primary And Secondary Succession

Primary Succession and Secondary Succession are two types of Ecological Succession. Ecological Succession refers to the change in the structure and composition of a community with changes in the physical environment. The major difference between these two is that Primary Succession occurs in an area that was not colonized earlier whereas Secondary

4 min read

Hard Disk Drive (HDD) Secondary memory

Primary memory has limited storage capacity and it is volatile. Secondary memory overcomes this limitation by providing permanent storage of data in bulk quantity. Secondary memory is also termed external memory and refers to the various storage media on which a computer can store data and programs. The Secondary storage media can be fixed or remov

12 min read

Difference between Volatile Memory and Non-Volatile Memory

Volatile Memory: It is the memory hardware that fetches/stores data at a high-speed. It is also referred as temporary memory. The data within the volatile memory is stored till the system is capable of, but once the system is turned off the data within the volatile memory is deleted automatically. RAM (Random Access Memory) and Cache Memory are som

3 min read

Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)

Random Access Memory (RAM) is used to read and write. It is the part of primary memory and used in order to store running applications (programs) and program's data for performing operation. It is mainly of two types: Dynamic RAM (or DRAM) and Static RAM (or SRAM). RAM is made up of small memory cells that are arranged in a grid pattern. Each cell

4 min read

Difference between Virtual memory and Cache memory

Cache Memory: Cache memory increases the accessing speed of CPU. It is not a technique but a memory unit i.e a storage device. In cache memory, recently used data is copied. Whenever the program is ready to be executed, it is fetched from main memory and then copied to the cache memory. But, if its copy is already present in the cache memory then t

2 min read

Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)

Multiprocessors can be categorized into three shared-memory model which are: Uniform Memory Access (UMA)Non-uniform Memory Access (NUMA)Cache-only Memory Access (COMA) Uniform Memory Access (UMA): In UMA, where Single memory controller is used. Uniform Memory Access is slower than non-uniform Memory Access. In Uniform Memory Access, bandwidth is re

4 min read

Difference Between Eidetic Memory and Photographic Memory

Difference Between Eidetic Memory and Photographic Memory: Eidetic memory and photographic memory are two distinct forms of human memory. Memory is the capacity to gather, retain, and recall information. This cognitive function hinges on three primary processes: encoding, storage, and retrieval. Human memory encompasses the capacity to maintain and

10 min read

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy

Difference between Primary and Secondary Memory - GeeksforGeeks (3)

'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id, check: true }), success:function(result) { jQuery.ajax({ url: writeApiUrl + 'suggestions/auth/' + `${post_id}/`, type: "GET", dataType: 'json', xhrFields: { withCredentials: true }, success: function (result) { $('.spinner-loading-overlay:eq(0)').remove(); var commentArray = result; if(commentArray === null || commentArray.length === 0) { // when no reason is availaible then user will redirected directly make the improvment. // call to api create-improvement-post $('body').append('

'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id, }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); return; } var improvement_reason_html = ""; for(var comment of commentArray) { // loop creating improvement reason list markup var comment_id = comment['id']; var comment_text = comment['suggestion']; improvement_reason_html += `

${comment_text}

`; } $('.improvement-reasons_wrapper').html(improvement_reason_html); $('.improvement-bottom-btn').html("Create Improvement"); $('.improve-modal--improvement').hide(); $('.improvement-reason-modal').show(); }, error: function(e){ $('.spinner-loading-overlay:eq(0)').remove(); // stop loader when ajax failed; }, }); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ $('.improvement-reason-modal').hide(); } $('.improve-modal--improvement').show(); }); jQuery('.suggest-bottom-btn').on('click', function(){ var suggest_val = $.trim($("#suggestion-section-textarea").val()); var error_msg = false; if(suggest_val != ""){ if(suggest_val.length <= 2000){ jQuery('body').append('

'); jQuery('.spinner-loading-overlay').show(); jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify({ "gfg_post_id" : `${post_id}`, "suggestion" : `

${suggest_val}

` }), success:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-section-textarea').val(""); jQuery('.suggest-bottom-btn').html("Sent "); setTimeout(() => { jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); }, 1000); }, error:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('#suggestion-modal-alert').html("Character limit exceeded."); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } } else{ jQuery('#suggestion-modal-alert').html("Enter valid input."); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('#suggestion-section-textarea').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } }) $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('

'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.improvement-reason-modal').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); });

Difference between Primary and Secondary Memory - GeeksforGeeks (2024)

FAQs

What is the difference between primary and secondary memory? ›

Primary memory is the computer's main memory and stores data temporarily. Secondary memory is external memory and saves data permanently. Data stored in primary memory can be directly accessed by the CPU, which cannot be accessed in secondary memory.

What is the difference between primary and secondary memory in the brain? ›

The capacity of primary memory is believed to be the items that can be held in conscious thought, whereas, retrieval from secondary memory represents accessing items from long-term memory.

What is secondary memory in simple words? ›

Secondary memory is a physical device for the permanent storage of programs and data(Hard disk, Compact disc, Flash drive, etc.). Secondary memory is a type of computer memory that is used to store data and programs that can be accessed or retrieved even after the computer is turned off.

What is main memory primary or secondary? ›

Primary sources can be described as those sources that are closest to the origin of the information. They contain raw information and thus, must be interpreted by researchers. Secondary sources are closely related to primary sources and often interpret them.

What are the two kinds of main memory primary or secondary? ›

Answer: The two kinds of Main Memory are Primary Memory and Secondary Memory. RAM and ROM are the primary memory. RAM is a primary-volatile memory whereas ROM is a primary-non-volatile memory. On the other hand, Hard drive, CD, etc.

What are the two main types of primary memory? ›

There are two types of primary memory: read only memory (ROM) This is non-volatile memory or storage containing data that cannot be changed. random access memory (RAM)

What is the difference between primary memory and secondary memory Wikipedia? ›

Secondary storage (also known as external memory or auxiliary storage) differs from primary storage in that it is not directly accessible by the CPU. The computer usually uses its input/output channels to access secondary storage and transfer the desired data to primary storage.

What is the difference between main memory and secondary memory quizlet? ›

Main memory, or RAM, is volatile, which means its contents are erased when power is removed from the computer. Secondary memory, such as a disk, does not lose its contents when power is removed from the computer.

What best describes secondary memory? ›

Secondary storage, also known as auxiliary storage, refers to the storage methods and technologies used for the long-term storage of non-critical data that doesn't need to be accessed as frequently as primary storage.

What are the advantages and disadvantages of secondary memory? ›

Examples of secondary storage include hard disk drives, solid-state drives, and optical drives. These devices are slower than primary storage but can store significantly larger amounts of data. The downside of secondary storage is that it is prone to data loss due to hardware failure or damage.

What is secondary memory in psychology? ›

secondary memory (SM)

Share button. memory that retains a large number of items relatively permanently, in contrast to primary memory. The term was used in dual-store models of memory before being replaced by long-term memory. [

Is the RAM a primary memory? ›

Random access memory is considered part of a computer's primary memory. It is much faster to read from and write to than secondary storage, such as hard disk drives (HDDs), solid-state drives (SSDs) or optical drives. However, RAM is volatile; it retains data only as long as the computer is on.

Is cache memory primary or secondary? ›

Primary storage is a key component of a computer system that enables it to function. Primary storage includes random access memory (RAM), read only memory (ROM), cache and flash memory.

Is primary memory permanent? ›

Primary memory is temporary. Secondary memory is permanent. Primary memory is directly accessible by Processor/CPU. Secondary memory is not directly accessible by the CPU.

What is stored in RAM and ROM? ›

RAM is volatile memory that temporarily stores the files you are working on. ROM is non-volatile memory that permanently stores instructions for your computer..

What is the difference between the two types of primary memory? ›

The two main types of primary storage are ROM, which is non-volatile , and RAM, which is volatile . Non-volatile memory keeps its contents even when the computer is switched off. There are two types of memory in primary memory, RAM and ROM. For the IB, you should focus on RAM, and not ROM.

What are the two types of memory in a computer? ›

Types of Memory

RAM is faster than ROM, as the data stored in it can be accessed and modified in any order, while data stored in ROM can only be read. Computer memory is of two basic types: Primary memory (RAM and ROM) Secondary memory (Hard Drive, CD, etc).

Which type of memory is primary? ›

ROM (Read Only Memory) and RAM make up the primary memory. Although one is volatile and the other contains non volatile firmware, the similarity is in that they are both directly accessed by the CPU. ROM is NOT secondary/Auxilary/external storage.

Top Articles
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 6672

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.