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
Idea of creating a general-purpose computer
- 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
Stored-program computer
- Von Neumann architecture computer
- A computer in which the processing instructions are stored in memory with the data
Von Neumann architecture
computer system design in which the program is stored in memory with the data
Functions of all computers
- input
- output
- storage
- processing
CPU
- 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
Bus
- 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
Input devices
- 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
Output devices
- 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
Writing
- 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
Reading
- 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
Memory address
- 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
RAM
- 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
RAM is typically measured in?
gigabytes (GB) or terabytes (TB)
(but GB is more likely)
ROM
- 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
Firmware
- 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)
RAM and ROM
- 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.)
Cache memory
- 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.
Bottleneck
- 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
Cache miss
- 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.
Virtual memory
- 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.