3.4 Computer Systems Flashcards
Computer
An electronic device that takes an input, processes data, and delivers an output.
In order to do this a computer follows a set of instructions known as a computer program.
Fetch execute cycle
• Fetch stage - Fetch the next instruction from main memory (RAM), bring it back to the CPU.
• Decode stage - Inspect the instruction and work out what is is that it needs to do.
• Execute stage - Carry out the instruction. This could cover many things such as: going back to main memory and grabbing some data, performing a calculation, storing information back into main memory.
Von Neumann Architecture
Describes a system where the CPU runs programs stored in memory.
Programs consist of instructions and data which are stored in memory addresses.
CPU:
Arithmetic logic unit
• Responsible for carrying out arithmetic calculations and making logical decisions.
CPU:
Control unit
• Sends signals to control how data moves around the CPU.
• Decodes the current instruction.
CPU:
CACHE
• Small amount of very fast memory.
• Provides fast access to frequently used instructions and data.
CPU:
Clock
• Electronic unit that synchronises related components by generating pulses at a constant rate.
CPU:
Registers
• Tiny, super fast pieces of onboard memory inside the CPU.
• Each has a very specific purpose.
CPU:
Busses
Collection of wires through which data and instructions are transmitted from one component to another.
Factors that affect the performance of CPU’s
• Clock speed
• CPU cores
• CACHE
Clock speed
• Measured in Hz
• Number of cycles per second.
• Modern processors operate at billions of cycles per second, Gigahertz (GHz)
• 3.2 GHz clock speed = 3.2 billion instructions can be fetched per second.
Cache size
• Temporary storage of data and instructions being read to and written from.
• Located on board or very near to the CPU.
• Stores copies of recent data and instructions.
• Much quicker getting items from the cache than from main memory (RAM).
• Trying to avoid going and getting instructions and data from memory if we don’t need to as it costs time.
• A larger CPU cache gives the CPU faster access to more data it needs to process.
Levels of CACHE
L1 cache - Part of the CPU. Fastest to access. Smallest size. Each core of a multi-core processor as its own L1 Cache. Stores the most frequently used instructions/data.
L2 cache - Can also be built into the CPU but will be slower. Further away from the processor. Larger so more memory available. After L1 is full, the most frequently used instructions/data are stored in L2.
L3 cache - Larger but slower. Not part of the processor and will be shared by multi-core processors. After L2 CACHE is full, the next most frequently used instructions/data are stored in L3.
Number of cores
• A core is a complete copy of a CPU.
• CPUs with more than one core have more power to run multiple programs at the same time.
• Doubling the number of cores doesn’t simply double the overall speed.
• CPU codes have to communicate with each other, this takes time.
• Many programs are not designed to make use of multiple cores.
Embedded systems
A computer system with a dedicated function within a larger mechanical and electrical system.
• Traffic lights
• Domestic appliances
• Factory equipment
• Engine management systems
• Hospital equipment
Properties of embedded systems
Properties of embedded systems compared to general purpose computers include:
• Low power consumption
• Small size
• Rugged operating systems
• Low cost per unit
• More efficient at doing their task
• Easier to design
This of course comes at the cost of limited processing resources which makes them more difficult to program and interact with.
Different types of memory
• RAM
• ROM
• Registers
• CACHE
Primary storage compared to secondary storage
• All types of primary storage with exception of ROM are volatile.
• ROM is considered read only.
• Primary storage devices have a relatively small capacity compared to secondary storage.
• Very fast access times compared to secondary storage.
• Secondary storage is non-volatile.
• Much larger storage capacity compared to primary storage.
• Very slow access times compared to primary storage.
Volatile
Temporary memory. It requires power to retain its data.
Non-volatile
Permanent memory - it keeps its contents when it has no power.
ROM
• Small piece of read only memory located on the motherboard.
• Non volatile
• Holds the first instructions for when the computer is first turned on known as bootstrap.
• Programs may be stored in ROM in embedded systems.
• Read only.
• Small in comparison to RAM.
RAM
• Holds the operating system, programs and data in use by the CPU when the computer is running.
• Volatile
• Much faster than the hard disk.
• Read and write.
• Large in comparison to ROM.
Why is secondary storage needed
• Because ROM is read only and RAM is volatile.
• Secondary storage is needed for:
- Storage of programs and data when the power is off.
- Semi-permanent storage of data that can change.
- Backup of data files.
- Archive of data files.
Common types of storage
Magnetic
Optical
Solid state
Drive
The device that reads and writes data from secondary storage.
Media
What the data is actually stored on.
Optical storage devices
• CDs, DVDs and Blu-Ray discs.
• Optical drives use lasers to burn pits into the surface of discs
• It reads pits and lands ( where there is no pit) on discs
• When writing, a laser beam can be used to burn pits into discs
• The change from a pit to a land represents a 1
• Whereas no change represents 0
• Come in three forms:
- Read only (e.g. CD-ROM/DVD-ROM/BD-ROM)
- Write once (e.g. CD-R/DVD-R/BD-R)
- Rewritable (e.g. CD-RW/DVD-RW/BD-RW)
+ Low capacity compared to other types of storage.
+ Thin, lightweight and portable.
- Slow to access data.