Skip to content
- Tutorials
- Python Tutorial
- Taking Input in Python
- Python Operators
- Python Data Types
- Python Loops and Control Flow
- Python Functions
- Python OOPS Concept
- Python Data Structures
- Python Exception Handling
- Python File Handling
- Python Exercises
- Java
- Java Programming Language
- Java Collections
- Java 8 Tutorial
- Java Programs
- Java Interview Questions
- Java Exercises
- Java Quiz
- Java Projects
- Advance Java
- Programming Languages
- System Design
- Interview Corner
- Computer Science Subjects
- DevOps
- Linux
- Software Testing
- Databases
- Android
- Excel
- Mathematics
- Commerce
- Aptitude
- Python Tutorial
- DSA
- Data Structures
- Algorithms
- Analysis of Algorithms
- Searching Algorithms
- Sorting Algorithms
- Greedy Algorithms
- Dynamic Programming
- Graph Algorithms
- Pattern Searching
- Recursion
- Backtracking
- Divide and Conquer
- Mathematical Algorithms
- Geometric Algorithms
- Bitwise Algorithms
- Randomized Algorithms
- Branch and Bound
- Algorithms Tutorial
- DSA Tutorial
- Practice
- All DSA Problems
- Problem of the Day
- Company Wise Coding Practice
- GfG SDE Sheet
- Practice Problems Difficulty Wise
- Language Wise Coding Practice
- Curated DSA Lists
- Competitive Programming
- Company Wise SDE Sheets
- DSA Cheat Sheets
- Top Interview Questions
- Puzzles
- Data Science
- Web Tech
- Courses
-
- Difference between Primary and Secondary Memory
- Difference between Primary and Secondary Data
- Difference between Register and Memory
- Difference Between Primary Cell and Secondary Cell
- Difference between Memory and Storage
- Difference between Cache Memory and Register
- Difference Between Primary and Secondary Somatosensory Cortex
- Difference between Virtual Memory and Job Pool
- Difference Between Sequential and Random Memory Access
- Difference between Memory and Hard Disk
- Difference between Virtual memory and Cache memory
- Difference between RAM and SRAM
- Difference between PROM and EPROM
- Difference between SRAM and DRAM
- Difference between SIMM and DIMM
- Difference between RAM and ROM
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Buffered and Unbuffered Memory
- What is RIMM? Difference between SIMM, DIMM and RIMM
- Difference between Primary Market and Secondary Market
Last Updated : 08 Mar, 2024
Improve
Like Article
Like
Save
Report
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:
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 memory Secondary 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.
Improve
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
Article Tags :
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
'); $('.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(); } }, }); });