Notizen
Ohne Titel
Inhalt der Notizen (1)
Seite 1
Computer Systems
System Architecture
Computer Systems:
The essential purpose of a computer system is to take in data, store it, process it and output the result
Computer systems are made up of hardware and software working together
Hardware is the physical components that make up a computer system, for example the CPU, monitor, motherboard, etc.
Software is the programs that run on a computer system and control the hardware.
Types of computer system:
There are many types of computer systems including
General purpose systems - computer systems that can perform many tasks, for example a PC or Mac (desktop or laptop), tablet, or smartphone.
Dedicated systems - computer systems that are designed to perform one specific function, for example a satellite TV receiver box.
Embedded systems - computer systems that are built in to another device to support their operation.
The purpose of embedded computer systems:
Embedded computer systems are built into larger appliances or devices such as washing machines, dishwashers and microwaves.
These devices are not primarily intended to process data but perform another task instead.
The purpose of the embedded computer system is to monitor and control various components in the host device.
For example, a washing machine is primarily intended to wash clothes, the embedded computer is there to help it keep track of washing programs, timings, water temperature and so on.
Benefits of embedded computer systems:
Because embedded systems are designed to perform a small number of specific tasks, they are often cheap to produce and use very little power to run (this makes them energy efficient)
Embedded systems are often very reliable. This is due to the fact that:
○ they are only designed to perform specific tasks
○ their software cannot be easily be updated once manufactured
○ their components are relatively simple compared to those in dedicated or general purpose computers.
The Central Processing Unit
The purpose of the CPU:
The purpose of a Central Processing Unit (or CPU) is to:
○ processes data and instructions coming from input and storage devices and
○ control other components within the computer
The CPU does this by manipulating the flow of electricity through billions of electrically-operated switches called transistors
The CPU is located on a computer's motherboard which connects it to other components such as RAM and a Hard Disk Drive
The Von Neumann CPU architecture
Almost all modern CPUs follow a similar design, formulated by the
mathematician John Von Neumann in 1945
The Von Neumann design for a CPU includes three main elements:
○ A Control Unit (CU)
○ An Algorithmic Logic Unit (ALU)
○ Small amounts of memory called registers
The Control Unit (CU):
The purpose of the Control Unit is to execute instructions and send control signals to other components within the CPU
The Control Unit contains two main components - the decoder and the clock
The clock sends an electrical pulse at a fixed interval to synchronise activity between components within the CPU
The decoder decodes instructions that are retrieved from memory during the fetch-execute cycle
The Arithmetic Logic Unit (ALU):
The Arithmetic Logic Unit (ALU) performs all of the arithmetic (mathematical) and logical operations of the CPU, including:
Addition and subtraction, multiplication and division
Relational operations (comparison) such as whether numbers are equal or if one is greater than another
Boolean logic operations such as AND, OR and NOT The results of operations by the ALU are stored in the Accumulator register.
The registers (1 of 2)
Registers are small area of memory within the CPU. Each register is used to store a specific item of data:
Memory Address Register (MAR) - Holds the address of the location in memory where data or an instruction is to be retrieved or stored.
Memory Data Register (MDR) - Holds the data or instruction that has been retrieved from memory or is about to be stored in memory (at the address held by the MAR).
The registers (2 of 2)
Accumulator (ACC) - Holds the result of calculations and operations performed by the ALU. This results can be fed back into the ALU for use in the next operation.
Program Counter (PC) - Holds the memory location address of the next instruction to be performed by the CPU. This is incremented once each instruction has been retrieved in the fetch-execute cycle.
Processing instructions and data
In order to process instructions and data, the CPU needs to retrieve them from memory.
To do this, it follows a process known as the Fetch-Execute Cycle (or, sometimes, the Fetch-Decode-Execute cycle).
This cycle repeats billions of times each second, giving the illusion that the CPU is doing many things at the same time when, in reality, it is really only processing one instruction at a time.
The Fetch-Execute Cycle
1. An instruction is fetched from main memory (RAM or ROM) at the location held by the Program Counter register
2. The value of the Program Counter is incremented so that it points to the next instruction to be processed
3. The fetched instruction is decoded by the Control Unit in the CPU
4. The CPU executes the instruction by performing an appropriate operation, for example the ALU might perform a calculation or data might be loaded from memory
5. The cycle repeats until a HALT instruction is retrieved.
Understanding program instructions
Program instructions are stored in memory as binary numbers, for example 1001 1100, and are made up of two parts: an opcode and an operand:
Opcodes are the first part of the instruction and they determine what operation the CPU should perform
Operands are the second part of the instruction and they provide the values needed for the operation, for example they might represent a memory location for a "Save data" operation, or they may represent a number to include in an addition operation.
Instruction sets:
The range of operations that a CPU can perform is determined by its Instruction Set. Each operation in the instruction set is represented by its own opcode.
Factors affecting CPU performance:
The main factors that affect CPU performance are:
the clock speed of the CPU
the number of cores the CPU has
the amount of cache memory on the CPU
These can be easily remembered as the "three Cs".
Clock Speed
The CPU's clock (part of the Control Unit) sends out a pulse at fixed intervals to initiate the next action of the CPU
The faster the clock, the more fetch-execute cycles can take place (and therefore more instructions processed) in a second
Clock speed is usually measured in gigahertz (GHz) 1 GHz is 1 billion cycles per second
Number of Cores
Modern CPUs often have multiple cores - dual-core CPUs contain two processor cores; quad-core CPUs contains four processor cores
Each CPU core has its own Control Unit and ALU but they share cache memory and access to memory
Multi-core CPUs can therefore process multiple instructions at the same time, leading to a potential increase in CPU performance however this will only benefit programs that have been written to take advantage of multiple cores.
Number of Cores
A multi-core CPU with a lower clock speed may be quicker at completing tasks than a single-core CPU with a higher clock speed but only if the program being run has been written to take advantage of multiple CPU cores and contains parallelizable tasks
Tasks that benefit from multiple cores typically involve a lot of number crunching, such as modelling weather patterns, analysing big data sets and cryptocurrency mining.
Amount of Cache memory
Cache memory is very fast memory located within the CPU
Cache memory is used to store frequently used data and instructions so that the CPU can retrieve them more quickly than fetching them from (comparatively slower) Random Access Memory (RAM)
Having more cache memory allows CPUs to store more instructions, reducing the amount of time lost whilst it is waiting to retrieve data from RAM
Cache is very expensive, so a typical CPU might only have 4MB (megabytes) or 8MB of cache. This is 1000 times smaller than 4GB or 8GB of RAM.
Memory
Types of memory:
Types of storage in a Computer System
Computer systems typically have both primary and secondary storage.
Primary storage is the computer's main memory and is used to store program instructions and data as they are being processed by the CPU.
Secondary storage is the long-term storage provided by hard disks, solid state disks, and optical media and is used to store data and program instructions
until they are required by the CPU.
Main memory: RAM and ROM
There are two types of primary storage, or main memory: Random Access Memory (RAM) and Read Only Memory (ROM)
Both RAM and ROM can be accessed directly by the CPU and may contain the instructions and data for the CPU to process
Random Access Memory (RAM)
Random Access Memory (RAM) temporarily stores program instructions and data while they are being processed by the CPU.
RAM is volatile, meaning that its contents is lost when it loses power (i.e. the computer is switched off).
RAM is much faster than secondary storage devices such as Hard Disk Drives but much more expensive on a per-GB basis.
Because RAM is both volatile and expensive, general-purpose computer systems have secondary storage for long-term storage of programs and data.
Read Only Memory (ROM)
Read Only Memory (ROM) permanently stores program instructions and data but it cannot have new data written to it.
ROM is non-volatile, meaning that its contents is retained when it loses power (i.e. the computer is switched off).
ROM is often made from flash memory cannot be altered without being "re-flashed". This means that it tends to contain small programs that get the computer up and running, leaving the big stuff to secondary storage.
ROM is typically used to store the boot-up sequence or Basic Input Output System (BIOS) that the CPU executes as soon as it turns on. The BIOS contains instructions that load the operating system from secondary storage into RAM for the computer to continue booting up.
Why are both ROM and RAM required?
When a computer is first switched on, RAM is empty and the CPU does not "know" where to access the Operating System on secondary storage.
ROM is used to store a program called the BIOS (Basic Input Output System) that provides the CPU with essential information including the memory addresses of secondary storage devices so that it can load the Operating System into RAM in order to boot up.
ROM is too small to store an entire Operating System so secondary storage is required for this. Even if ROM could be used to store the whole OS, the fact that it is read only would mean that no changes could be made to the OS, such as installing applications or devices or even customising the desktop wallpaper!
Flash memory
Flash memory is a form of non-volatile memory called EEPROM (electrically erasable programmable read-only memory) that is often used to make ROM chips but also USB memory sticks, Solid State Drives, SD cards and flash storage in mobile devices such as phones and tablets.
Flash memory will retain its contents when it loses power, but can also be erased and rewritten through a process called "flashing", which involves passing electrical current through all of its memory "cells".
Flash memory can only be flashed a certain number of times before it starts to degrade, so re-writable devices such as USB memory sticks, SD cards and SSD drives are actually made up of several different blocks of flash memory, meaning that only one block needs to be reflashed at one time thus prolonging the life of the device.
Virtual Memory
Virtual memory is clever trick used by Operating Systems to use secondary storage as if it were RAM when RAM becomes full.
The Operating System stores a copy of the data from sections of RAM (called "pages") in a file in secondary storage (the "pagefile"). This page of memory can now be freed up for another process to use and its content retrieved from the pagefile when needed again.
Using virtual memory allows users to have more programs open at once than can fit in physical RAM, however secondary storage is much slower than RAM (even if you have an SSD) so using virtual memory can significantly reduce the performance of a computer system.
STORAGE
Types of storage in computer systems:
General purpose computer systems typically make use of two types of storage:
Primary storage - made up of RAM and ROM, this stores programs and instructions for the CPU to process.
Secondary storage - permanently stores programs and data whilst they are not in use by the CPU. This is often provided by a Hard Disk Drive or Solid
State Drive in a computer but can also take the form of removable media such as USB memory sticks and optical (CD/DVD) discs.
The need for secondary storage:
Secondary storage is used for:
Permanently storing data and programs when they are not immediately needed by the computer.
Storing backups of data in case the originals are damaged or destroyed.
Secondary storage technologies:
Types of storage technology used for secondary storage include:
Magnetic storage
Hard Disks, Magnetic Tapes, old-fashioned floppy disks
Flash memory
Solid State Drives, USB memory sticks
Optical storage
CD-ROM/CD-R, DVD-ROM/DVD-R, Bluray
Magnetic Hard Disk Drives (HDD)
The value of each bit of data (either 1 or 0) is represented as a positively or negatively charged magnetic particle on a magnetic disc (platter).
A magnetic read/write head is used to read and write data whilst the platter spins, typically at 5400, 7200 or 10000 revolutions per minute.
Magnetic Hard Disks offer a large capacity for a relatively low cost-per-GB and they provide reasonably fast transfer rates (around 120MB/sec).
Magnetic Hard Disks are generally reliable - they keepworking for a longtime, however they will eventually develop faults due to wear and tear ofthe moving parts. They are also easily damaged if they are dropped orknocked when in operation, meaning that they are not very robust.
Uses of Magnetic Hard Disk Drives (HDD)
■ Hard Disks are often used as the main form of secondary storage in a
computer system to hold the Operating System, applications and user
data.
■ External Hard Disk Drives are often used for home and enterprise backup
as they offer high capacity and low cost-per-GB whilst being portable and
relatively quick for transferring large amounts of data
Magnetic tape
A magnetic cassette tape
Image By Austinmurphy
Magnetic tape comes in cassettes that
contain a very long reel of magnetic
tape.
These reels can be up to 1km in
length!
Special tape drives are must be
installed in a computer or server to
read and write magnetic tapes.
Magnetic tape offers very high capacity, good durability and a very low
cost per GB, making it ideally suited to long-term backup storage.
■ Magnetic tapes can store over 300TB (307,200,000 GB!) of data in a small,
portable cartridge and are designed to last in storage for up to 30 years.
■ As with magnetic Hard Disk Drives, binary data is stored as positively or
negatively charged particles on the surface of a long tape stored within the
cartridge.
■ The downside of Magnetic Tape is they have very slow access times
compared to other forms of secondary storage. This is because Magnetic
Tape uses serial access, where the right part of the tape has to be found
before the desired data can be read.
Solid State Drives (SSDs)
■ Solid State Drives are replacing Hard Disk Drives as the main form of
secondary storage in computer systems, particularly in laptops due to their
excellent speed, robustness and portability.
■ Solid State Drives are made of flash memory, contain no moving parts
and offer a much faster transfer rate than magnetic HDDs (around
550MB/s compared to 120MB/s for HDDs).
■ Flash memory has a higher cost-per-GB than Magnetic Hard Disks and can
only be re-written a limited number of times, meaning that SSDs will
start to degrade sooner than a Hard Disk would typically wear out,
reducing their durability.
■ Mobile devices such as smartphones and tablets use flash memory
exclusively for their secondary storage.
USB Flash Drives, Memory Sticks and SD cards
■ USB Flash Drives ("memory sticks") and SD cards are made of similar flash
memory to Solid State Drives, though their transfer rates are a lot slower
(typically around 6MB/sec to 30MB/s, but potentially up to 90MB/s).
■ They offer good capacity (typically around 16GB to 64GB) for a
reasonable cost-per-GB, though not as cheap-per-GB as Hard Disk Drives
or optical media.
■ Their good capacity and cost, combined with being extremely portable
makes them suitable for transferring documents and making
short-term backups of files.
■ Good quality USB Flash Drives are also quite robust, surviving well in a bag
or on a keyring, but they can suffer from damage if they are removed from
devices prematurely, making them less reliable
Optical storage
■ Optical storage technology uses laser light to retrieve data from the
surface of optical media such as CDs and DVDs
■ Each 1 and 0 of the binary data is represented as microscopic holes (pits) on
the surface of the disc.
■ A laser is then shone on the disc surface which either bounces back onto a
sensor (if it hits a flat part of the surface) or it doesn't (if the laser hits a
pit).
■ This "hit-or-miss" signal is used to reconstruct the 0s and 1s that make up
the binary data.
Different types of optical media
There are three main types of optical media - CDs, DVDs and Blu Ray.
CDs hold the least data (around 700MB), then DVD (4.7GB) and Blu Ray holds
the most (around 50GB).
Each type of media (CD, DVD or Blu Ray) comes in different formats:
■ ROM (Read only memory) - Data is "pressed" onto the disc in factories and
cannot be altered
■ R (Recordable) - Data can be "burned" to a disc once only
■ RW (Rewritable) - The contents of the disc can be re-written multiple times
(though the whole disc is wiped each time, so not suitable for dragging and
dropping files as with a memory stick)
Different types of optical media
■ CDs, DVDs and Blu Ray are all
the same physical size but the
pits on the surface of each type
of disc gets smaller as the
capacity increases.
■ Lasers of shorter wavelength are
needed to detect smaller pits.
Blue light has a very short
wavelength, hence the name "Blu
Ray" for the format that uses the
smallest pits and the shortest
wavelength of laser light
Uses of optical media
■ Optical discs are cheap and quick to produce in large numbers. They are
also small and very portable.
■ Recordable optical media is cheap per GB although fewer devices have
optical drives built in these days and DVDs and CDs have a smaller
capacity than USB flash drives.
■ Optical discs offer faster access times than magnetic tape, but have slower
transfer rates than Magnetic Hard Disk Drives and Flash Memory devices.
■ Optical discs are prone to scratching which can cause data loss and
rewritable (RW) discs are particularly unreliable for long-term storage due
to the stability of the chemicals that they are made from.
Storage capacity
■ The smallest unit of data that a computer can represent is a bit (b), it's
value can be either 0 or 1.
■ A group of four bits is a nibble and a group of eight bits is a byte (B).
■ Because these units are very small, larger units are typically used to
describe the size of data, including kilobytes (KB, 1KB = 1024 bytes),
megabytes (MB, 1MB = 1024KB), gigabytes (GB, 1GB = 1024MB) and
terabytes (1TB = 1024GB).
■ Note that each unit is 1024 times larger than the next smallest unit and not
1000 times. This is because 1024 is more easily represented in binary than
1000.
Informationen
- Beschreibung
- Notiz am Ohne Titel, erstellt von Tasneem Ahamed am 31/01/2020.
- Erstellt von
- Tasneem Ahamed · Jan 2020
- Aktualisiert
- 31 Jan 2020
- Aufrufe
- 1
- Bewertung