Vous êtes sur la page 1sur 12

Computer System

A computer is a device that can be instructed to carry out sequences


of arithmetic or logical operations automatically via computer programming.

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.

Arithmetic and logic unit

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.

The ALU’s operations fall into two parts:

 the arithmetic part

 the logic part

Von Neumann Architecture

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.

Central Processing Unit

The Central Processing Unit (CPU) is the electronic circuit responsible for executing
the instructions of a computer program.

It is sometimes referred to as the microprocessor or processor.

The CPU contains the ALU, CU and a variety of registers.

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

Holds data that is being transferred to or


MDR Memory Data Register
from memory

Where intermediate arithmetic and logic


AC Accumulator
results are stored

Contains the address of the next


PC Program Counter
instruction to be executed

Current Instruction Contains the current instruction during


CIR
Register processing

The fetch-execute cycle

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.

Fetching the instruction

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.

Executing the instruction

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

Translators - usually included within programming software - convert high-level


code into machine code. Translators are assemblers, interpreters or compilers.

Assembler

'An assembler translates assembly language into machine code. Assembly


language is a low-level language written in mnemonics that closely reflects the
operations of the CPU.

Interpreter

An interpreter translates code into machine code, instruction by instruction - the


CPU executes each instruction before the interpreter moves on to translate the next
instruction. Interpreted code will show an error as soon as it hits a problem, so it is
easier to debug than compiled code.

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.

Interpreted languages include JavaScript, PHP, Python and Ruby. Interpreted


languages are also called scripting languages. These are ideal for using
within dynamic web applications. They are used for client-side and server-side
coding, as they are small programs that are executed within the browser.

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.

Cache is graded as Level 1 (L1), Level 2 (L2) and Level 3 (L3):

 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

There are two main types of CPU: CISC and RISC.

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.

The FSB contains two types of bus:


 Address bus - this sends information about where data needs to go by
sending an address to the memory. The address bus only sends data in one
direction - from the CPU to RAM.

 Data bus - this sends data to the memory or receives data from the memory.
Data can flow both ways along the data bus.

Bridges

Bridges manage how data and instructions are transferred between


the CPU, memory and other devices.

Many PC motherboards use a northbridge and a southbridge to connect devices:

 The northbridge connects the CPU, RAM and GPU through the FSB.

 The southbridge connects to the northbridge. All other hardware, such as


the hard drive, connects to the CPU through the southbridge.

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.

Memory is either volatile or non-volatile. Volatile memory only stores information to


run programs while the computer is on. It is reset and emptied once the computer is
turned off. Volatile memory requires electricity to store data
using transistors and capacitors.

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.

DRAM and SRAM

There are two types of RAM: dynamic RAM and static RAM.

 Dynamic RAM (DRAM) uses a transistor and a capacitor to represent and


store a bit of data. The charge needs to be refreshed every few seconds.

 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.

 SRAM technology can be non-volatile when used for flash


memory in storage and ROM.

 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

An operating system is software that manages computer hardware and software. It


supplies an interface for the user and important utilities for managing the computer.

An operating system is software that

Functions of the operating system

The operating system performs several key functions:

 interface - provides a user interface so it is easy to interact with the computer

 manages the CPU - runs applications and executes and cancels processes

 multi-tasks - allows multiple applications to run at the same time

 manages memory - transfers programs into and out of memory, allocates free
space between programs, and keeps track of memory usage

 manages peripherals - opens, closes and writes to peripheral devices such


as storage attached to the computer

 organises - creates a file system to organise files and directories

 security - provides security through user accounts and passwords

 utilities - provides tools for managing and organising hardware

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.

 Formatting - Storage drives need to be formatted to be compatible with an


OS. The OS usually formats storage media when it is connected to the computer.
It is often the case that a storage drive cannot be compatible with
both Windows and Mac OS X.


Security utilities

These include:

 user accounts - allow the user to allocate specific users and protects personal
files and programs from unauthorised access.

 encryption - can encrypt data when it is stored, or whenever it is transmitted


over a network.

 anti-virus software - detects and blocks viruses.

 firewall - can be used to filter between trusted and untrusted networks and
prevent programs from communicating through the use of ports.