Memory

advertisement
Study guide. Page numbers for some topics will be forth coming
History
Early History
Know what the contributions of Jacquard, Charles Babbage, Ada Lovelace, and Alan Turing
were
Know Jacquards Loom used punchcards, considered first programable machine
Know Babbages Analytical Machine, which was limited by current technology
Know that Ada Lovelace contributed major programing concepts (namely loops)
Know that Turing machine was a mathamatical abstraction of what a computer was. Helped lay
groundwork for the field of computation theory (namely, whether something is computable or
not)
Generations of Modern Computing
1st Generation- Vacuum Tubes for computing, magnetic drum for memory, magnetic tape for
storage, punch cards and printers for input/output
2nd Generation- Transistors (know advantages over Vacuum Tubes), Magnetic cores for
memory, magnetic disks for storage
3rd Generation- Integrated Circuits, Transistors (Integrated Circuit form) for Memory ( memory
is now volatile), Terminal/Keyboard for I/O
4th generation- Large Scale Integration, advent of Personal Computers
1981- IBMs PC with MS-Dos
1984- Apple with Macintosh
Software
If-else if-else
Be able to follow the flow of the program through the if-else if- else statements.
Be able to create appropriate pseudocode if-else if-else statements that match a problem
statement.
ex. Goldilocks problem, Letter Grade Calculator, Error Checking
Data types
Number
operations: =,-,*,/,%
Text
Join(text1,text2)
text1==text2 -or- compare(text1,text2) ---capitlization matters
Boolean
AND, OR, NOT
List
Know how to access item at certain index in list
know how to find the length of the list
Reference (Component)
Variables
What are they?
Naming rules and guidelines
assignment operator
Computer Basics
Computer
The computer is the entire “sum of the parts” described below and in Hardware -- it is machine
for executing programs
Program
A program is a series of instructions for a
Instruction Types
 Arithmetic: These involve arithmetic, logical (AND/OR/NOT), and some miscellaneous
operations (foreshadowing: done on ALU, with values in the CPU registers and storing
back to the register)
 Memory
o These load/store data from/to memory (respectively)
o Note that all instructions have to be gotten from memory so every instruction
involves memory
 Control Flow:
o these change the next instruction to be executed (by default the program is
executed beginning to end, in order, unless a control flow changes this
o some always go to a particular instruction
o others will have a test (like in an if statement, in app inventor)
Branch Instruction an instruction that may change the next instruction to be executed -- a type of
control flow instruction
CPU: Central Processing Unit -- does the actual execution of programs
Cores: Devices that can perform exactly one calcuation at a time
Clock: pulse that sets the device tempo. Faster clock speed is better for the same
architechture, but not informative accross different architechture types (like different brands)
Overclocking: Making clock faster, generates more heat and uses more power
Memory (RAM): Random Access Memory stores data and programs for the CPU to use (they
have to be in memory for the CPU to use them, with minor exceptions)
Hard Drive: Data in memory is erased when the computer is powered off. Also, there isn’t
enough RAM for most computers to store everything that could be used, even if this wasn’t the
case. This is the permanent location of data and programs. When program/data is being used
by the CPU and is stored in RAM, the program/data is copied into memory (and written back if
there are changes -- otherwise just copied over)
Terms
Hardware
The physical components of a computer. Some complication hardware often has Firmware in it.
Software
The programs are software. Data “tightly” associated with a program could also be called
software -- a program’s background image is part of the software but a random image that a
program does not need to run is not.
Firmware
Complicated hardware often has specialized programs that run inside of them (routers, the
computer’s motherboard BIOS, etc.) It is stored in nonvolatile memory (Flash memory and
others).
Data
Data is information on a computer that isn’t a program -- images, videos are data that programs
can access and display or play or otherwise use.
Algorithm
A series of precise steps to do something. It should eventually terminate (end). More after the
midterm. Most applications (with GUIs) aren’t algorithms but often have several or many inside
of them.
“boot”
short for “bootstrap”. This is starting a computer (“reboot” is restarting one). A program from
nonvolatile memory is started, which then loads the operating system (computers can have
multiple operating systems, and other settings that programs has to handle).
Run/Execute
When a programs is put on the CPU and CPU is following it’s instructions, then it is
running/executing on that CPU
Operating System
Computers and other devices start a suite of programs, called the operating system, that
handles a large number of things -- network connections, loading programs, responding to user
input, etc.
Computer Examples: Microsoft Windows, Mac OSX, Linux
Smart Phone Examples: Android, iOS
Von Neuman Architechture
Stored Program Concept/ von Neumann Architecture
Memory
Arithmetic/Logic unit
Input Units
Output Units
Control Unit
(Storage): Not part of the Von Neumann architecture but devices like hard drives can be thought
of as both input and output devices.
(CPU): Also not really part of the Von Neumann Archetecture but know that the ALU and CU are
parts of the CPU (also, the cache memory also is as well)
CPU Terms
Multicore
Most desktop/laptop processors are multicore processors, meaning they have multiple CPUs (a.k.a.
cores) on the same physical chip.. Will be discussed with programming (software). Comes in various
sizes:
Single-core
1 CPU, i.e. not multicore
Dual-core
2 Cores/CPUs.
Quad-core
4 Cores/CPUs
Others
There are also several others that have been in use: 6, 8, 12, and others.
Frequency/Speed (Hz = cycles/second)
The most common measure of an individual processor's speed is related to the speed at which the clock
cycles(it goes from 0 -> 1 -> 0 repeatedly) . This is related to how many operations can be completed in a
second (it is not the number that are executed every second). It is most meaningful when comparing
similar CPUs made by the same manufacturer of the same series. A major manufacturer will almost
always have multiple series in production at the same time.
Register
CPUs (the ALU in particular) operates on values stored in registers -- there are only a few of them (10s
of them, normally). Operations on items in memory are fast, basically at the full clock rate, but you can’t
store large amounts of data in registers.
Moore’s Law
Memory/Storage
Fundamentally, all memory is is a storage place for binary values.
Memory: For our purposes, we will be talking about RAM when we refer to memory
Storage: The “long term” storage place for data and programs. Generally much larger than Memory.
1. (see: Stored Program Concept) -- Every instruction in a program has to be gotten from
memory
2. Any data has to be gotten from memory at some point
3. Data from hard drives (storage) is stored in memory
Memory Units
bit=either a 0 or a 1
# of values a binary number can have is 2^(# of bits)
byte= 8 bits (256 values)
Prefix
Bytes
bits
kilo-
2 bytes= 1024 bytes
10 bits
Mega-
2 bytes
10 bits
Giga-
2 bytes
10 bits
Tera-
2 bytes
10 bits
10
20
30
40
Hierarchy of Memory: Be able to put these in order of speed
Registers
Cache: L1-L5
RAM
ROM
SSD
Hybrid
HDD
Know the volatility of all the above
Know how the hard drive works, and terms such as latency and seek time
Fetch-Execute Cycle
1.
Fetch
2.
Decode
3.
Get Data
4.
Execute
Pipelining
Branch Prediction
3
6
9
12
Download