Hank Childs, University of Oregon

Slides:



Advertisements
Similar presentations
Lecture # 7. Topics Storage Techniques of Bits Storage Techniques of Bits Mass Storage Mass Storage Disk System Performance Disk System Performance File.
Advertisements

Memory Basics. 8-1 Memory definitions Memory is a collection of cells capable of storing binary information. Two types of memory: –Random-Access Memory.
CS 261- Winter 2009 Dynamic Array Queue and Deque.
What is memory? Memory is used to store information within a computer, either programs or data. Programs and data cannot be used directly from a disk or.
Overview Memory definitions Random Access Memory (RAM)
1 Data Structures Data Structures Topic #2. 2 Today’s Agenda Data Abstraction –Given what we talked about last time, we need to step through an example.
Data Storage Technology
Storing Data. Memory vs. Storage Storage devices are like file drawers, in that they hold programs and data. Programs and data are stored in units called.
1 The 8051 Microcontroller and Embedded Systems CHAPTER INTERFACING TO EXTERNAL MEMORY.
Bits and Data Storage. Basic Hardware Units of a Computer.
2. Memory. Main memory – speed & types Organization of RAM RAM – Random Access Mem Static RAM [SRAM] - In SRAM, a bit of data is stored using the state.
Memory Hierarchy.
 Memory Memory  Types of Memory Types of Memory  Memory Representation Memory Representation  Random Access Memory Random Access Memory  Read Only.
The 8051 Microcontroller and Embedded Systems
Memory  Main memory consists of a number of storage locations, each of which is identified by a unique address  The ability of the CPU to identify each.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.2 Instructor: Lin Chen August 2013.
Lecture 19 Today’s topics Types of memory Memory hierarchy.
Chidambaranathan C.M SRM University,Haryana. Memory:- As the word implies “memory” means the place where we have to store any thing, this is very essential.
Copyright © 2007 – Curt Hill Primary Memory and Electronic Storage Implementations.
Microprocessor Fundamentals Week 3 Mount Druitt College of TAFE Dept. Electrical Engineering 2007.
Kovács Zita 2014/2015. II. félév DATA STRUCTURES AND ALGORITHMS 26 February 2015, Linked list.
Storage of Data Instructions and data are held in main memory which is divided into millions of addressable storage.
Computer Organization. The Five Hardware Units General purpose computers use the "Von Neumann" architecture Also referred to as "stored program" architecture.
Microprocessor Fundamentals Week 3 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
Memory Devices 1. Memory concepts 2. RAMs 3. ROMs 4. Memory expansion & address decoding applications 5. Magnetic and Optical Storage.
Memory 2. Activity 1 Research / Revise what cache memory is. 5 minutes.
Memory The term memory is referred to computer’s main memory, or RAM (Random Access Memory). RAM is the location where data and programs are stored (temporarily),
 2015, Marcus Biel, Linked List Data Structure Marcus Biel, Software Craftsman
Hank Childs, University of Oregon
STORAGE DEVICES Towards the end of this unit you will be able to identify the type of storage devices and their storage capacity.
Memories.
COSC160: Data Structures Linked Lists
Activity 1 6 minutes Research Activity: What is RAM? What is ROM?
MEMORY.
Unit 5 Lesson 3: Introduction to Arrays
Sorted Linked List Same objective as a linked list, but it should be sorted Sorting can be custom according to the type of nodes Offers speedups over non-sorted.
Types of RAM (Random Access Memory)
CSCI-255 LinkedList.
Lectures linked lists Chapter 6 of textbook
COMP 53 – Week Eleven Hashtables.
Data structures and algorithms
Computer Memory Digital Literacy.
The physical parts of the computer
STORAGE DEVICES Towards the end of this unit you will be able to identify the type of storage devices and their storage capacity.
COMPUTER MEMORY & DATA STORAGE
COMPUTER MEMORY & DATA STORAGE
Unit 3—Part A Computer Memory
Prof. Neary Adapted from slides by Dr. Katherine Gibson
Hank Childs, University of Oregon
EE345: Introduction to Microcontrollers Memory
Subject Name: Embedded system Design Subject Code: 10EC74
STORAGE DEVICES Towards the end of this unit you will be able to identify the type of storage devices and their storage capacity.
Lecture 14 - Dynamic Memory
Unit 3—Part A Computer Memory
Hardware.
Introduction to Computing Chapter 0
Linked Lists.
Memory Basics Chapter 8.
Hashing Alexandra Stefan.
Electronics for Physicists
Machine Architecture and Number Systems
Introduction to C++ Linear Linked Lists
Memory Basics Chapter 7.
Hank Childs, University of Oregon
Hank Childs, University of Oregon
Hank Childs, University of Oregon
CS149D Elements of Computer Science
Jazan University, Jazan KSA
Memory Principles.
Lecture 3 – Data collection List ADT
Presentation transcript:

Hank Childs, University of Oregon      _______.___________..______       __    __    ______ .___________. __    __  .______       _______     _______.     /       |           ||   _  \     |  |  |  |  /      ||           ||  |  |  | |   _  \     |   ____|   /       |    |   (----`---|  |----`|  |_)  |    |  |  |  | |  ,----'`---|  |----`|  |  |  | |  |_)  |    |  |__     |   (----`     \   \       |  |     |      /     |  |  |  | |  |         |  |     |  |  |  | |      /     |   __|     \   \     .----)   |      |  |     |  |\  \----.|  `--'  | |  `----.    |  |     |  `--'  | |  |\  \----.|  |____.----)   |    |_______/       |__|     | _| `._____| \______/   \______|    |__|      \______/  | _| `._____||_______|_______/     Lecture 16: Linked Lists Hank Childs, University of Oregon November 15, 2018

Plan For The Rest Of The Term 3C: assigned Tuesday -- ~100 lines of code beyond the starter code 3D: assigned Tuesday Nov. 20th Will be major project, worth 8% Will be grade options for partial credit No projects after 3D

Sunday OH About 15 people attended on Sunday Good session, open to doing it again About 1/6th of the class is lagging on projects, and was disappointed not to see those people

YouTube Video Ideas? 3C overview gdb More?

3A

Linked Lists: Motivation Will introduce two data structures: linked lists and doubly linked lists Linked lists will be used in 3D – you will implement a “map” using linked lists Doubly linked lists will tie into a future data structure (Deques)

Linked List (from Sventek) A linked list is linear collection of data elements, in which the linear order is not given by their physical placement in memory Instead, each node in the list points at the next element in the list. Such a structure enables insertion or removal of elements without reallocation or reorganization of the entire structure, since the data items do not need to be stored contiguously in memory

Linked List Example/Analogy

Example (from Sventek)

How Do Linked Lists Compare With Arrays?

Comparison With Arrays: Hank’s (Wikipedia’s) Answers Can do insertions -- beginning, middle, end Indexing much slower Extra storage

Let’s Implement Linked Lists

Doubly Linked List Linked List Doubly Linked List All images from Sventek textbook

(Singly) Linked List Vs Doubly Linked List Stack Overflow

Example of Doubly Linked List iPod play list Need reverse to get to previous song

Let’s Implement Doubly Linked Lists

Misc. Topics

Unions Union: special data type store many different memory types in one memory location When dealing with this union, you can treat it as a float, as an int, or as 4 characters. This union has 4 bytes

Unions Why are unions useful?

Unions Example

Unions Example

Operator Precedence Source: http://en.cppreference.com/w/c/language/operator_precedence

CIS 415: Operating Systems, University of Oregon, Fall 2015 DRAM vs NV-RAM DRAM: Dynamic Random Access Memory stores data each bit in separate capacitor within integrated circuit loses charge over time and must be refreshed  volatile memory NV-RAM: Non-Volatile Random Access Memory information unaffected by power cycle examples: Read-Only Memory (ROM), flash, hard drive, floppy drive, … CIS 415: Operating Systems, University of Oregon, Fall 2015

CIS 415: Operating Systems, University of Oregon, Fall 2015 Amazon.com… CIS 415: Operating Systems, University of Oregon, Fall 2015

Relationship to File Systems File Systems could be implemented in DRAM. However, almost exclusively on NV-RAM Most often hard drives Therefore, properties and benefits of file systems are often associated with properties and benefits of NV-RAM. CIS 415: Operating Systems, University of Oregon, Fall 2015

DRAM vs NV-RAM properties Property DRAM NV-RAM Capacity ~10GB ~10TB Cost $5/GB $0.03/GB Latency <100 nanoseconds ~10 milliseconds Distance: a 20” map of Oregon is 1:100,000 scale Time: 1 second to 27 hours is 1:100,000 scale Time: 1 minute to 69 days is 1:100,000 scale Time: 1 hour to 11 years is 1:100,000 scale Time: 1 day to 273 years is 1:100,000 scale 5 orders of magnitude!! What does 100000:1 mean? CIS 415: Operating Systems, University of Oregon, Fall 2015

Implement 2G