17 Hardware Flashcards

Function of the hardware components of a computer system (CPU, main memory, secondary storage, input and output devices) and how they work together, RAM, ROM, cache, virtual memory, concept of a stored program, components in CPU (CU, ALU, registers, clock, address/ data/ control bus), fetch-decode execute cycle, magnetic, optical, solid state storage, cloud storage and other storages, embedded system's purpose and functions

1
Q

Idea of creating a general-purpose computer

A
  • developed in the 1930s and 1940s
  • through the work of Alan Turing
  • John Von Neumann
  • They proposed that the instructions for the processing can be held in storage with the input data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Stored-program computer

A
  • Von Neumann architecture computer
  • A computer in which the processing instructions are stored in memory with the data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Von Neumann architecture

A

computer system design in which the program is stored in memory with the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Functions of all computers

A
  • input
  • output
  • storage
  • processing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

CPU

A
  • Central processing unit (CPU)
  • hardware device that carries out/ does the processing all of the data and instructions in a computer
  • does fetch-decode-excute cycle
  • carrie out software instructions
  • processor
  • the brain of a computer
  • contains billions of transistors which are connected together to form circuits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Bus

A
  • A group of wires connections between devices in a computer
  • serve as pathways along which information travels within the computer system
  • facilitate the exchange of data/ connect between the CPU, memory, input/output devices, and other peripherals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Input devices

A
  • peripherals that enable interaction between a computer and its users, as well as with other external devices
  • allow the user to provide data into computer
  • Keyboard
  • Mouse
  • Camera
  • Microphone
  • Light sensor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Output devices

A
  • peripherals that enable interaction between a computer and its users, as well as with other external devices
  • enable computer to output/ show/ communicate the results of the processing
  • Monitor
  • Printer
  • Speaker
  • Headphone
  • Screen
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Writing

A
  • CPU saves data into memory

Process be like:
* CPU sends the data to be written to memory over the data bus
* address bus stores the memory address where the data should be stored/ specifies the location in memory where the data should be written
* CPU uses the control bus to tell memory to save it at a given address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Reading

A
  • CPU retrieves the data stored at a given address
  • CPU takes data from memory
  • CPU must specify which part of memory to read from

Process be like:
* Address bus stores the memory address of the data to be retrieved
* Control bus is used to tell the memory to take the piece of memory at given memory address
* Data is sent to CPU through data bus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Memory address

A
  • A number that uniquely identifies a speific memory storage location in the computer’s memory
  • is used to locate and access data stored in the memory
  • Address bus carries memory addresses to identify a memory location
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

RAM

A
  • random-access memory (RAM)
  • main memory/ primary storage
  • a temporary/ volatile storage that CPU uses for data and instructions (programs)
  • is used to store data and machine code currently being used or processed by the CPU
  • contents are lost when the power is turned off
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

RAM is typically measured in?

A

gigabytes (GB) or terabytes (TB)
(but GB is more likely)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ROM

A
  • non-volatile/ permanent memory
  • Read-only memory (ROM)
  • is commonly used to store firmware which are small and carry out specific tasks (BIOS/UEFI)
  • the data stored in ROM cannot be easily modified or overwritten (can only be read)
  • Once programmed, the contents of ROM generally cannot be changed (can only be read)
  • is used in single-purpose computer to store only one programme
  • is used in general-purpose computers to boot the system, initialise the hardware components and load opperating system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Firmware

A
  • small programs that carry out specific tasks usually stored in ROM
  • provide low-level control over the device’s operation
  • can be used to control a hardware device
  • a type of embedded software that is tightly integrated with the hardware of a device
  • provide basic functionality;
  • Eg 1. Initialising hardware components
  • Eg 2. Starting the operating system when a computer is switched on
  • BIOS (Basic Input/Output system)
  • UEFI (Unified extensible Firmware Interface)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

RAM and ROM

A
  • RAM = volatile while ROM = non-volatile
  • RAM stores data and program instructions that the CPU needs to access quickly during the execution of programs
  • ROM is typically used for storing firmware and other essential software that needs to be accessed
  • Data cannot be changed or overwritten easily (ROM)
  • Data can be changed (RAM)
  • RAM is commonly used for running applications, storing program variables, and caching data for quick access
  • ROM is used during the boot process to initialize hardware components, perform self-tests, and load the operating system into memory

(RAM provides temporary, fast-access storage for active data and program instructions, while ROM provides permanent or semi-permanent storage for essential software and firmware.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Cache memory

A
  • Cache memory is a small amount of fast, expensive memory that is used between two devices that communicate at different speeds, most often CPU and RAM.
  • Cache memory provides fast access to frequently used data and instructions.
  • It acts as a buffer between the CPU and the main memory to speed up processing.
  • A temporary data store so that the data can be accessed very quickly when needed
  • Cache memory helps minimize the performance gap between the CPU and the main memory, improving the efficiency of data retrieval and processing.

=================================

================================

=================================

  • Most CPUs have independent instruction (just have to be read) and data caches (need to be read and written to).
  • The use of caches allow CPU to check the fast cache for the data it needs without needing to wait for it to be fetched from slower main memory.
  • The faster static RAM (SRAM) is used for the cache.
  • There are different levels of cache (L1, L2, L3) with each level being larger but slower than the previous one.
  • In a multicore processor, the cores have their own L1 and L2 caches while the last level cache is usually shared by all the cores.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Bottleneck

A
  • when one component cannot work as fast as other components and slows down progress
  • limits the performance of a computer
  • In fetch-decode-execute cycle, bottleneck is caused by RAM, main memory that is far slower than CPU
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Cache miss

A
  • A situation in a computer system where the CPU attempts to access data or instructions that are not currently stored in the cache memory.
  • CPU has to wait for the cache to reload with the correct data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Virtual memory

A
  • Pretend memory
  • When RAM becomes full, the ‘memory manager’ in operating system use Virtual memory to store some data from RAM.
  • VIrtual memory is created when RAM becomes full.
  • Virtual memory is a swap area created in hard disk drive.

Process be like:
1. RAM is full and a process running on the computer may need to store in RAM as processing.
2. RAM has no free memory to store that data.
3. So, least recently used data in RAM is swapped out from RAM and in to virtual memory.
4. When that data is needed again, it is swapped back in to RAM from virtual memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Disadvantages of virtual memory

A
  • Read/write speed is much slower than RAM.
  • A hard drive is not suitable/ made for accessing a small piece of data at a time
  • Too heavily relying on virtual memory will lead to significant drop in performance.
  • Disk thrashing (OS spends a significant amount of time swapping data between RAM and virtual memory) slows down the execution of the programs.
22
Q

CU

A
  • Control unit is a component of CPU
  • CU organizes/ manages the actions of the other parts of the CPU
  • The steps in the fetch-decode-execute cycle are controlled by the control unit
23
Q

ALU

A
  • Arithmetic logic unit is a component of CPU
  • ALU performs/does calculations and logic operations
24
Q

clock

A
  • An electronic device inside a CPU that ticks at regular intervals and is used to synchronize the actions of the other parts of the CPU
  • The steps in the fetch-decode-execute cycle are synchronized by the electronic clock.
  • The clock speed determines how fast the CPU can perform the operations.
  • 2.3 GHz CPU means that its clock ticks 2300 million times per second
  • A higher clock speed generally results in faster processing and better overall performance of the computer system.
25
Q

Register

A
  • A storage location/ memory location inside the CPU
  • It is used to hold an instruction, an address or other single item of data
  • are extremely fast to access
  • are usually only a relatively small number

Some registers play specific role in the fetch-decode-execute cycle.
* holding a memory address (like program counter)
* an instruction (like current instruction)
* a piece of data (like accumulator)

26
Q

Accumulator

A
  • a register in CPU
  • Accumulator holds results of calculations performed by the ALU.
  • All input and output from CPU pass through the accumulator.
27
Q

Program counter

A
  • a register in CPU
  • holds the memory address of the next instruction to be fetched
28
Q

Current instruction

A
  • a register in CPU
  • holds the instruction currently being executed
29
Q

Types of bus

A

3 types of bus
* Address bus - carries memory addresses between CPU and memory to identify a memory location
* Data bus - carries the value to be read from/ written to memory
* Control bus - carries the signals that determine what to do

30
Q

Address bus

A
  • carries memory addresses between CPU and memory to identify a memory location
  • to specify the memory location or device that the CPU wants to read from or write to.
  • When the CPU needs to read data from or write data to memory (RAM), it sends the memory address of the desired location over the address bus.
  • The address bus is also used for input/output (I/O) operations. The CPU sends the address of the device it wants to communicate with over the address bus.
31
Q

Data bus

A
  • carries the value/data to be read from/ written to memory
  • When the CPU needs to read data from memory, write data to memory, or transfer data to/from peripheral devices, it uses the data bus to send or receive the data.
32
Q

Contorl bus

A
  • carries the signals that determine what to do (eg. to read or write the data and whne to do so)
  • Control signals sent over the control bus control the timing of data transfers, indicate the type of operation being performed, and manage the flow of data and instructions.
33
Q

Bus width

A
  • the number of wires that make up a bus
  • determines the range of binary numbers that can be communicated
34
Q

Fetch-decode-execute cycle

A
  • is a sequence of steps performed by a CPU to process a single instruction.
  • It’s the fundamental operation cycle of every digital computer.
  • The main stages are: Fetching the instruction from the computer’s memory, Decoding it to determine what action is required, and Executing the action.
  1. Fetch:
    where the CPU ‘fetches’ an instruction from the primary memory (RAM).
    * CU places the memory address of the next intruction on the address bus.
    * CU sends a signal on the control bus requesting to read data from memory.
    * The memory receives the signal and looks up that memory location.
    * The data in the memory is copied on to the data bus.
    * Data bus goes back to CPU from memory.
    * The CPU copied this into a special register.
  2. Decode:
    CU identifies what action is required.
    * The CU analyses the contents of the register and determines the operation to be executed.
    * Then, it sends signals to the other parts of the CPU telling them what to do (eg. add numbers, store data back into the memory)
  3. Execute:
    The decoded instruction is completed/ carried out by the CPU.
    (The result of the execution may be stored in registers, written back to memory, or used to update the CPU’s state)
35
Q

Factors that affect CPU performance

A
  • Clock speed:
    The faster the clock speed, the faster the rate of processing.
  • Number of processor cores:
    Multi-core processors have multiple processing units (cores) that can execute instructions simultaneously.
    (Parallel processing and Multitasking)
  • Size of cache:
    The use of caches allow CPU to check the fast cache for the data it needs without needing to wait for it to be fetched from slower main memory.
    With a larger cache there is a greator probability that the instruction or data item to be fetched is in the cache.
    So, RAM will not need to be accessed.
    Consequently, this will speed up processing.
36
Q

Parallel processing (in multicore processor)

A
  • The cores work together on the same program.
  • Each core in a multicore CPU operates independently.
  • Different parts of a program can be executed concurrently on different CPU cores, effectively dividing the workload and reducing overall computation time.
  • Parallel processing allows for faster execution and improved performance.
37
Q

Multitasking (in multicore processor)

A
  • The cores work on different programs at the same time.
  • Multitasking in a multicore CPU involves the ability to run multiple tasks or processes concurrently on different CPU cores.
  • Multiple tasks can execute simultaneously without having to share CPU resources or compete for processing time unlike single-core processors.
  • Each core in the multicore CPU can independently handle its own set of tasks.
  • Multitasking in multicore CPUs improves system responsiveness and overall performance.
38
Q

SRAM

A
  • Static Random Access Memory/ Static RAM
  • Memory that retains data bits in its memory as long as power is being supplied and does not have to be refreshed
39
Q

Secondary storage

A

===========================

  • Any kind of permanent/ non-volatile storage to which the contents of ROM/RAM are copied
  • store data for long-term retention, even when the power is turned off.
  • slower to access, cheaper and has much higher capacity, compared to RAM.
  • Unlike ROM, secondary stoage can be read and written to
  • commonly used for storing operating systems, applications, user files, and other data that needs to be preserved even when the computer is turned off.
  • Typical capacities are now in the terabytes.

=============================
========================
* Magnetic storage (HDD and magnetic tape storage)
* Optical storage (CD, DVD and Blu-Ray disk)
* Solid-state storage/ Electrical secondary storage/ Flash memory (SSD, SD card and USB memory stick)

40
Q

Magnetic secondary storage

A
  • Secondary storage that works by making parts of a substance behave like a magnet, with north and south poles to represent binary 1s and 0s
  • Hard disks and magnetic tape storage
41
Q

How does magnetic secondary storage store/write/read data?

A

===========================

  • A magnetic hard disk is made up of a stack of metal discs called platters with a magnetic coating.
  • Magnetic platter = stores bits
  • The platter is divided into “Disk Sectors” like pie, and “Tracks”/ concentric rings.
  • Track Sector” = the intersection of a track and disk sector
  • Actuator = Moves the read-write arms back and forth.
  • Read/Write arm = moves the RW head across the platter
  • RW head - a tiny magnet with a tiny electromagnet alongside to write bits

=================================
==========================
==================================

Data is recorded on each platter along circular tracks, each split into sectors.

When data is written to:

  1. The data is converted into a series of binary digits (0s and 1s).
  2. The arm moves across to be above the right track.
  3. The required sector comes around under the head.
  4. The magnetic head applies a magnetic field to the surface of the spinning disk, magnetizing tiny regions of the magnetic material.
  5. Each bit of data being written is represented by a tiny magnetic region on the disk’s surface.
  6. These regions can be magnetized in one of two directions (north or south poles), typically represented as 0s or 1s.

===========================
=================================
==========================
==================================

When data is read:

  1. The arm moves across to be above the right track.
  2. The required sector comes around under the head.
  3. The magnetic head detects the magnetic field changes on the surface of the spinning disk as it passes over the tracks.
  4. These changes in magnetic field represent the binary data stored on the disk.
  5. The disk controller translates this into 1s and 0s.

In short, disk spins, arm moves and when required sector under the head, arm above the right track&raquo_space; RW head detects macnetic field on disk surface&raquo_space; those represent binary data

=================================
==========================
==================================

Data does not come from the disk immediately.
Seek time = the time it takes for the actuator arm to move the read/write heads from their current position to the location of the data that needs to be read or written
Latency = the time it takes for the desired sector of the disk to rotate under the read/write heads after the heads are positioned over the correct track

42
Q

Advantages and Disadvantages of magnetic secondary storage

A

===========================

Advantages
* Non-Volatile
* High Storage Capacity: offer vast storage capacities suitable for large amounts of data storage. Capacities range from a few gigabytes (GB) to multiple terabytes (TB).
* Cost-Effective: have a relatively low cost per gigabyte and are cost-effective for archiving large volumes of data over long periods.
* Durable: is resistant to wear and tear, as no physical contact between the read/write head and the storage surface. This resilience ensures a longer lifecycle for magnetic storage devices compared to some other storage types.
* Widely Compatible: is widely adopted and compatible with various devices such as desktops, laptops, servers, and external enclosures

=================================
==========================
==================================

Disadvantages

  • Slower Access Speeds: Compared to SSDs, HDDs have slower access and data transfer speeds. The mechanical nature of HDDs contributes to longer access times and potential performance bottlenecks.
  • Sensitivity to Physical Damage: The moving components such as the read/write head and spinning platters make them susceptible to mechanical failure and physical damage. Accidental drops and exposure to extreme temperatures can cause data loss.
  • Size and Weight: HDDs, are generally bulkier and heavier compared to SSDs.
  • Power Consumption: HDDs consume more power than SSDs due to the energy required for spinning platters and moving the read/write head. Then, it can contribute to increased operating costs and a higher environmental impact over time.
  • Noise: generate noise and vibration during operation due to their mechanical nature.
43
Q

Optical secondary storage

A
  • Secondary storage that works using differences in light reflection from a material
  • CD (lowest capacity), DVD, Blu-Ray disk (largest capacity)
  • read/ write data by shining a laser at the disk and processing the reflection
  • Shinner/ more reflective parts of the disk represents the 1s or 0s.
44
Q

How does optical secondary storage store/write/read data?

A

===========================

  • A single grooved track spirals from the centre of the disc outward. Recorded data is stored in groove.
  • The track is divided into sectors for data organization.
  • The player uses two lasers: one to write data and the other to read data.
  • Light sensor detects reflection differences.
  • When a laser beam is directed onto the disc’s surface, it reflects differently off pits compared to lands. This difference in reflection is detected by the optical drive’s sensor and interpreted as binary data.

=================================
==========================
==================================

Data is written along a single track that moves out from the centre of the disk in a spiral.

When writing:
1. A laser beam burns/ heats the recording material.
2. It creates pits and lands on the surface of the disk that represents binary data.
3. The process is slow because the heating and cooling of the surface takes time.

In short, laser heats the disk surface&raquo_space; pits and lands created&raquo_space; that represents the data

=================================
==========================
==================================

When data is read:
1. The disk spins in the drive to ensure all data can be read.
2. The tracking machanism moves the laser into the correct position over the disk.
3. The laser shines on to the disk and is reflected back on to a light sensor.
4. Light sensor detects variations in reflection.
5. Signals from the sensor are translated into 1s and 0s.

In short, disk spins and place laser over correct position&raquo_space; laser scans the disk surface&raquo_space; light sensor detects and sends signals&raquo_space; translated into binary data

45
Q

Advantages and Disadvantages of optical secondary storage

A

Advantages
* high storage capacity
* good performance
* durability
* longevity
* resistance to environmental factors

Disadvantages
* slower access time
* compatibility issues
* reliance on mechanical components
* physical size and portability limitations

46
Q

Solid state storage/ Electrical secondary storage

A
  • Secondary storage that works by storing charges/ electrons
  • Flash memory
  • USB memory stick, SD card
  • uses chips (NAND flash) made of special kind of transistors that can trap electrons in a pool
  • 0 = electron in a pool, 1 = empty pool
  • Billions of transistors fit on a chip.
  • are small and have high capacity
  • Faster access to data than HDD
47
Q

How does electrical secondary storage store/write/read data?

A

===========================

  • uses chips (NAND flash) made of special kind of transistors that can trap electrons in a pool to store data
  • 0 = electron in a pool, 1 = empty pool

=================================
==========================
==================================

When data is read from the chip:
1. Control signals identify which bit is to read out and apply a small voltage.
2. If the electron pool is empty, the transistor turns on and a 1 is read out.
3. If electron pool is full. transistor doesn’t turn on and a 0 is read out.
4. The control signals are changed to read other bits.

In short, control signals identify bits to read and apply voltage to those bits&raquo_space; 0 = electron in a pool, 1 = empty pool

=================================
==========================
==================================

When data is written to chip:
1. Control signal identify which bit is to be written and apply a higher voltage.
2. This pulls or removes electron into the pools of transistors, recording 1s and 0s.

In short, control signals identify bits to write and apply a higer voltage to those bit.

=================================
==========================
==================================

Erasing data requires higher voltages to remove electrons from the pools.
Both erasing and writing cause the transistor to break down slowly.
Flash drives can only be rewritten around 1 million times before eventually failing.

48
Q

Advantages and Disadvantages of electrical secondary storage

A

=========================================

Advantages
* Speed: faster read and write speeds compared to traditional hard drives.
* Durability: Since there are no moving parts, less likely to suffer from mechanical failure or physical damage. Hence, more reliable, especially for mobile devices and industrial applications.
* Energy Efficiency: consumes less power&raquo_space; beneficial for battery-operated devices like laptops and smartphones, reduced heat generation, contributing to extended device lifetimes and decreased cooling requirements in data centres (good for environment)
* generally smaller and lighter&raquo_space; ideal for portable devices and slim laptops.
* Noise and Vibration: operate silently and produce no vibrations
* Data Access: The lack of moving parts enables faster and more consistent data access times, reducing latency and ensuring a smoother user experience in applications requiring high-speed data processing.

Disadvantages

  • Cost: typically more expensive per gigabyte
  • Write Endurance: The process of writing data involves the gradual degradation of the memory cells&raquo_space; have a limited number of write cycles before performance begins to decline.
  • Compatibility: Some devices or systems may have limited compatibility&raquo_space; could require additional hardware or software updates to enable the use of certain SSDs
  • Storage Capacity: traditional hard drives currently offer larger storage capacities at a lower cost
49
Q

Cloud storage

A
  • Secondary storage that is accessed via a network and isn’t in the same physical place as machine’s RAM and ROM.
  • Files stored on the cloud can be accessed anywhere via the Internet connection.
50
Q

Virtualisation

A

Any process that hides the true nature of a computing resource, making it look different, usually to simply the way it is accessed