1/99
Looks like no tags are added yet.
input devices
keyboard
webcam
barcode reader
magnetic strip reader
output devices
speakers
printers
projectors
touchscreen
considered both input/output
otuputs information like a monitor
acts as a device for input
factors to consider when purchasing an input device
speed and accuracy of input → different devices will transfer data in faster rates or to record info in greater detail
cost
relevance → is this device suited to the task
optical storage
read/written to using lasers → reflects light from thr disc to represent binary information
e.g. CD’s, DVD’s , Blue- ray
order or increasing capactiy
cd → dvd → blue - ray
magnetic
stores info magnetically→ represents binary info using two magnetic states
polarised and unpolarised
e.g. hard disk drives, magnetic tape and floppy disks
flash
fast and compact
uses silicon semi conducters and forms logic gates NAND/NOR to store electrical change in one of two states
high/low + non volatile
e.g. solid state drive
factors to consider when buying a storage device
capacity
speed
cost
durability
portability
compatability
SSD, HDD, FLASH and CLOUD storage
SSDs
Speed: Extremely fast (especially NVMe drives), dramatically reducing boot times and file transfers.
Durability: High resistance to physical drops and shock.
Best For: Primary operating systems, active project files, and gaming
HDDs
Cost-efficiency: Offer the lowest cost per gigabyte, making them ideal for massive amounts of data.
Speed/Durability: Slower than SSDs and more susceptible to physical damage due to mechanical moving parts.
Best For: Long-term archival, desktop backups, and storing large media libraries. [1, 2, 3, 4, 5, 6, 7]
FLASH
Portability: Highly compact and lightweight.
Reliability: Often lack advanced heat management, making them less suited for heavy, continuous use.
Best For: Transferring files between computers and running lightweight portable apps.
CLOUD
Accessibility: Highly accessible from any device or location with an internet connection.
security: Managed by provider security protocols and automatic backups.
Best For: Remote collaboration, offsite backups, and freeing up local device space
RAM
random access memory
fast main memory used for data/programs the computer is currently using
is volatile
used as temporary storage while the computer is running
ROM
read only memory
non volatile
used to store fixed sequence of intructions e.g. bootstrap/BIOS
cannot be modified → one programmed the state of the memory cells do not change
Virtual memory
Virtual storage is the name given to storing information remotely so that it can be accessed by any computer with access to the same system
e.g. internet → cloud storage services like Google Drive and Microsoft OneDrive as well as networked storage used in offices and schools.
As internet speeds increase → virtual storage is becoming a more popular method of storage → convenience of files being available “in the cloud” on any device connected to the Internet.
While virtual storage is convenient to access and share, its disadvantages include limitations of a user’s network speed and high costs.
applications software
Applications software is designed to be used by the end-user to perform one specific task.
Application software requires systems software in order to run.
Examples: desktop publishing, word processing, spreadsheets, web browsers.
system software
low-level software that is responsible for running the computer system smoothly
interacting with hardware and generally providing a platform for applications software to run.
The user does not directly interact with systems software but it ensures high performance for the user.
Examples: library programs, utility programs, operating system, device drivers.
Utility
key piece of system software integral to ensuring the consistent, high performance of the operating system.
Each utility program has a specific function linked to the maintenance of the operating system.
compression
OS provide utilities that enable files to compressed and decompressed.
This is used when compressing large files to be transmitted across the Internet and is commonly used to compress scanned files.
Disk defragmentation
As the hard disk becomes full, read/write times slow down → This is because files become fragmented as they are stored in different parts of memory.
The disk defragmenter utility rearranges the contents of the hard drive so they can be accessed faster, thus improving performance.
Antivirus Antivirus
is responsible for detecting potential threats to the computer, alerting the user and removing these threats.
Automatic updating
This utility ensures the operating system is kept up to date, with any updates being automatically installed when the computer is restarted.
Updates tackle bugs or security flaws so this ensures the system is less vulnerable to malware and hacking threats
Source code
is written by a programmer and refers to object code before it has been compiled.
When software is described to be ‘open source’ or ‘closed source
this refers to whether or not the source code is accessible to the public.
open source code
Open source code can be used by anyone without a license and is distributed with the source code.
ADV VS DISADV of Open Source code
ADV
Can be modified and improved by anyone
Technical support from online community
Can be modified and sold on
DISADV
Support available online may be insufficient or incorrect. No user manuals.
Lower security as may not be developed in a controlled environment
Closed source
Closed source code requires the user to hold an appropriate license to use it.
Users cannot access the source code as the company owns the copyright license.
ADV VS DISADV of Closed Source
ADV
Thorough, regular and well-tested updates
Company owning software provides expert support and user manuals.
High levels of security as developed professionally.
DISADV
License restricts how many people can use the software at once
Users cannot modify and improve software themselves
what must user consider when choosing either open/closed source
Costs - implementation, maintenance, training of staff, -
license - Functionality - features available, ease of use
Translators
a program that converts high-level source code into low-level object code
There are three types of translator that convert different types of code and work in different ways.
What are the 3 types of translators
compilers
interpreter
assembler
Compiler
Compilers translate high-level code into machine code all at once, after carrying out a number of checks and reporting back any errors
interpreters
Interpreters translate and execute code line-by-line.
They stop and produce an error if a line contains an error → may initially appear faster than compilers as code is instantly executed, → but are slower than running compiled code as code must be translated each time it is executed with an interpreter.
This feature makes interpreters useful for testing sections of code and pinpointing errors, as time is not wasted compiling the entire program before it has been fully debugged.
Interpreted code requires an interpreter in order to run on different devices.
→ However, code can be executed on a range of platforms as long as the right interpreter is available, thus making interpreted code more portable
Assembler
Assembly code = a low-level language as it is the ‘next level up’ from machine code.
Assembly code is platform specific, as the instructions used are dependent on the instruction set of the processor.
Assemblers translate assembly code into machine code.
Each line of assembly code is equivalent to almost one line of machine code so code is translated on almost a one-to-one basis.
stages of compilation
lexical analysis
syntax analysis
code generation
code optimisation
lexical analysis
In the first stage of compilation, whitespace and comments are removed from the code. The code below
syntax analysis
In this stage, tokens are analysed against the grammar and rules of the programming language.
Any tokens that break the rules of the programming language are flagged up as syntax errors and added to a list of errors.
An abstract syntax tree is produced, which is a representation of the source code in the form of a tree.
Semantic analysis is also carried out at the syntax analysis stage, where logic mistakes within the program are detected.
Examples of semantic errors: multiple declaration, undeclared identifiers
code generation
The abstract syntax tree produced in the syntax analysis stage is used to produce machine code.
code optimisation
searches through the code for areas it could be made more efficient.
make the code faster to execute although this stage can significantly add to the overall time taken for compilation.
redundant parts of code are detected and removed
however
that excessive optimisation may alter the way in which the program behaves.
Linkers
This is a piece of software that is responsible for linking external modules and libraries included within the code.
Two types of linkers
static
dynamic
static
Modules and libraries are added directly into the main file → This increases the size of the file.
Any updates to modules and libraries externally will not affect the program → This means a specific version of a library can be used.
dynamic
Addresses of modules/libraries are included in the file where they are referenced.
When the program is run → loader retrieves the program at the specified address so it can be executed.
The advantage here is that files remain small and external updates feed through to the main file → there is no need to rewrite the code.
Loaders
Loaders are programs provided by the operating system.
When a file is executed, the loader retrieves the library or subroutine from the given memory location.
Use of libraries
are pre-compiled programs which can be incorporated within other programs using either static or dynamic linking.
They are ready-to-use and error free, so save time developing and testing modules.
Another advantage of libraries is that they can be reused within multiple programs
. Libraries are often used to provide a specialised range of functions which would otherwise require time/effort to develop → so save programmers from having to instead make use of others’ expertise
Popular libraries provide mathematical and graphical functions.
CISC
complex instruction set computer
large instruction set
instructions are bult in the hardware
→ aim is to accomplish tasks in few lines of assembly code
RICS
reduced instruction set computer
small instruction set
each instruction is one line of machine code
used in microcontrols and embedded systems
CISC VS RISC
risc = compiler has more work to translate high level code → machine code
cisc = compiler has less work to tranlastate high level language → machine code
risc = more RAM required
cisc= less RAM required → since code is shorter
RISC pipelining is possible → each indtruction takes 1 clock cycle
cisc = piprlining is not possible
cisc contains many specialised instructions that are made → though a few of them are used
GPU
lots of independent processors which work in parallel
making it very efficient at completing repetitive tasks such as image processing and machine learning
GPUs are a type of co-processor → a secondary processor designed to supplement the activities of the primary processor
graphical/non-graphical uses of GPU
graphical
rendering 2d/3d images
Video editing, decoding,
non graphical
Machine Learning & AI:
Data Mining & Analytics: Sorting and filtering large sets of data for patterns.
Scientific & Financial Modelling: Simulating weather, climate change, or financial risk scenarios (where the same calculations are repeated across massive datasets).
multicore and parallel systems
Multi-core CPUs have multiple independent cores that can complete instructions separately → results in higher performance.
Parallel systems accomplish a similar task however instead of requiring multiple cores they can complete tasks with a single core, by using threading
Generally, multi-core systems perform better in larger projects than parallel systems.
what is an operating system
refers to a collection of programs that work together to provide an interface between the user and computer.
Os enable the user to communicate with the computer and perform certain low-level tasks → involving the management of computer memory and resources.
What features do an operating system provide
Memory management (paging, segmentation, virtual memory)
Resource management (scheduling)
File management (moving, editing, deleting files and folders)
Input/ Output management (device drivers)
Interrupt management
Utility software (disk defragmenter, backup, formatting etc.) Security (firewall)
User interface
Memory managment
Computer memory must be shared fairly between multiple programs and applications being used.
main memory is not large enough to store all of the programs being used.
→ One of the roles of the operating system is to ensure the main memory is shared efficiently between programs through the use of paging, segmentation and virtual memory.
paging
Paging is when memory is split up into equal-sized sections known as pages
with programs being made up of a certain number of equally-sized pages
These can then be swapped between main memory and the hard disk as needed.
segmentation
Segmentation is the splitting up of memory into logical sized divisions, known as segments
→ which vary in size
These are representative of the structure and logical flow of the program
with segments being allocated to blocks of code such as conditional statements or loops.
Virtual memory
Virtual memory uses a section of the hard drive to act as RAM when the space in main memory is insufficient to store programs being used
Sections of programs that are not currently in use are temporarily moved into virtual memory through paging
→ freeing up memory for other programs in RAM.
disk thrashing
→ key issue with paging, segmentation, virtual memory
This is when the computer ‘freezes’
occurs as a result of pages being swapped too frequently between the hard disk and main memory
As a result, more time is spent transferring these pages between main memory and the hard disk then is spent actually running the program.
→ This issue becomes progressively worse as virtual memory is filled up
Interrupts
Interrupts are signals generated by software/hardware to indicate to the processor that a process needs attention
Different types of interrupts have different priorities
interrupts are stored in order of their priority → within an a priority queue in a special register known as an interrupt register.
It is the job of the operating system to ensure interrupts are serviced fairly by the processor through the ISR
e.g. a printer signalling the completion of a print job or a peripheral signalling power failure.
Internet service routine
The processor checks the contents of the interrupt register at the end of each FDE cycle
If an interrupt exists that is of a higher priority to the process being executed → current contents of the special purpose registers in the CPU are temporarily transferred into a stack
The processor then responds to the interrupt by loading the appropriate ISR into RAM
A flag is set to signal the ISR has begun.
no more interrupts
→If there are no more interrupts or interrupts are of a lower priority to the current process, the contents of the stack are transferred back into the registers in memory. The Fetch-Decode-Execute cycle resumes as before
scheduling
Another core function of the operating system is to ensure all sections of programs being run/‘jobs receive a fair amount of processing time
→ This is done by implementing various scheduling algorithms
pre emptive
Jobs are actively made to start and stop by the operating system. For example:
Multilevel Feedback Queues,
Shortest Remaining Time,
Round Robin
Non pre-emptive
Once a job is started, it is left alone until it is completed.
For example:
First Come First Served,
Shortest Job First
Round robin
Each job is given a section of processor time - known as a time slice - within which it is allowed to execute
Once each job in the queue has used its first time slice, the operating system again grants each job an equal slice of processor time.
→ This continues until a job has been completed, at which point it is removed from the queue
DISADV of Round Robin
Although Round Robin ensures each job is seen to
longer jobs will take a much longer time for completion due to their execution being inefficiently split up into multiple cycles.
This algorithm also does not take into account job priority.
first come first served
Jobs are processed in chronological order by which they entered the queue
→ However
FCFS again does not allocate processor time based on priority
Multilevel feedback queues
This makes use of multiple queues, each which is ordered based on a different priority.
difficult to implement due to deciding which job to prioritise based on a combination of priorities.
how does MLFQ work

Shortest job first
The queue storing jobs to be processed is ordered according to the time required for completion
shortest jobs first longest jobs = serviced at the end
most suited to batch systems = where shorter jobs are given preference to minimise waiting time
DISADV of shortest job first
requires the processor to know or calculate how long each job will take and this is not always possible
risk of processor starvation if short jobs continue being added to the job queue.
shortest remaining time
jobs to be processed is ordered according to the time left for completion
with the jobs with the least time to completion being serviced first
however
risk of processor starvation for longer jobs if short jobs are added to the job queue.
types of operating system
distributed
embedded
multi tasking
multi user '
real time
distributed
run across multiple devices,
allowing the load to be spread across multiple computer processors when a task is run.
embedded
Built to perform a small range of specific tasks,
os is catered towards a specific device.
→ limited in their functionality and hard to update although they consume significantly less power than other types of OS.
multi tasking
enable the user to carry out tasks seemingly simultaneously
done by using time slicing to switch quickly between programs and applications in memory
multi - user
Multiple users make use of one computer, typically a supercomputer, within a multi-user system
→ Therefore a scheduling algorithm must be used to ensure processor time is shared fairly between job
Without a suitable scheduling algorithm, there is a risk of processor starvation, = when a process is not given adequate processor time to execute and complete.
real time
gives a response/performs a task within in a guaranteed time frame
time-critical computer systems,
BIOS
basic input output system
first program that runs when a computer system is switched on
The PC register points to the location of the BIOS upon each start-up of the computer → BIOS is responsible for running various key tests before the operating system is loaded into memory such as:
POST (Power-on self test) which ensures that all hardware (keyboards, disk drives) are correctly connected and functional
Checking the CPU clock, memory and processor is operational
Testing for external memory devices connected to the computer
why is the BIOS critical to a computer
as it is only after these checks are completed that the operating system can be loaded into RAM from the hard disk.
Device drivers
programs which are provided by the operating system and allow the OS to interact with hardware.
it is the device driver that communicates this request to the operating system which can then produce the relevant output
e.g. pressing a letter on the keyboard → letter appears on the screen
Device drivers are specific to the computer’s architecture, so different drivers must be used for different device types
also specific to the operating system installed on the device.
Virtual machines
theoretical computer in that it is a software implementation of a computer system
It provides an environment with a translator for intermediate code to run.
VM and Intermediate code
Code that is halfway between machine code and object code is = intermediate code.
This is independent of the processor architecture so can be used across different machines and operating systems.
However, running intermediate code in a virtual machine can also be considerably slower compared to running low-level code on the device it was designed for.
Uses of VMs
are commonly used to create a development environment for programmers to test programs on different operating systems
→ saves both the time and money of having to purchase multiple devices solely for testing
Protection from malware Malware will affect the virtual machine rather than the device being used.
Running incompatible software Programs specific to different operating systems or different versions of an operating system can be run within a VM → saving time and money required to purchase the hardware.
→ A common example is of games consoles being implemented on PCs via a virtual machine.
components of a processor
ALU - completes all the arithmetic and logical operations
CU - component of the processor that directs the CPU,
accepts/decodes the next instruction
stores the resulting data back in memory
PC - hold the address of the next instruction to be executed
if the current instruction is a branch or jump instruction, the address to jump to, copied from the current instruction register (CIR) to the PC.
ACC - stores the results from calculations
MAR - holds the address of a location that is to be read from or written to
MDR - temporarily stores the data that has been read or data that needs to be written
acts as a buffer between the CPU and RAM
CIR - holds the current instruction being executed, divides into opcode and operand
Bus
data bus
carries data/instructions between cpu memory, I/O devices
bi directional
address bus
carries the memory address from CPU to Memory
Unidirectional
Control Bus
carries signals to manage operations of the computer systems
memory read/write and interrupt requests
Fetch
Address from the PC is copied to the MAR
Instruction held at that address is copied to MDR by the data bus -
Simultaneously, the contents of the PC are increased by 1
The value held in the MDR is copied to the CIR
Decode
The instruction held in the CIR is decoded. The instruction is split into opcode and operand and the opcode is used to determine the type of instruction and what hardware to use to execute it.
The operand holds either:
the address of the data to be used with the operation, which is then copied to the MAR
OR:
the actual data to be operated on, which will be copied to the MDR
the data to be operated on may be passed to the ALU/accumulator
Execute
The decode instruction is executed
Factors that affect CPU performance
clock speed
cache size
number of cores
clock speed
How many state changes the CPU performs per second
if a computer has a higher clock speed → execute more instructions per second
carry out tasks more quickly
number of cores
a core is a processing unit within the CPU → multiple cores mean tasks are carried out more quickly → each core can carry out its own task (parallel processing)
dual core processor isn’t as fast → time spent organising tasks between cores
some tasks cannot be split therefore not as quick
cache size
part of primary storage and used to store data/instructions
closer to the CPU than RAM so faster to retrieve data
level 1 is best → small/fast for each core
level 3 slower/longer than level 2 → sits on the motherboard
Pipelining
Pipelining is the process of completing the fetch, decode, and execute cycles of three separate instructions simultaneously
While one instruction is being executed, another can be decoded and another fetched.
How does pipelining improve CPU performance
aimed to reduce the amount of the CPU which is kept idle
holding appropriate data in a buffer in close proximity to the CPU until it’s required.
reduces latency
All parts of the processor can be used at any instant in time
In what case can a pipeline be flushed
In the case of a branch, the pipeline is flushed
CPU cannot know for certain which instruction will come next until the branch is evaluated
If the prediction is wrong, the CPU discovers it is executing the wrong instructions.
The pipeline is then flushed (emptied) to clear the incorrect operations, and the correct instructions are fetched.
Impact on performance when pipeline is flushed
Pipeline flushing introduces a delay or "stall
The time it takes to flush the pipeline and load the correct instructions into the fetch stage temporarily lowers processor throughput
Instruction pipelining
separates instructions into fetching → decoding → executing
Arithmetic pipelining
breaking down the arithmetic operations and overlapping them as they are performed
Harvard architecture
physically separate memories for instructions/data
The CPU can fetch an instruction and read/write data at the exact same time
Use Cases:
Microcontrollers, digital signal processing (DSP) chips, audio processors, traffic lights, and other dedicated embedded systems.
Von neuman achitecture
Instructions and data share a single, unified memory space and the same set of buses (communication pathways).
Use Cases:
General-purpose computers, laptops, desktop processors, and mobile phones
ADV/ DISADV for harvard + von neuman
von neuman
cheaper to develop → cu is easier to design
programs can be optimised in size
DISADV:
two clock cycles required
cpu cannot access read/write instructions simultaneously
pipelining is not possible
hardvard
quicker → data can be fetched in parallel
one clock cycle required '
pipelining is possible
separate MA used for instructions and data
Memories can be different sizes, which can make more efficient use of space
DISADV:
more costly
It can also result in wasted memory space if one memory block is full while the other sits empty.
diff between von neuman + harvard
harvard = pipelining is possible
von neuman = not possible
harvard = physically separate memories for instructions/data
von neuman = Instructions and data share a single, unified memory space and the same set of buses
harvard = two clock cycles
von neuamn = 1 clock cycle
contemporary processors
Main Memory: Uses Von Neumann architecture (shared memory space for both data and instructions).
Cache Memory: Uses Harvard architecture (separate physical caches for instructions and data).