SlideShare a Scribd company logo
1 of 27
Introduction Into
Memory
Presented by developerX
4 types of Memory
Internal Memory
Main Memory
Online Mass Storage
Offline Mass Storage
Internal Memory
- Process Registers - Small Amounts of information to be consumed (do calculations on)
- L0 - L4 Cache - Large Amounts of information to be broken down
- Abstracted out in most languages
Main Memory
R.A.M (Random Access Memory)
The memory is Volatile
Programs store information (variables, files, and etc)
Ram is where the HEAP lives
Online Mass Storage
No this is not Dropbox or Google Drive.
This is referring to the Hard Drive inside your
computer.
The reason why it is online is because it is attached to
your computer using a cable
This is a non-volatile type of memory (means stores it
even after power it removed)
Offline Bulk Storage
This can mean things like Dropbox, Google Drive, and
others.
Databases also fall into the category of Offline Bulk
Storage
What defines offline bulk storage is that the computer
must leave its own physical machine to access the
information.
Memory Management
Higher level languages like Javascript, Python, PHP, Ruby, and others have abstracted Memory management
to be handled for you.
C and C++ are lower level languages that need to be manually told to allocate memory when running their
programs.
Garbage Collection
A form of automatic memory management that tries
to reclaim memory by objects that are no longer
being used.
Takes a significant amount of processing power
Runs every 16ms
Invented by John McCarthy around 1959.
Threads
a thread of execution is the smallest sequence of programmed instructions that can be
managed independently by a scheduler
Multiple threads can exist in a process which can share resources like memory. Often
referred to as Multi-threaded.
Javascript, Ruby, and Python don’t start off as multi-threaded, while other languages like
Swift and Objective-C rely heavily on multi-thread for performance reasons.
Stacks
Memory set aside as scratch space for a thread of
execution.
Function is called, a stack is created to allocate space
for variables and some bookkeeping data. Once the
function is finished executing the stack releases the
memory to be used again by the next function.
LIFO (last in first out)
Heap
Memory set aside for dynamic allocation.
There is no enforced pattern for Allocation or
Deallocation.
Makes it difficult to keep track of
Memory Diagrams
Using your Desk
Create a quick Memory Diagram using the following code
var movies = [
{
id: 10,
name: 'War Games',
releaseYear: 1983,
sequels: []
},
{
id: 11,
name: 'Tron',
releaseYear: 1982,
sequels: [
'Tron: Legacy'
]
}
]
Memory In Javascript
Destructive
Manipulates the original Object/Array
we save space but have to manage state
Non - Destructive
Doesn’t alter the original array in anyway but rather makes a new copy and returns that.
we use up more space but can ignore state
Bonus
Where are we using non-destructive methods in a REACT REDUX project?
***HINT****
Think of what pure functions are.
Thank you, Any Questions?

More Related Content

Similar to Introduction into memory (Computer Science)

N301 Von Neumann Architecture
N301 Von Neumann ArchitectureN301 Von Neumann Architecture
N301 Von Neumann Architectureguest3b9707
 
Topic 10- Random Access Memory (RAM).pptx
Topic 10- Random Access Memory (RAM).pptxTopic 10- Random Access Memory (RAM).pptx
Topic 10- Random Access Memory (RAM).pptxMartMantilla1
 
ict based lesson
ict based lesson ict based lesson
ict based lesson sarab k
 
5.6 Basic computer structure microprocessors
5.6 Basic computer structure   microprocessors5.6 Basic computer structure   microprocessors
5.6 Basic computer structure microprocessorslpapadop
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryAshik Iqbal
 
application software - lesson 3.pptx
application software - lesson 3.pptxapplication software - lesson 3.pptx
application software - lesson 3.pptxNisanSfumato
 
application software - lesson 3.pptx
application software - lesson 3.pptxapplication software - lesson 3.pptx
application software - lesson 3.pptxNisanSfumato
 
Soumenu Patra Presentation_Types of Memory.pdf
Soumenu Patra Presentation_Types of Memory.pdfSoumenu Patra Presentation_Types of Memory.pdf
Soumenu Patra Presentation_Types of Memory.pdfSoumenduPatra3
 
1.1 core programming [understand computer storage and data types]
1.1 core programming [understand computer storage and data types]1.1 core programming [understand computer storage and data types]
1.1 core programming [understand computer storage and data types]tototo147
 
The parts of a computer and how it
The parts of a computer and how itThe parts of a computer and how it
The parts of a computer and how itnate17
 
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]RootedCON
 
A451 memory (2-12)
A451   memory (2-12)A451   memory (2-12)
A451 memory (2-12)wardjo
 

Similar to Introduction into memory (Computer Science) (20)

notes2 memory_cpu
notes2 memory_cpunotes2 memory_cpu
notes2 memory_cpu
 
N301 Von Neumann Architecture
N301 Von Neumann ArchitectureN301 Von Neumann Architecture
N301 Von Neumann Architecture
 
Computer Memory
Computer MemoryComputer Memory
Computer Memory
 
Topic 10- Random Access Memory (RAM).pptx
Topic 10- Random Access Memory (RAM).pptxTopic 10- Random Access Memory (RAM).pptx
Topic 10- Random Access Memory (RAM).pptx
 
Storage Structure in OS
Storage Structure in OSStorage Structure in OS
Storage Structure in OS
 
ict based lesson
ict based lesson ict based lesson
ict based lesson
 
5.6 Basic computer structure microprocessors
5.6 Basic computer structure   microprocessors5.6 Basic computer structure   microprocessors
5.6 Basic computer structure microprocessors
 
Embedded C - Lecture 3
Embedded C - Lecture 3Embedded C - Lecture 3
Embedded C - Lecture 3
 
Storage devices
Storage devicesStorage devices
Storage devices
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
 
Ram ppt
Ram pptRam ppt
Ram ppt
 
application software - lesson 3.pptx
application software - lesson 3.pptxapplication software - lesson 3.pptx
application software - lesson 3.pptx
 
application software - lesson 3.pptx
application software - lesson 3.pptxapplication software - lesson 3.pptx
application software - lesson 3.pptx
 
Soumenu Patra Presentation_Types of Memory.pdf
Soumenu Patra Presentation_Types of Memory.pdfSoumenu Patra Presentation_Types of Memory.pdf
Soumenu Patra Presentation_Types of Memory.pdf
 
1.1 core programming [understand computer storage and data types]
1.1 core programming [understand computer storage and data types]1.1 core programming [understand computer storage and data types]
1.1 core programming [understand computer storage and data types]
 
The parts of a computer and how it
The parts of a computer and how itThe parts of a computer and how it
The parts of a computer and how it
 
CA UNIT V..pptx
CA UNIT V..pptxCA UNIT V..pptx
CA UNIT V..pptx
 
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
 
Storage
StorageStorage
Storage
 
A451 memory (2-12)
A451   memory (2-12)A451   memory (2-12)
A451 memory (2-12)
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Introduction into memory (Computer Science)

  • 2.
  • 3. 4 types of Memory Internal Memory Main Memory Online Mass Storage Offline Mass Storage
  • 4.
  • 5. Internal Memory - Process Registers - Small Amounts of information to be consumed (do calculations on) - L0 - L4 Cache - Large Amounts of information to be broken down - Abstracted out in most languages
  • 6. Main Memory R.A.M (Random Access Memory) The memory is Volatile Programs store information (variables, files, and etc) Ram is where the HEAP lives
  • 7. Online Mass Storage No this is not Dropbox or Google Drive. This is referring to the Hard Drive inside your computer. The reason why it is online is because it is attached to your computer using a cable This is a non-volatile type of memory (means stores it even after power it removed)
  • 8. Offline Bulk Storage This can mean things like Dropbox, Google Drive, and others. Databases also fall into the category of Offline Bulk Storage What defines offline bulk storage is that the computer must leave its own physical machine to access the information.
  • 9. Memory Management Higher level languages like Javascript, Python, PHP, Ruby, and others have abstracted Memory management to be handled for you. C and C++ are lower level languages that need to be manually told to allocate memory when running their programs.
  • 10.
  • 11. Garbage Collection A form of automatic memory management that tries to reclaim memory by objects that are no longer being used. Takes a significant amount of processing power Runs every 16ms Invented by John McCarthy around 1959.
  • 12. Threads a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler Multiple threads can exist in a process which can share resources like memory. Often referred to as Multi-threaded. Javascript, Ruby, and Python don’t start off as multi-threaded, while other languages like Swift and Objective-C rely heavily on multi-thread for performance reasons.
  • 13.
  • 14. Stacks Memory set aside as scratch space for a thread of execution. Function is called, a stack is created to allocate space for variables and some bookkeeping data. Once the function is finished executing the stack releases the memory to be used again by the next function. LIFO (last in first out)
  • 15. Heap Memory set aside for dynamic allocation. There is no enforced pattern for Allocation or Deallocation. Makes it difficult to keep track of
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Using your Desk Create a quick Memory Diagram using the following code var movies = [ { id: 10, name: 'War Games', releaseYear: 1983, sequels: [] }, { id: 11, name: 'Tron', releaseYear: 1982, sequels: [ 'Tron: Legacy' ] } ]
  • 24. Destructive Manipulates the original Object/Array we save space but have to manage state
  • 25. Non - Destructive Doesn’t alter the original array in anyway but rather makes a new copy and returns that. we use up more space but can ignore state
  • 26. Bonus Where are we using non-destructive methods in a REACT REDUX project? ***HINT**** Think of what pure functions are.
  • 27. Thank you, Any Questions?