What Every Programmer Should Know About Memory

This forum is aimed at students with little or no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems.
Forum rules
This forum aims to provide material related to computer programming languages, tools and designs.

Re: What Every Programmer Should Know About Memory

Unread postby fahad iqbal » Fri May 08, 2015 4:12 pm

Fahad Iqbal
CMS # 14016
Semester 2 Section A


What a programmer should know about memory
Memory:-
Computer memory is a permanently and temporary storage area. It contains the data which is needed by cpu.
Memory is like the kind of switches which is known as transistors. Switches are present in two states, on or off. In which on is used as "1" and off is used as "0".So the one of transistor can represent one of two digits.
Our computer memory is divided into several different types of memory, but the most important are known as "RAM AND ROM". but in which we discus about the RAM and ROM

RAM:-
RAM is known as Random access memory. In which we can access any memory cell directly if we know about the row and column.
RAM is used for reading or writing to file storage. Solid-state disks, in our android devices, people use as a hard drives in their computers are faster than normal computer hard drives, But using to cache the data we need a lot slower that using dedicated, solid-state RAM.
RAM is so much cheap.
RAM is volatile, that is instructions and data holds in memory are lost once the computer is powered down.

Their are two types of RAM, Static RAM and Dynamic RAM.
Comparison of static RAM and dynamic RAM:-
1- dynamic RAM needs to be refreshed thousands of times per second but static RAM does not need to be refreshed.
2- DRAM supports access times 60 nanoseconds and Static RAM supports access times 10 nanoseconds.
3- Static RAM is faster, but its not as commonly used as DRAM because its so much more expensive.
4- Static RAM and DRAM are both volatile, but they lost their contents when the power is turned off.
ROM
ROM is known as read only memory and non volatile memory it is a class of storage medium used in computers and other electronic devices. Data stored in ROM can only be modified slowly.

TYPES OF NON-VOLATILE MEMORY
1: EPROM
2: EEPROM

EPROM
Erasable programmable read-only memory is programmable read-only memory that can be erased and re-used.

EEPROM

Electrically Erasable Programmable Read-Only memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed
Unlike bytes in most other kinds of non-volatile memory, individual bytes in a traditional EEPROM can be independently read, erased,
fahad iqbal
 
Posts: 3
Joined: Wed Apr 29, 2015 7:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: What Every Programmer Should Know About Memory

Unread postby fahad iqbal » Fri May 08, 2015 4:17 pm

Fahad Iqbal
cms # 14016
Semester 2 Section A


What a programmer should know about memory
Memory:-
Computer memory is a permanently and temporary storage area. It contains the data which is needed by cpu.
Memory is like the kind of switches which is known as transistors. Switches are present in two states, on or off. In which on is used as "1" and off is used as "0".So the one of transistor can represent one of two digits.
Our computer memory is divided into several different types of memory, but the most important are known as "RAM AND ROM". but in which we discus about the RAM and ROM

RAM:-
RAM is known as Random access memory. In which we can access any memory cell directly if we know about the row and column.
RAM is used for reading or writing to file storage. Solid-state disks, in our android devices, people use as a hard drives in their computers are faster than normal computer hard drives, But using to cache the data we need a lot slower that using dedicated, solid-state RAM.
RAM is so much cheap.
RAM is volatile, that is instructions and data holds in memory are lost once the computer is powered down.

Their are two types of RAM, Static RAM and Dynamic RAM.
Comparison of static RAM and dynamic RAM:-
1- dynamic RAM needs to be refreshed thousands of times per second but static RAM does not need to be refreshed.
2- DRAM supports access times 60 nanoseconds and Static RAM supports access times 10 nanoseconds.
3- Static RAM is faster, but its not as commonly used as DRAM because its so much more expensive.
4- Static RAM and DRAM are both volatile, but they lost their contents when the power is turned off.
ROM
ROM is known as read only memory and non volatile memory it is a class of storage medium used in computers and other electronic devices. Data stored in ROM can only be modified slowly.

TYPES OF NON-VOLATILE MEMORY
1:EPROM
2: EEPROM

EPROM
Erasable programmable read-only memory is programmable read-only memory that can be erased and re-used.

EEPROM

Electrically Erasable Programmable Read-Only memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed
Unlike bytes in most other kinds of non-volatile memory, individual bytes in a traditional EEPROM can be independently read, erased,
fahad iqbal
 
Posts: 3
Joined: Wed Apr 29, 2015 7:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: What Every Programmer Should Know About Memory

Unread postby hamzakhalid » Fri May 15, 2015 12:33 am

CMS 13947
In a computer, memory is one or more sets of chips that either store data permanently or temporarily. It contains all the information needed by a CPU. Memory works on the switch state (ON and OFF). Only two states exist for memory ON means 1 and OFF means 0.
Types:
Two main types of memory are
1-RAM:
RAM (Random Access Memory) stores the input data. Its data is easily accessible and its volatile. We can read and write data over it thus it is also known as read/write memory.
2-ROM:
ROM (Read Only Memory) permanently stores data. It is cheaper as compared to RAM and its non volatile.
a)PROM:
It Can be programmed once.It Comes un programmed from the factory. Programming consists in removing connections. Has been replaced by EPROMs
b)EPROM:
This kind can be erased with UV light.
c)EEPROM:
This kind of RAM can be erased using an electrical signal.
d)Masked ROM:
This kind is written once, at the factory. It cannot be changed at all later on. Its main benefit is that it is very cheap to make.
User avatar
hamzakhalid
 
Posts: 3
Joined: Tue May 12, 2015 8:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: what every programmer should know about memory

Unread postby shahzeb tanveer » Fri May 15, 2015 3:14 pm

What Every Programmer Should Know About Memory
1. Introduction
In the early days computers were much simpler. The various components of a system, such as the CPU, memory,
mass storage, and network interfaces, were developed together and, as a result, were quite balanced in their performance.
For example, the memory and network interfaces were not (much) faster than the CPU at providing data
This situation changed once the basic structure of computers stabilized and hardware developers concentrated
on optimizing individual subsystems. Suddenly the performance of some components of the computer fell
significantly behind and bottlenecks developed. This was especially true for mass storage and memory subsystems
which, for cost reasons, improved more slowly relative to other components.
The slowness of mass storage has mostly been dealt with using software techniques: operating systems keep most
often used (and most likely to be used) data in main memory, which can be accessed at a rate orders of magnitude
faster than the hard disk. Cache storage was added to the storage devices themselves, which requires no changes in
the operating system to increase performance. For the purposes of this paper, we will not go into more details
of software optimizations for the mass storage access. Unlike storage subsystems, removing the main memory
as a bottleneck has proven much more difficult and almost all solutions require changes to the hardware. Today
these changes mainly come in the following forms:
• RAM hardware design (speed and parallelism).
• Memory controller designs.
• CPU caches.
• Direct memory access (DMA) for devices.
For the most part, this document will deal with CPU caches and some effects of memory controller design.
In the process of exploring these topics, we will explore DMA and bring it into the larger picture. However, we
will start with an overview of the design for today’s comodity hardware. This is a prerequisite to understanding
the problems and the limitations of efficiently using memory subsystems. We will also learn about, in
some detail, the different types of RAM and illustrate why these differences still exist.
This document is in no way all inclusive and final. It is limited to commodity hardware and further limited to a
subset of that hardware. Also, many topics will be discussed in just enough detail for the goals of this paper.
For such topics, readers are recommended to find more detailed documentation.
When it comes to operating-system-specific details and solutions, the text exclusively describes Linux. At no
time will it contain any information about other OSes. The author has no interest in discussing the implications
for other OSes. If the reader thinks s/he has to use a different OS they have to go to their vendors and demand
they write documents similar to this one. One last comment before the start. The text contains a
number of occurrences of the term “usually” and other, similar qualifiers.
User avatar
shahzeb tanveer
 
Posts: 6
Joined: Sat Apr 25, 2015 11:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: what every programmer should know about memory

Unread postby shahzeb tanveer » Fri May 15, 2015 9:45 pm

Shahzeb Tanveer
cms 13618
section A.


What Every Programmer Should Know About Memory

1. Introduction
In the early days computers were much simpler. The various components of a system, such as the CPU, memory, mass storage, and network interfaces, were developed together and, as a result, were quite balanced in their performance. For example, the memory and network interfaces were not (much) faster than the CPU at providing data.
This situation changed once the basic structure of computers stabilized and hardware developers concentrated on optimizing individual subsystems. Suddenly the
performance of some components of the computer fell significantly behind and bottlenecks developed. This was especially true for mass storage and memory subsystems
which, for cost reasons, improved more slowly relative to other components.
The slowness of mass storage has mostly been dealt with using software techniques: operating systems keep most often used (and most likely to be used) data in main memory, which can be accessed at a rate orders of magnitude faster than the hard disk. Cache storage was added to the storage devices themselves, which requires no changes in the operating system to increase performance.
For the purposes of this paper, we will not go into more details of software optimizations for the mass storage access.
Unlike storage subsystems, removing the main memory as a bottleneck has proven much more difficult and
almost all solutions require changes to the hardware. Today these changes mainly come in the following forms:
•RAM hardware design (speed and parallelism).
•Memory controller designs.
•CPU caches.
•Direct memory access (DMA) for devices.
For the most part, this document will deal with CPU caches and some effects of memory controller design.
In the process of exploring these topics, we will explore DMA and bring it into the larger picture. However, we will start with an overview of the design for today’s comodity
hardware. This is a prerequisite to understanding the problems and the limitations of efficiently using memory subsystems. We will also learn about, in
some detail, the different types of RAM and illustrate why these differences still exist.
This document is in no way all inclusive and final. It is limited to commodity hardware and further limited to a
subset of that hardware. Also, many topics will be discussed in just enough detail for the goals of this paper.
For such topics, readers are recommended to find more detailed documentation.
When it comes to operating-system-specific details and solutions, the text exclusively describes Linux. At no time will it contain any information about other OSes.
The author has no interest in discussing the implications for other OSes. If the reader thinks s/he has to use a different OS they have to go to their vendors and demand
they write documents similar to this one.
One last comment before the start. The text contains a number of occurrences of the term “usually” and other, similar qualifiers.
User avatar
shahzeb tanveer
 
Posts: 6
Joined: Sat Apr 25, 2015 11:27 am
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Computer Sciences & Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron