The characteristics of contemporary processors, input, output and storage devices Flashcards
What is the Control unit? What are some of its roles?
Component of processor which directs operations of the CPU
-Decoding instructions
-Accepting next instruction
-Manages flow of data between CPU and other devices
-Stores resulting data back in memory
Coordinating activities of CPU
What is meant by the term ‘buses’?
They are a set of parallel wires which connect two or more components inside the CPU
Name the buses in the CPU
-Data bus
-Address bus
-Control bus
What is meant by the ‘bus width’?
The number of parallel wires a bus has
-Buses are typically 8,16,32 or 64 wires wide
The bus width is directly proportional to…
the number of bits that can be transfered simultaneously at any given time
(so bus width of 8 bits means 8 parallel buses as only one bit can be transfered per bus at a time)
Data bus
Its a bidirectional bus used for transporting data and instructions between components
What is meant by a ‘bidirectional bus’?
Bits can be carried in both directions
Address bus
This bus is used to transmit the memory addresses which specify where data is to be sent to or retrieved from
The width of an address bus is..
directly proportional to the number of addressable memory locations
(as more bits can represent more memory address combinations)
Which buses are bidirectional and which ones are unidirectional?
Bidirectional = Data bus, Control bus
Unidirectional = Address bus
Control bus
This is a bidirectional bus
-Used to transmit control signals between internal and external components
-Coordinates the use of the data and address buses
-Provides status info between system components
Give examples of control signals
Transmitted using control bus
-Memory read
-Memory write
-Bus grant
-Bus request
-Clock signal (used to synchronise operations)
-Interrupt request (shows device is requesting access to CPU)
What is meant by a memory read and write control signal?
-Memory read
The CPU uses the address bus to specify the memory location (address) from which data is to be read.
The control bus sends a signal (e.g., READ) to indicate that a memory read operation is taking place.
The data at the specified memory location is placed on the data bus and transferred to the CPU.
-Memory write
The CPU uses the address bus to specify the memory location (address) where the data will be written.
The control bus sends a signal (e.g., WRITE) to indicate that a memory write operation is occurring.
The data to be written is placed on the data bus and transferred to the specified memory location.
What is meant by a bus grant and a bus request control signal?
Bus request = Device is requesting use of a bus
Bus grant = CPU has granted access to a bus to a device
Assembly language
Uses mnemonics to represent instructions
-Simplified way of representing machine code
-Instruction is divided in the CIR into opcode and operand
What is the difference between opcode and operand?
Opcode= The type of instruction to be executed (eg ADD)
Operand= Data or address of the data which the operation is to be carried on
Some bits in the operand are addressing modes
What is pipelining?
Two types: Instruction and arithmetic pipelining
-The process of completing the FDE cycles of 3 separate instructions simultaneouly
-Aimed at reducing the amount of the CPU which is kept idle.
—Holding some data in a buffer close to the CPU until its required
—While one instruction is being executed another can be decoded and another can be fetched
What is the difference between arithmetic and instruction pipelining?
Instruction=Improves the execution of instructions carried out by CPU: Separating instruction into fetching, decoding and executing and overlapping these stages for each instruction
Arithmetic= Used in arithmetic operations: Breaking down the arithmetic operations and overlapping them as they are performed for each instruction
What does pipelining aim to do?
Aimed at reducing the amount of CPU which is kept idle (unused/inactive)
What is meant by the FDE cycle?
Sequence of operations that are completed in order to execute an instruction
What happens in the Fetch stage of the FDE cycle?
- Program Counter holds the memory address of the next instruction to be fetched which is transferred to the Memory Address Register (MAR) via the address bus, which is used to specify the location in memory to fetch the instruction from. The address bus passes this into memory
- The Control Bus sends a signal to memory, instructing it to read the value at the address specified in the MAR.
The instruction stored at that memory address is fetched from main memory (RAM). - Data bus carries the instruction from the memory location to the Memory Buffer Register (MBR)
- After the instruction is fetched, the Program Counter (PC) is incremented to point to the next instruction. This ensures that the next cycle fetches the correct instruction from the next memory address.
What happens in the Decode stage of the FDE cycle?
- The instruction fetched from memory in the Fetch stage is now stored in the current Instruction Register
- The instruction is split up into two parts:
Opcode: The operation to be performed (e.g., ADD, SUB).
Operand: The data or memory address the operation will act upon (e.g., a number or a memory location). - Control Unit decodes the opcode part of the instruction. The opcode tells the Control Unit what operation is needed
Based on the opcode, the Control Unit generates the appropriate control signals to carry out the operation. For example: - Control Unit prepares the Arithmetic Logic Unit (ALU) or other functional units for the operation defined by the opcode.
What happens in the Execute stage of the FDE cycle?
Decoded instruction is executed
This can be: (if its a calculation)
Control Unit sends control signals to the relevant parts of the CPU to carry out the operation defined by the opcode (instruction type).
Control Unit ensures that the correct ALU operation is triggered, or that the correct memory or register operation is performed.
Give me factors affecting CPU performance
-Clock speed
-Number of cores
-Cache (amount and type of cache memory)
-Address bus width
-Data bus width
Explain how the clock speed affects the perfomance of the CPU
Clock speed is determined by system clock
Clock speed is the number of clock cycles per second
-System clock generates signals alternating between 0 and 1 (clock tick)
More clock cycles= more instructions carried out per second
Explain how the number of cores affects the perfomance of the CPU
Each core acts as an independent processor that can execute tasks in parallel
More cores=More Tasks Simultaneously: Each core can execute its own task at the same time.
(e.g 2 cores=2 tasks)
Explain how the cache affects the perfomance of the CPU
Cache is the CPU’S onboard memory
-Instructions frequently fetched from main memory are copied to the cache so if they are need again the can be accessed quicker.
-Before looking in main memory first look inside the cache
-As the cache fills up unused instructions are replaced
What happens as cache fills up?
Unused instructions are replaced
Level 1 cache type
Very fast memory cells with small capacity
Level 2 cache type
Relatively fast memory cells with medium capacity
Level 3 cache type
Slower memory cells with large capacity
Von Neumann architecture
Includes basic components of a computer and processor such as single CU, ALU, registers and memory units
SHARED memory and SHARED data bus is used for both data and instructions
The CPU fetches instructions and data from the same memory in a sequential manner, meaning it reads and executes one instruction at a time.
Von Neumann architecture is built on the stored program concept
Von Neuman architecture is built on the…
stored program concept
Harvard architecture
Physically separate memories for instructions and data, so it allows instructions to be fetched and executed at the same time (good for parallel processing)
Used more commonly in embedded processors
This is useful for when memories have different characteristics
What came first RISC OR CISC?
CISC processors where used as a standard at first but they got replaced with RISC with time
Know CISC are more used in embedded systems and microcontrollers
What does RISC stand for?
Reduced instruction Set Computers
What does CISC stand for?
Complex instruction Set Computers
RISC
REDUCED INSTRUCTION SET COMPUTERS
In these processors there is a SMALL instruction set
-Each instruction is approximately one line of machine code and takes one clock cycle
CISC
COMPLEX INSTRUCTION SET COMPUTERS
In these processors there is a LARGE instruction set, these instructions are built into the hardware
-Aim is to try and complete tasks in as few lines of assembly code as possible
-Used in microcontrollers and embedded systems
Comparison between RISC and CISC
RISC: Compiler does more work to translate HL code into MC because each operation (e.g., load, add, store) is broken down into multiple simple instructions.
CISC: Compiler does less work to translate into MC because a single CISC instruction can perform complex operations, reducing the number of instructions needed.
RISC: More RAM required to store code
CISC: Less RAM required (as code is longer)
RISC: Each instruction typically takes one clock cycle to execute.
CISC: Instructions can execute multi-step operations in a single instruction.
so:
RISC: Pipelining is possible as each instruction takes one clock cycle
CISC: Not possible as some operations might take multiple clock cycles.
What is meant by a multi-core CPU?
A single physical processor that contains two or more independent processing units ( cores).
Each core can complete instructions separately or collaborate on shared tasks==> Results in better performance
What performs better and when multi-core systems or parallel systems? And why?
Multicore perform better in larger projects
Because:
Multi-Core Systems: Each core can perform tasks independently or collaboratively. (good for multithreaded systems)
Parallel Systems (Single-Core): A single-core processor relies on time slicing, where tasks are split into chunks and it appears as though multiple tasks are being executed simultaneously, but in reality, the processor is performing one task at a time.This introduces context switching overhead, making it less efficient for multi-threaded or heavy workloads
Describe the principles of Optical devices
These devices are read from and written to using a laser light
Laser shines on top of disc
Binary info is arranged in a spiral track. The laser starts reading from the inner edge and moves outward in a continuous spiral.
Pits scatter light they represent 0
Lands reflect light they represent 1
R: During reading, the laser shines on the disc, and the sensor detects the variations in light reflection caused by the pits and lands. The pattern of reflected and scattered light is interpreted as binary data.
W: When data is written, the laser alters the surface of the disc by creating pits and lands according to the encoded binary information.
Reading from optical devices
-Laser shines on top of disc
-Binary info is arranged in a spiral track.
-The laser starts reading from the inner edge and moves outward in a continuous spiral.
-A sensor detects the variations in light reflection caused by the pits and lands.
-The pattern of reflected and scattered light is interpreted as binary data.
-Pits scatter light they represent 0
-Lands reflect light they represent 1
Writing to Optical devices
When data is written, the laser shines on top of the disk which alters its surface by creating pits and lands according to the encoded binary information.
Where:
Pits scatter light they represent 0
Lands reflect light they represent 1
“What happens when a program or file is opened and how does RAM manage it?
- When a program or file is opened, the OS loads it from secondary storage (hard drive or SSD) into RAM for quick access. (because RAM is faster than secondary storage)
- The CPU fetches instructions and data from RAM for processing.
- Once the task is completed or the program is closed, RAM is cleared to make space for other operations.
Key characteristics of RAM
-Volatile: (Data is lost when the computer is powered off)
-Faster than secondary storage: Provides much faster read/write speeds compared to secondary storage devices e.g(hard drives, SSDs..etc) allowing the CPU to access data quickly.
-Random Access: Any location in RAM can be accessed directly and quickly, rather than sequentially.(CPU can retrieve data at any address in memory without needing to go through previous locations first).
Key characteristics of ROM
-Non-Volatile: Data stored in ROM is permanent and not lost when the computer is powered off.
-Read-Only: Data cannot typically be modified during normal computer operation. This is because once programmed, the state of the memory cells inside doesnt change
-Pre-Programmed: ROM is programmed during manufacturing or through specialized processes like firmware updates.
What is the difference between an input and an output device?
Input = puts data and info into a computer
Output = used to send info from the computer
Give a device that is both an input and an output device
Touch screen
Input = you can touch
Output= displays info
Give examples of optical devices
CD (compact disc)
DVD (digital versatile disc/digital video disc)
BluRay
CDs
Compact discs
-Store small quantities of info
-Thin, small = portable
-Common for audio files, text and digital images
X Easily damaged by scratches
X Limited storage capacity
X Relatively slow transfer speeds
What is role of the control unit? SHORT ANSWER
Directs the operations of the CPU by sending signal to other components, managing flow of data through the processor.
Give functions of the control unit
-Decodes instructions from memory
-Sends signals to other components, such as the ALU and registers, to execute instructions.
-Manages the flow of data within the CPU
-Send memory read/write signals to memory
What is the role of the Arithmetic Logic Unit?
The ALU performs all arithmetic and logical operations within the CPU.
The ALU often includes a small temporary storage register called the accumulator to hold intermediate results of calculations.
What sort of operations does the ALU do?
Logic and arithmetic
-logic= XOR, OR, NOT, AND
-arithmetic= +,-,x…
-Carries out comparison operations (e.g., checking if values are equal or one is greater).
-Stores these results in the accumulator (a temporary storage register)
A type of temporary storage register within the CPU. It is used specifically for storing intermediate results of arithmetic and logic operations performed by the Arithmetic Logic Unit
What is this?
Accumulator
CPU
What is an accumulator?
A type of temporary storage register within the CPU. It is used specifically for storing intermediate results of arithmetic and logic operations performed by the ALU.
How does the accumulator improve processor efficiency?
Its a type of temporary storage register within the CPU which stores intermediate results of logic and arithmetic operations performed by the ALU.
If a program requires multiple calculations in sequence, the accumulator temporarily holds each result so it can be used in the next operation without constantly needing to read from or write back to main memory to get this past result (as that would be time consuming/take more time to retrieve as is less close to processor)
Define register
Registers are small, fast memory locations inside the CPU that temporarily hold data and instructions during processing.
What does the program counter do?
Its a register in the CPU
Holds the memory address of the next instruction to be executed. It increments after each instruction, directing the CPU to the next step.
What does the memory address register do?
Holds the memory address of data that needs to be accessed (either for reading or writing).
What is the role of the Memory Buffer register?
Temporarily holds the actual data fetched from or to be written to memory.
What is the role of the Current instruction register?
Stores the current instruction being decoded and executed.
Give the names of registers in the CPU
-Program counter
-Memory address register
-Memory buffer register
-Current instruction register
-Accumulator
What is the role of the cache?
Cache is a small, high-speed memory that stores frequently accessed data and instructions close to the CPU.
It speeds up access times because before having to look in memory the CPU first looks in the cache.
The cache is divided into levels (L1, L2, and sometimes L3)
(with L1 being the fastest and closest to the CPU cores.
L3 is the largest and typically shared among multiple cores)
The cache is divided into levels (L1, L2, and sometimes L3)
Explain the properties of these levels
L1 being the fastest and closest to the CPU cores (typically integrated directly within them).
L2 shared by all or just one core
L3 is the largest and typically shared among multiple cores.
What is the role of the clock?
The clock generates a continuous stream of electrical pulses which provides the timing signal that synchronizes all operations within the CPU.
one pulse = one cycle.
A faster clock allows more instructions to be processed in a given time
What is the disadvantage of this?
Generates more heat and requires more power.
What is the role of the data bus?
Carries data between the CPU and memory or input/output devices.
What is the role of the control bus?
Carries control signals from the Control Unit to other parts of the CPU and computer, managing data flow.
What is the role of the address bus?
Carries memory addresses from the CPU to other components, specifying where data should be read or written.
Explain the Fetch stage of the FDE cycle
- Program Counter which holds the address of the next instruction to be executed.
- The address in the PC is copied to the MAR. This register is used to specify the location in memory where data or instructions are fetched. This address makes its way to memory via address bus
- A memory read signal is sent by the CU via the control bus to retrieve the instruction from the memory address specified in the MAR.
- The fetched instruction from memory is loaded into the MDR via the data bus.
- The instruction in the MDR is then copied to the CIR, where it will be held while it is decoded.
- The PC points to the next instruction, preparing to fetch it.
Explain the Decode stage of the FDE cycle
- The instruction is split into opcode and operand by the CU.
- The CU takes the instruction from the CIR and decodes it to understand what needs to be done.
- Based on the opcode (operation), the Control Unit determines which parts of the CPU (like the ALU or registers) will be involved in the execution.
Explain the Execute stage of the FDE cycle
- The operation specified by the opcode is executed (e.g ALU adding two values).
- If the operation produces a result, it may be stored in the Accumulator (a register within the ALU)
Explain how the number of cores can improve processor performance
More tasks carried out at same time- becausei it Allows Parallel Processing: refers to the concept of dividing a task into smaller sub-tasks that can be processed simultaneously across multiple cores. Each core can either perform a subtask insdependently or collaborate with other cores to complete tasks
(In single-core processors, tasks are queued and completed one at a time, creating bottlenecks. With multiple cores, these bottlenecks are reduced as different tasks can be processed in parallel)
-Energy Efficiency: Multi-core processors are typically more energy-efficient than single-core processors with a high clock speed. By distributing tasks across multiple cores, each core can run at a lower frequency, which can reduce power consumption and heat generation.
What is meant by ‘parallel systems’?
Refers to the simultaneous execution of tasks across multiple processing units by threading.
Can involve multi-core processors, multiple processors, or distributed systems.
Tasks are divided and executed simultaneously across various units, not limited to cores.
Could be multi-core CPUs, multiple CPUs….
Give an advantage of having a multi-core processor when it come to energy efficiency
Multi-core processors are typically more energy-efficient than single-core processors with a high clock speed. By distributing tasks across multiple cores, each core can run at a lower frequency (lower clock speed), which can reduce power consumption and heat generation.
What is the stored program concept?
The stored program concept states that both instructions and data are stored together in main memory, and the processor serially fetches and executes machine code instructions.
Define ‘serially’
Instructions are fetched and executed in order
Computers that use the stored program concept are based on the Von Neumann architecture.
TRUE OR FALSE?
FALSE
Computers that use the stored program concept can be based on one of two different architectures:
Harvard architecture AND von Neumann architecture.
Give advantages of Multicore systems over Parallel systems
Multicore systems:
Less communication/syncronisation overhead: these cores share the same memory system and work together within a single processor. So multicore systems don’t need to communicate over a network or handle the synchronizing between completely separate CPUs.
Cheaper: no additional hardware is needed
How are multi-core systems and parallel systems different at completing tasks?
Multicore= A multi-core processor contains multiple independent cores that can execute instructions separately and independently of each other. Each core can handle its own thread/task, allowing the processor to complete multiple instructions simultaneously/in parallel. The cores can also collaborate to work on the same task
Parallel= Parallel systems involve multiple processors (which can be single-core or multi-core), In single-core systems, time slicing is used, where tasks are split into chunks and executed one at a time by quickly switching between them. This creates the illusion of parallelism, but tasks are still processed sequentially, with each process being allocated a brief time slice before the next one is executed.
What is meant by ‘threading’?
Used in parallel systems
Refers to splitting a process into threads. Each thread within a single process represents a smaller unit of work that can be executed concurrently.
What is meant by a ‘process’?
An instance of a program that is being executed by a computer.
What is a GPU?
GRAPHICS PROCESSING UNIT (GPU)
-Type of parallel processor
-Device (which unlike CPU) has lots of independent cores which work in parallel (as the cpu is a processor)
-Type of coprocessor
-Each core is simpler than a CPU core but excels at performing a large number of small calculations at once
==>So good for repetitive tasks
A multi-core processor has multiple independent processors on the same chip which can all independently execute instructions
TRUE OR FALSE?
FALSE
A multi-core system is a single processor that has multiple cores on the same chip.
Each core can independently execute instructions, meaning multiple threads or processes can run simultaneously within a single CPU.
A graphics processing unit (GPU) is a type of co-processor
What is meant by a ‘co-processor’?
A secondary processor designed to assist the main CPU by handling specific tasks more efficiently so the primary processor can focus on other tasks
This is because you can specialise them in specific tasks so that they can perform these tasks better than the main CPU (or processor)
Give tasks that a GPU may be efficient at completing
-Image processing
-Machine learning
Give types of primary storage
-RAM
-ROM
RAM isnt used for storing personal files but as temporary storage while the computer is running
Why is this?
Because RAM is volatile meaning that it loses all its contents once power is turned off
(so when power is turned off all this personal files will be lost also)
RAM is more expensive per gigabyte than secondary storage devices
TRUE OR FALSE?
TRUE
ROM is useful for storing fixed sequences of instructions (e.g boostrap)
Why is that?
-Non volatile which means that all the data will be retained even when the power is turned off
-Can’t be modified as once programmed the memory cells inside dont change
ROM = volatile
RAM = non-volatile
TRUE OR FALSE?
FALSE
ROM = non-volatile
RAM = volatile
Give examples of virtual storage
-Cloud storage
Give examples of cloud storage
-Google drive
-Microsoft OneDrive
-Google drive
-Microsoft OneDrive
Are examples of?
Cloud storage
What is meant by virtual storage (involving cloud and remote storage)?
Storing info remotely so that it can be accessed by any computer with the necessary permissions and network access
Data is stored on remote servers, rather than on a local computer or device. Users can upload, download, access same data and manage their files over the internet.
Give advantages of using virtual storage (e.g cloud storage)
Shared Resources: Virtual storage allows multiple users to access the same data and files. ==> good for projects, collaborating from diff locations
Scalability: Many virtual storages are scalable, allowing users to increase their storage capacity, without worrying about hardware limitations.
==>but there might be an extra cost
Data Synchronization: Any changes made to them can be automatically synced across devices, ensuring that the most up-to-date version is always accessible.
Give examples of optical devices
-CDs
-DVDs
-Blu-Ray
CD stands for….
Compact disc
Give advantages of using CDs
Compact discs
-Cheap
-Light, thin ==> portable
Give disadvantages of using CDs
Compact discs
-Easily damaged
-Limited storage capacity (lower than DVDs and Bluray) (making them suitable for dig images and audio files)
-Relatively slow transfer speeds
What are the differences between CD-R, CD-RW and CD-ROM?
CD-R = can only be written to once
CD-RW = can be written to more than once
CD-ROM = written when first made/production and can then only be read from (eg. movies)
What does DVD stand for?
Digital versatile disc or Digital video disc
They are suitable for digital vids (as they have more capacity than CDs)
Which has a higher storage capacity, CDs or DVDs?
DVDs
Which has a lower storage capacity Blu-Ray or DVD?
DVDs
So Bluray is useful for storing highresolution films
and DVDs for digital videos
How does a memory read operation work using buses?
-Memory read
The CPU uses the address bus to specify the memory location (address) from which data is to be read.
The control bus sends a signal (e.g., READ) to indicate that a memory read operation is taking place.
The data at the specified memory location is placed on the data bus and transferred to the CPU.
How does a memory write operation work using buses?
-Memory write
The CPU uses the address bus to specify the memory location (address) where the data will be written.
The control bus sends a signal (e.g., WRITE) to indicate that a memory write operation is occurring.
The data to be written is placed on the data bus and transferred to the specified memory location.
What does arithmetic pipelining do?
Used in arithmetic operations: Breaking down the arithmetic operations and overlapping them as they are performed for each instruction
What does instruction pipelining do?
Improves the execution of instructions carried out by CPU: Separating instruction into fetching, decoding and executing and overlapping these stages for each instruction
What is the difference between instruction pipelining and arithmetic pipelining in terms of what they each aim to optimise?
Instruction Pipelining focuses on optimizing the flow of instructions through the CPU.
Arithmetic Pipelining focuses on optimizing arithmetic operations within the CPU’s functional units (e.g. ALU).
Give disadvantages of Von Neumman architeture
-Since both instructions and data share the same memory and bus, the system can only fetch one instruction or one piece of data at a time. May take longer to execute an instruction
-Instructions are processed sequentially, which limits parallelism so can make execution slower
Which is better for embedded systems? Harvard or Von Neumman architecture
Harvard
Give some advantages on using the Harvard architecture
Efficient for Specialized Tasks:
-Useful in embedded systems and other specialized applications where speed is critical.
Parallelism:
-With separate buses for instructions and data it allows simultaneous access to data and instructions, so instructions can be fetched and executed in parallel. (good for parallel processing)
-Memories can have different sizes, so for example you may choose more memory for data if there is loads rather than for instructions, so more efficient use of memory
What is meant by contemporary processing?
Contemporary processors use a mixture of Harvard and Von Neuman
VN = used in main memory: used when working with data and instructions in main memory (same mem for data and insytructions)
H= used in cache: used to divide the cache into instruction cache and data cache (so allows simultaneous access to both)
Give advantages of using Von Neumann Architecture
-Cheaper to develop as control unit is easier to design (as both data and instructions are stored in same memory)
-May make more efficient use of memory: as there’s no need to reserve separate spaces for data and instructions H. Memory is allocated to data and instrcutions when each is needed (may need more space for instrcutions than data)
-Easier to maintain/ develop: as there’s no need to manage two separate caches or memory systems
What is meant by multithreading?
Allows a single process to be divided into multiple threads, which can be executed concurrently (at the same time) by the CPU.
Each thread represents an independent part of execution, enabling the system to handle multiple tasks simultaneously.
What is the difference between timeslicing and multithreading?
Multithreading:
Dividing a process into multiple independent threads. To allow multiple tasks to run concurrently (at the same time thought either parallel processing or time slicing).
Timeslicing:
Dividing the CPU’s processing time between tasks or threads and gives each of these a ‘timeslice’
Time slicing allows one thread to run for a short time before switching to another.
What is the difference between MultiCore systems and Parallel systems?
Multi-core systems
Refers to a single processor chip with multiple cores.
(This is specific to processors with multiple cores).
Multiple cores on the same chip work on tasks concurrently.
Parallel systems
Refers to the simultaneous execution of tasks across multiple processing units.
Can involve multi-core processors, multiple processors, or distributed systems.
Tasks are divided and executed simultaneously across various units, not limited to cores.
Could be multi-core CPUs, multiple CPUs….
Why would the Vonn Neuman architecture be more efficient when it comes to fetching from memory?
Its not Harvard is more efficient
Von Neumann
Since both instructions and data share the same memory space, the system has to fetch them sequentially, which can create a bottleneck. The CPU can’t fetch instructions and data at the same time because they use the same memory and bus system.
Harvard
SInce instructions and data are stored in separate memory locations and makes use of multiple bus systems (e.g. one to fetch data another tofetch instructions) the CPU can fetch instructions and data simultaneously, so there’s no need to wait for one to be fetched before the other.
Give advantages of using Parallel systems over Multi core systems
More suited for highly specialized tasks that require scalability as it involves multiple separate CPUs working together to solve a problem
Define thread
A thread is the smallest unit of execution within a process. It represents a single sequence of instructions that can run independently.
(An instruction has processes which can be split into threads)
Threads share memory and other resources within the same process, making communication between threads more efficient than between separate processes.
So the overhead for communication between threads is low because there is no need to pass messages or copy data between different memory spaces. They simply access the same memory locations.
This makes it easier to synchronize or update information shared by them
Threads within the same process, share memory and other resources making communication between threads more efficient than between separate processes.
Why is that?
The overhead for communication between threads is lower because there is no need to pass data between different memory spaces. They simply access the same memory locations.
This also makes it easier to synchronize or update information shared by them
How would parallel systems and multicores systems use threads differently?
In multi-core systems, a process can have multiple threads that run simultaneously on different cores to make the most of multiple cores within a single CPU.
Alternatively, on single-core systems (parallel systems), threads might run concurrently via time-slicing (quickly switching between threads) to distribute tasks across multiple CPUs
KEYBOARD as an input device
Each key on the keyboard is associated with a specific ASCII character code to represent characters.
Scanning matrix:The keyboard uses a scanning matrix of rows and columns to detect which key is pressed. Each key is positioned at the intersection of a row and a column. When a key is pressed, it completes the circuit between the row and column, sending an electrical signal to the keyboard controller.
How it works:
1. When a key is pressed, the keyboard uses a scanning matrix to detect which key is pressed. An electrical signal is created and that is sent to the keyboard controller.
- Controller converts the signal into the ASCII code and sends it to the CPU via the keyboard interface (typically USB or wireless).
- The CPU then interprets the ASCII code and passes the corresponding character to the operating system, allowing it to be displayed on the screen or used as input in a program.
Describe the concept of a scanning matrix in keyboards
The keyboard uses a scanning matrix of rows and columns to detect which key is pressed. Each key is positioned at the intersection of a row and a column. When a key is pressed, it completes the circuit between the row and column, sending an electrical signal to the keyboard controller.
MOUSE as an input device
Purpose: Provides a point-and-click interface for the user to interact with the computer.
How it works:
1. It uses tracking sensors (optical or mechanical) to detect movement along a surface.
2.It sends signals to the computer (via USB or wireless communication) to move a cursor and click on objects on the screen.
WEBCAMS as input devices
Purpose: Captures real-time video or images, typically for video calling, security, or streaming.
-uses a CCD (charge coupled device) or CMOS (complementary metal-oxide semiconductor) sensor to convert light into electrical signals and then into digital video or images.
What is the purpose of a mouse?
Purpose: Provides a point-and-click interface for the user to interact with the computer.
What is the purpose of webcams?
Purpose: Captures real-time video or images, typically for video calling, security, or streaming.
What is meant by sequential access of a memory location?
To reach a specific piece of data, you must go through all previous locations in sequence.
What is meant by random access of a memory location?
Random Access (e.g. RAM):
The CPU can access any memory location directly using its address, regardless of where it is located in memory. There’s no requirement to visit previous locations first, as is the case with sequential access.
What is meant by contiguous memory?
Data is stored in a continuous block of memory addresses, one after the other.
What is meant by firmware?
Firmware is a type of low-level software stored on a device’s non-volatile memory (e.g., ROM or flash storage) that provides the fundamental instructions for hardware to operate and interact with other software.
Virtual storage is often an abstraction of multiple drives
What does this mean?
Virtual storage is often an abstraction of multiple drives acting as one
Info stored on the cloud is actually stored on 100s of hard drives or SSDs formatted to act like a single piece of storage
How is data read from Magnetic storage?
Magnetic storage represent binary information using 2 magnetic states: polarised and unpolarised
-Polarised area of magnetic material: all magnetic poles align and can be read by R/W head passing over the region Represents 1 in binary
-Not polarised area: magnetic poles are randomly scattered (which produces a different reading to the polarised area) Represents 0 in binary
How data is read
1. The R/W (Read/Write) head detects the magnetic states by sensing changes in the magnetization of the storage medium as it passes over the surface.
These changes between polarized and unpolarized states correspond to binary 1 and binary 0, respectively, allowing data to be stored and retrieved in binary format.
Give types of Magnetic storage
-Hard disk drives
-Magnetic tape
-Floppy disks
What are the different ‘states’ in Magnetic storage
-Polarised = all magnetic poles align in uniform direction
Represents 1 in binary
-Not polarised = magnetic poles are randomly scattered in different directions
Represents 0 in binary
How do Hard Disks Drive work?
- They rotate magnetic platters at high speeds under a R/W head on an actuating arm, the combo of both allows R/W head to access any part of the platter
- Data is stored as polarized (1, mag poles allign in uniform direction) or unpolarized (0, mag poles are randomly scattered in different directions) magnetic states.
- The read head detects the magnetization changes and converts them into binary data.
Give advantages and disadvantages of using Hard Disk Drives
GOOD:
-Typically have High Storage Capacities
-Lower Cost per GB
BAD:
-Slow data transfer speeds (slower than SSDs)
(because they rely on mechanical components so its data transfer speeds are limited to these components (spinning platters and moving read/write heads))
-Higher Power Consumption (than SSDs)
-Can produce noise and vibration during operation
-Prone to mechanical failure over time
(Due to the moving parts inside the HDD (platters and actuator arm), especially if subjected to physical shocks or wear)
Hard Disk Drives have slower data transfer speeds than Solid state drives
Why is that?
Because they rely on mechanical components so its data transfer speeds are limited to these components (spinning platters and moving read/write heads)
Floppy disks
Type of magnetic storage
-Consists of a thin magnetic disk enclosed in plastic (to protect disk from dust and dirt)
Give advantages of Floppy disks
GOOD:
-Thin
-Low weight
So portable…
Solid State Drives are a type of….
Flash storage
The prefered logic gate for storing larger files such as photos and videos using flash storage is…
NAND
The prefered logic gate for storing smaller files and quantities of data such as code being executed using flash storage is…
NOR
How is info stored on flash storage (simple answer)?
Information is stored in blocks which are combined to form pages
Give advantages of flash storage
-Non volatile (doesnt lose its contents when powered off)
-Fast data transfer speeds
-Compact
-Flash memory can be erased and reprogrammed electronically
Give disadvantages of flash storage
-Generally more expensive per GB than other forms of storage (magnetic, optical…)
-Limited number of write and erase cycles per cell, meaning over time, these cells can wear out.
( wear leveling techniques are used in modern flash storage devices to distribute the wear evenly across cells to extend lifespan)
Describe the key principles of flash storage
Flash memory is based on silicon semiconductors, utilising NAND and NOR logic gates.
It stores data by trapping electrical charge in floating-gate transistors which represent binary data as either a high (charged) to represent 1 in binary or low (discharged) state to represent 0 in binary.
Hard Disk Drives are a type of…
Magnetic storage
Solid state drives are an example of what kind of storage?
Flash storage
Give examples of flash storage
Solid state drives
Flash storage
Data Storage Structure:
Data is stored in ….which are combined to form ….. Writing data to flash memory happens at the ……level, while erasing data occurs at the …..level, which means data must be written or erased in large chunks.
Data Storage Structure:
Data is stored in blocks which are combined to form pages. Writing data to flash memory happens at the page level, while erasing data occurs at the block level, which means data must be written or erased in large chunks.
Give advantages of Solid state drives
-Non volatile (doesnt lose its contents when powered off)
-Fast data transfer speeds
-Compact
-Light and portable
-Flash memory can be erased and reprogrammed electronically
-More resistant to damage from movement because it has no moving parts (unlike HDDs)
Give diasdvantages of Solid state drives
-Generally more expensive per GB than other forms of storage (magnetic, optical…)
-Limited lifespan: because of limited number of write and erase cycles per cell, meaning over time, these cells can wear out.
( wear leveling techniques are used in modern flash storage devices to distribute the wear evenly across cells to extend lifespan)
For Solid State drives a disadvantage along with cost per GB is:
-Limited lifespan: because of limited number of write and erase cycles per cell, meaning over time, these cells can wear out.
Can you explain why these cells ‘wear out’?
Every time a page is written to, the voltage required to write to it increases.
So overtime, the required voltage will become too high for the page to be written to.
(However, wear leveling techniques are used in modern flash storage devices to distribute the wear evenly across cells to extend lifespan)
Describe how the address bus, control bus, and data bus work together when an assembly instruction accesses data from memory
- When an instruction in assembly accesses a memory location (e.g. to load data), the CPU needs to send the address of that memory location via the address bus into memory
- Control bus sends a memory read signal to instruct memory to place the requested data onto the data bus.
- The data bus is used to transfer the actual data from memory or registers back into the processor
Speed Slower Fast Slow
Durability Less durable (moving parts) More durable (no moving parts) Moderately durable
Capacity High (up to 18 TB) Moderate (up to 8 TB) Low (700 MB - 25 GB)
Cost Cheapest per GB More expensive per GB Cheap per disc
Energy Consumption High Low Moderate
Portability Less portable Highly portable Portable but limited capacity
Noise Noisy Silent Silent
Usage Large storage (archiving) High-performance computing Media storage, backup
Reliability Less reliable More reliable Moderately reliable
Speed comparision between HDDs SSDs and Optical
HDD:
Slower compared to SSDs. HDDs use mechanical parts (spinning platters and read/write heads), which limits their speed.
SSD:
Much faster than HDDs and Optical. SSDs use NAND flash memory, which has no moving parts, allowing for faster data access and transfer speeds.
Optical:
Slowest form of storage. Data on optical discs (like CDs, DVDs) is read by a laser, which is slower than the methods used by HDDs and SSDs.
Capacity comparision between HDDs SSDs and Optical
HDD:
Higher capacity compared to most SSDs and optical storage.
SSD:
Lower capacity
Optical:
Much lower capacity than HDDs or SSDs.
Energy consumption comparision between HDDs SSDs and Optical
HDD:
Higher energy consumption due to moving parts (spinning platters).
SSD:
Lower energy consumption compared to HDDs since they don’t have mechanical components.
Optical:
Moderate energy consumption. Optical drives use more energy when actively reading or writing to discs but consume less energy when idle.
Describe what is meant by the term ‘Vonn Neumann architecture’ (2)
- Uses the same memory for data and instructions
- Uses the same bus for data and instructions
- Can only fetch either data or instructions at one
time/follows FDE
(memory location not allowed)
Programs/data can be held in non-contiguous
memory locations (using virtual addressing)…
* …making it easier to make best use of
remaining storage/ to avoid having to move
content around to fit in new programs.
Explain the need for compressing photographs
- Reduces the size of the image file
- Uses lower bandwidth in transmission
Give 2 reasons as to why an OS may be stored in ROM
The software will not need updating as ROM is pre-programmed during manufacturing with data or software that does not require frequent changes.
ROM is non-volatile, meaning it retains its contents even when power is removed. This ensures that essential software is immediately available when the system powers on, without requiring reloading.
Cannot be (accidentally) overwritten/deleted as ROM is read-only, so data cant be easily altered or erased, either accidentally or maliciously.
Describe what is meant by a peer to peer network
- Devices on the network have equal status/no (central)
server as they can both request data and respond to the requests of other devices. - Devices on the network share data
Give 3 disadvantages of a company using cloud storage
- Potentially vulnerable to hacking.
- Reliant on an internet connection/requires a fast enough internet connection.
- Reliant on company servers.
Give an advantage of paging over segmentation
Paging: No wasted space ‘between’ programs as pages are swapped due to fixed page sizes.
(Any wasted space is limited to the unused portion of the last page of a program (internal fragmentation)).
And on top of that pages can be stored in noncontigous memory locations
Segmentation: Wasted space between programs arises from external fragmentation, because free memory is broken into non-contiguous blocks and they may be too small to accommodate new segments. This is also due to segments being of variable size logical divisions
Why would you use the Harvard Architecture with a smart washing machine?
-Because with the harvard, instructions can be made ROM (because you have 2 separate memory units so you can choose to have different properties for each). This is goof as the specific instructions that the washing machine does dont need to be changed
-No need for secondary storage