Save
A Level OCR CS
SLR1 - 5
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Jamie O'Neill
Visit profile
Cards (124)
Central Processing Unit
(CPU)
Executes
instructions
in computer programs
Contains billions of
transistors
acting as
electronic
switches
Components of the CPU
Arithmetic Logic Unit
(ALU)
Control Unit
(CU)
Registers
Special Purpose Registers
Program Counter
(PC)
Memory Data Register
(MDR)
Memory Address Register
(MAR)
Current Instruction Register
(CIR)
Accumulator
(ACC)
Buses
Data Bus: Carries data between the
processor
and
memory
Address Bus: Carries
memory
address being read from or
written
to
Control Bus: Sends
control
signals from the
control
unit
Fetch-Decode-Execute Cycle
1. Fetch:
Retrieve
instruction from
memory
into the CPU
2. Decode:
Interpret
the instruction to determine what
operation
to perform
3. Execute: Carry out the
operation
specified by the
instruction
Factors Affecting CPU Performance
Clock
Speed
Number of
Cores
Cache
Memory
Pipelining
Contemporary Processor Features
Simultaneous
Multithreading
Out of Order Execution
Branch
Prediction
Variable
Clock
Speed
Power
Conservation
Types of Processors
CISC
(Complex Instruction Set Computing)
RISC
(Reduced Instruction Set Computing)
Graphics Processing Unit (
GPU
)
Designed for
graphics
processing but increasingly used in other fields
Specialised for
parallel
processing, often with
SIMD
architecture
Multicore
and
Parallel Systems
Multiple cores
in a single CPU or multiple CPUs can work on computations simultaneously for
parallel processing
Extent of
speedup
depends on how much of the problem is
parallelizable
Von Neumann Architecture
Features a single
control unit
,
arithmetic logic unit
, and memory store for both instructions and data
Drawback: Reading an instruction prevents simultaneous
reading
and writing of data due to shared
memory
and data bus
Harvard Architecture
Differs from
Von Neumann
by having separate memory units and
buses
for data and instructions
Advantage: Eliminates the
restriction
of a single memory store, allowing for
simultaneous
data and instruction operations
Contemporary Processors are more
complex
than the traditional Von
Neumann
model
Input, Output, and Storage Devices
Input
devices
Output
devices
Storage
devices
Types of Storage Devices
Magnetic
storage
Optical
storage
Flash
storage
RAM and ROM
RAM is
volatile
and used for programs and
data
in use
ROM is
non-volatile
and used for
start-up
instructions
Virtual Storage
Virtual storage is
external
storage not directly connected to the computer
It can be accessed over a
network
or the
internet
Virtual storage allows for
automatic backup
, sharing among
multiple users
, and accessibility from anywhere in the world
Operating Systems
Windows
MacOS
Linux
iOS
Android
Memory
Management
Operating systems manage
memory
efficiently to avoid waste
Memory is divided into pages (
paging
) or segments (
segmentation
) for better utilisation
Virtual memory allows the use of
secondary
storage as an extension of physical memory, reducing
costs
Interrupts and Interrupt Service Routines (ISRs)
Interrupts signal
the CPU when a device needs attention, with each having a
priority
ISRs are executed by the
operating system
in response to
interrupts
, ensuring tasks are handled appropriately
Scheduling Algorithms
Round robin
First come first served
Shortest job first
Shortest remaining time
Multilevel feedback queues
Types of Operating Systems
Distributed
Embedded
Multitasking
Multi-user
Real-time
BIOS and Device Drivers
BIOS
(basic input/output system) helps boot the computer and is now often stored on
flash memory
Device drivers allow the operating system to
communicate
with various
hardware devices
Virtual Machines
Virtual machines mimic
physical
computers and can run
multiple
operating systems simultaneously
Common uses include running one operating system within another and
interpreting
intermediate code for
portability
Applications Generation
Word processors
Spreadsheet packages
Presentation software
Desktop publishing software
Image editors
Web browsers
Database management systems
Utilities
Anti-malware
software
Disk defragmentation
tools
Backup
software
Closed Source Software
Distributed only as
executable
machine code
Users don't have access to the
source
code
Developed by companies with
resources
and
teams
of programmers
Open Source Software (OSS)
Source code is publicly available
Users can modify,
recompile
, and
redistribute
the software
Often developed by global teams of
volunteers
Advantages of Closed Source Software
Tends to be more
polished
Developed by
companies
with
resources
Advantages of Open Source Software
Usually
free
Users can
adapt
software to their needs
Developed by a
global
community
Disadvantages of Closed Source Software
Vulnerable to exploitation but also
benefits
from community
scrutiny
Machine Code
Instructions and data stored in
binary
, directly
readable
by the CPU
Assembly Code
A
low-level
language using
mnemonics
to represent instructions
Assembler
Converts assembly code into
machine
code
Compiler
Converts
high-level
code into
executable
machine code
Produces an executable file that can be run
immediately
Provides faster execution and
security
but slower
compilation
Interpreter
Converts
high-level
code line by line during
runtime
Executes the program
immediately
but slower than compiled code
Useful for coding and
debugging
due to immediate
feedback
Stages of Compilation
1.
Lexical Analysis
2.
Syntax Analysis
3.
Code Generation
4.
Code Optimization
Libraries
Pre-written
code for common tasks,
reusable
by other programmers
Saves
time
and effort, covers complex tasks, and can be used across different programming
languages
Linkers
Combine the code generated by the compiler with any necessary
libraries
to create a
single
executable file
Loaders
Take the executable file created by the
linker
, load it into
memory
, and prepare it for execution
See all 124 cards