Академический Документы
Профессиональный Документы
Культура Документы
Cores
A CPU can contain one or more processing units. Each unit is called a core. A core
contains an ALU, control unit and registers. It is common for computers to have two
(dual), four (quad) or even more cores. CPUs with multiple cores have more power
to run multiple programs at the same time.
However, doubling the number of cores will not simply double a computer's speed.
CPU cores communicate with each other through channels and this uses up some of
the extra speed.
The CPU is made up of three main components, the control unit, the immediate
access store and the arithmetic and logic unit.
Control unit
The control unit controls the flow of data within the system and monitors
communications between the hardware attached to the computer. It controls
the input and output of data, checks that signals have been delivered successfully,
and makes sure that data goes to the correct place at the correct time.
Immediate access store
The immediate access store is where the CPU holds all the data and programs that it
is currently using. You can think of it like the numbers typed into a calculator; they
are being stored inside the calculator while it processes the calculations. The
immediate access store is often referred to as the registers in the CPU.
The arithmetic and logic unit (ALU) is where the CPU performs the arithmetic and
logic operations. Every task that a computer carries out is completed here.
Von Neumann architecture was first published by John von Neumann in 1945. His
computer architecture design consists of a Control Unit, Arithmetic and Logic
Unit (ALU), Memory Unit, Registers and Inputs/Outputs.
Von Neumann architecture is based on the stored-program computer concept, where
instruction data and program data are stored in the same memory. This design is
still used in most computers produced today.
The Central Processing Unit (CPU) is the electronic circuit responsible for executing
the instructions of a computer program.
Registers
Registers are high speed storage areas in the CPU. All data must be stored in a
register before it can be processed.
MAR Memory Address Register Holds the memory location of data that
needs to be accessed
The basic operation of a computer is called the ‘fetch-execute’ cycle. The computer
fetches the instruction from its memory and then executes it. This is done repeatedly
from when the computer is booted up to when it is shut down.
The first step the fetch-execute cycle carries out is fetching the instruction. The CPU
fetches this from the main memory (the hard drive) and stores it in the CPU
temporary memory, the immediate access store (the registers).
Once the instruction has been fetched, the CPU will need to understand the
instruction to action it. This is called decoding.
When the instruction has been decoded, the CPU can carry out the action that is
needed. This is called executing the instruction. The CPU is designed to understand
a set of instructions - the instruction set.
Assemblers, compilers and interpreters
Assembler
Interpreter
An interpreter does not create an independent final set of source code - source code
is created each time it runs. Interpreted code is slower to execute than compiled
code.
Compiler
A compiler translates the whole program into machine code before the program is
run. It can be difficult to test individual lines of compiled code compared to
interpreted languages as all bugs are reported after the program has been compiled.
The machine code is saved and stored separately to the high-level code.
Compilation is slow but machine code can be executed quickly.
Cache
Cache is a small amount of memory which is a part of the CPU - closer to the CPU
than RAM. It is used to temporarily hold instructions and data that the CPU is likely
to reuse.
The CPU control unit automatically checks cache for instructions before requesting
data from RAM. This saves fetching the instructions and data repeatedly from RAM –
a relatively slow process which might otherwise keep the CPU waiting. Transfers to
and from cache take less time than transfers to and from RAM.
The more cache there is, the more data can be stored closer to the CPU.
L1 is usually part of the CPU chip itself and is both the smallest and the
fastest to access. Its size is often restricted to between 8 KB and 64 KB.
L2 and L3 caches are bigger than L1. They are extra caches built between the
CPU and the RAM.
Each CPU core has its own L1 cache, but may share L2 and L3 caches.
Processor type
Most desktop or laptop computers use CISC (complex instruction set computing)
architecture made by Intel or AMD. Smartphones and tablets use RISC (reduced
instruction set computing) ARM architecture.
Motherboard
The motherboard is a circuit board that connects the CPU to the memory and all the
other hardware. The CPU sits on the motherboard (also called the logic board).
Buses are circuits on the motherboard that connect the CPU to other components.
There are many buses on the motherboard. A bus moves instructions and data
around the system. The speed of a bus is measured in megahertz (MHz). The faster
the bus, the faster data is communicated. The speed of the motherboard is defined
by the bus speed.
Buses are limited by their width in bits. They are usually 8, 16 or 32-bits wide. This
tells us how many bits can be sent by the bus at any one time, eg a 32-bit bus can
send 32 bits at once.
The bus that connects the CPU to the memory is called the front-side bus (FSB) or
system bus. CPU cores share Level 2 and Level 3 cache across the FSB. They will
usually connect to Level 2 cache through the back-side bus (BSB). The BSB is
much faster than the FSB.
Data bus - this sends data to the memory or receives data from the memory.
Data can flow both ways along the data bus.
Bridges
The northbridge connects the CPU, RAM and GPU through the FSB.
Memory is the area where the computer stores or remembers data. Memory
provides the CPU with its instructions. There are different types of memory, and each
one plays an important role in the running of a computer system. Memory is
sometimes called primary memory.
There is a key difference between memory and storage. Programs are kept on a
storage device and copied into the computer's memory before they are executed.
Storage is also called secondary storage.
Storage and read only memory (ROM) use non-volatile memory to retain data - even
when the computer has been switched off. In older computers, paper, punched tape
and floppy disks have been used for non-volatile memory.
The following are all types of primary memory listed in order of closeness to the
CPU:
1. registers
2. cache
3. RAM
4. virtual memory
The closer a memory type is to the CPU, the quicker the CPU can access the
instructions and execute them. However, the closer it is to the CPU the smaller and
more expensive it is. Each type of memory is limited by
their speed, size, cost and position in relation to the CPU.
RAM
RAM is the main place for storing instructions and data whilst a program is
being executed. It is also called main memory. Program data is copied into RAM
before the CPU can run the program.
Each unique memory location in RAM holds one word of information. Every memory
location has a unique address so that once data has been stored there it can be
found again later when it's needed. RAM also has a word size measured in bits to
indicate the size of the memory locations.
Word size – The word size of an instruction a CPU can process. A 16bit process can
work up to 16 bits.
There are two types of RAM: dynamic RAM and static RAM.
Static RAM (SRAM) uses a group of transistors combined for each bit of data.
They do not lose the charge while in use, so SRAM is much faster than DRAM.
DRAM is usually used for the main RAM memory. SRAM is used
for cache memory. Static RAM is more complex to build and much more expensive
than DRAM.
ROM
ROM (read only memory) is a flash memory chip that contains a small amount
of non-volatile memory. Non-volatile means that its contents cannot be changed, and
it retains its memory after the computer is turned off.
ROM contains the BIOS which is the firmware for the motherboard. The BIOS
contains the bootstrap – the program which takes the computer through steps that
lead up to the loading of the operating system (OS). It happens between turning on
the power and the computer beeping to say it is starting to load the OS. This process
is known as POST (power on self-test) on a PC.
The boot sequence is the computer's initial start-up process. After the boot, the OS
controls the CPU and supplies the programs to run.
Operating System
manages the CPU - runs applications and executes and cancels processes
manages memory - transfers programs into and out of memory, allocates free
space between programs, and keeps track of memory usage
Utilities
The OS uses applications called utilities which allow the user to manage the
computer. There are many different utility programs and they may vary across
operating systems. They are often accessed via a special menu or control panel in
the OS.
Maintenance utilities
These include:
Backup - This allows the user to restore the system to a previous state which
is saved as a backup. This is only usually used if a system has a malfunction.
Disk cleaner - The storage drive is divided into a number of clusters. The table
of contents serves as an address book, keeping a record of each file and the
clusters used to store that file. When a file is deleted, the address to the location
on the disk is removed.
Disk defragmentation - When files are deleted, unused clusters become
available for reuse. These can end up being distributed across a drive, especially if
the original files were small. If a large file is then written to a drive, its data could
be spread across different clusters leading to file fragmentation. Defragmentation
involves rearranging the information on a disk so that files appear in continuous
sequences of clusters. This will improve file access times. Most modern operating
systems run this process automatically.
Security utilities
These include:
user accounts - allow the user to allocate specific users and protects personal
files and programs from unauthorised access.
firewall - can be used to filter between trusted and untrusted networks and
prevent programs from communicating through the use of ports.