SlideShare a Scribd company logo
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)

notes2 memory_cpu
notes2 memory_cpunotes2 memory_cpu
notes2 memory_cpu
Vishesh Shrivastava
 
N301 Von Neumann Architecture
N301 Von Neumann ArchitectureN301 Von Neumann Architecture
N301 Von Neumann Architecture
guest3b9707
 
Computer Memory
Computer MemoryComputer Memory
Computer Memory
Umair Iftikhar Natt
 
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
MartMantilla1
 
linux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
linux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalinux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
linux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
YasaswiniChintamalla1
 
Storage Structure in OS
Storage Structure in OSStorage Structure in OS
Storage Structure in OS
UniSoftCorner Pvt Ltd India.
 
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 microprocessors
lpapadop
 
Embedded C - Lecture 3
Embedded C - Lecture 3Embedded C - Lecture 3
Embedded C - Lecture 3
Mohamed Abdallah
 
Storage devices
Storage devicesStorage devices
Storage devices
Madushan Sandaruwan
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
Ashik Iqbal
 
Ram ppt
Ram pptRam ppt
application software - lesson 3.pptx
application software - lesson 3.pptxapplication software - lesson 3.pptx
application software - lesson 3.pptx
NisanSfumato
 
application software - lesson 3.pptx
application software - lesson 3.pptxapplication software - lesson 3.pptx
application software - lesson 3.pptx
NisanSfumato
 
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
SoumenduPatra3
 
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 it
nate17
 
CA UNIT V..pptx
CA UNIT V..pptxCA UNIT V..pptx
CA UNIT V..pptx
ssuser9dbd7e
 
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
 
Storage
StorageStorage
Storage
norhaslinamj
 

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
 
linux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
linux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalinux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
linux_internals_2.3 (1).pdf àaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
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
 

Recently uploaded

Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 

Recently uploaded (20)

Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 

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?