Topic 3 - Computers Flashcards
What is a CPU for?
A processing unit to decode and execute program instructions fetched from memory one at a time.
What is the input and output for?
Input and output mechanisms to input programs and data and output the results of processing.
What is the main memory for?
A memory unit into which program instructions and data are loaded prior to being processed.
Describe the features of a main memory unit.
- It is short-term, working memory.
- It only holds the program instructions and data that the CPU is currently using.
- The contents of the main memory are continually changing.
- It consists of a collection of storage locations, each with its own unique address.
- A storage location can hold a program instruction or item of data.
- It is often referred to as RAM
Is the main memory short-term or long-term?
Short-term working memory. It only holds the program instructions and data that the CPU is currently using. The contents of the main memory are continually changing.
What does the main memory consist of?
It consists of a collection of storage locations, each with its own unique address. A storage location can hold a program instruction or item of data.
What is the main memory often referred to as?
RAM (random access memory). Because storage locations can be read from and written to in any order.
Why is the main memory classed as primary storage?
Because the CPU has fast, direct access to it.
Why is it described as volatile?
It needs power to retain its contents. When the computer is switched off, its main memory is completely wiped.
What is the CPU?
The hardware component that decodes and executes program instructions.
What are the names of the three busses in the CPU components?
- Address bus
- Data bus
- Control bus
What do the three buses do?
They work together to transfer data between the CPU, main memory and input/output devices such as the keyboard and screen.
What does the control unit do (in the CPU)?
Fetches program instructions from main memory one at a time, decodes them and directs the operations of the other parts of the system to execute them.
What are the seven components of the CPU?
- Address bus
- Data bus
- Control bus
- Clock
- Control unit
- Arithmetic logic unit
- Registers
What does the clock do (in the CPU)?
Synchronises the actions of the CPU.
What does the ALU do (in the CPU)?
Performs arithmetic and logic operations on data.
What does the register do (in the CPU)?
Direct-access storage for instructions, intermediate results and data within the CPU. Some are general purpose. Others, such as the Program counter and the Instruction register, have specific functions.
What is the clock?
A tiny quartz crystal that vibrates at a constant rate. Each tick of the clock triggers the CPU to carry out one action.
What is the clocks speed measured in?
Cycles per second: 1 hertz = 1 cycle per second.
What is a bus?
A collection of wires that is used to transfer data between components of a computer system.
What does the control bus do?
Carries signals between the CPU and other parts of the computer system.
What does the address bus do?
Holds the address of the memory location that the CPU will read from or write to. The number of wires in the address bus (its bandwidth) determines how much addressable memory there is.
What does the data bus do?
Transfers program instructions and data between memory and the CPU.
What is the fetch-decode-execute cycle?
It is the sequence of steps carries out repeatedly by the CPU when a program is being executed. Instructions are fetched one at a time from memory into the CPU, where they are decoded and executed.
What are the three stages of the fetch stage?
- The CPU places the memory address of the next instructions on the address bus
- The CU within the CPU sends a read signal along the control bus to memory
- The content of the specified memory location is transferred along the data bus to the CPU. On arrival, it is stored in one of the CPU’s registers
Explain the decode stage.
The CU looks up the instruction in the CPU’s instruction set.
Each CPU has its own unique instruction set - a list of all the operations that it can carry out.
Explain the execute stage.
The CU coordinates the actions of the other components of the CPU to carry out the operation. If an arithmetic or logic operation is required, the control unit signals that the ALU is to carry it out.
Once a cycle is complete the next one starts.
What does second storage do?
It provides long-term storage for programs and data.
Is secondary storage volatile?
No. It’s non-volatile.
Does secondary storage have access the the CPU?
No. Programs and data must be transferred to memory in order for them to be accessed by the CPU.
What are primary and secondary storages capacity like?
Primary: limited and only limited scope for expansion
Secondary: large and can be expanded by using external devices, such as portable hard drives and USB memory sticks.
What are the three main types of secondary storage?
- magnetic
- optical
- solid-state
What devices use magnetic storage?
Hard disk drive
Magnetic tape drives
What devices use optical storage?
CD
DVD
How do optical storage devices store data?
Use patterns of light to store data on removable disks.
What devices use solid-state storage?
Mobile phones
Smart watches
How does solid-state storage work?
An electrical current is applied to the transistor. This forces electrons through a barrier, trapping them in pools. A full pool represents 0. An empty pool represents a 1.
Advantages of magnetic storage?
- high capacity
- fast data access
Advantages of optical storage?
- portable
- disks are cheap
Advantages of solid-state storage?
- very fast data access
- no moving parts
- low power
- quiet
Disadvantages of magnetic storage?
- has moving parts that will eventually fail
- noisy
Disadvantages of optical storage?
- slow to access
- prone to scratches
Disadvantages of solid-state storage?
- relatively expensive
- has a limited number of read-write cycles
What is an embedded system?
A small computer on a chip that performs a dedicated task within a bigger system.
What are the 10 features of an embedded system?
- single-purpose
- customised hardware and software
- limited memory and processing power
- low power consumption
- wireless connectivity
- minimal or no user interface
- small physical size
- responsive to their environment
- low maintenance
- usually operate in real time
What are the hardware components of an embedded system?
1) A long-life battery
2) Sensors and other input devices to supply information from the outside world.
3) A low-powered microcontroller that contains the CPU, memory and input/output.
4) Actuators to convert the output commands into mechanical actions.
What is firmware?
The program that tells the device what to do.
What is an operating system?
The program that acts as an interface between the hardware and other software in a computer system, enabling them to communicate with each other.
What are the four main tasks performed by an operating system?
Process management
File management
User management
Peripheral management
What is process management?
Overseeing the execution of programs by the CPU and allocating each of them a share of main memory and CPU time.
What is file management?
Organising and keeping track of the contents of secondary storage, managing files and folders and using permissions to control user access to programs and files.
What is user management?
Providing a user interface to enable users to interact with the computer.
What is peripheral management?
Communicating with device drivers to control peripheral devices.
What is file repair software’s purpose?
To recover data from and repair files that have become corrupted by a computer malfunction or cyberattack.
How does file repair software work?
It scans the damaged file, extracts as much data from it as possible and stores it in a new usable file.
What is the purpose of disk defragmentation software?
To speed up access to files stored on a magnetic hard drive.
How does disk defragmentation software work?
It rearranges individual file blocks for each file so that they are stored on contiguous blocks on the disk.
What is the purpose of backup software?
To keep a copy of files so that, should a file get lost or damaged, the most recent backup can be restored.
How does backup software work?
Backup copies of files are made at regular intervals and stored on a separate device in a different location to the live working environment- possibly in the cloud.
What is the purpose of anti-malware software?
To protect computer systems and data from damage caused by malware, such as viruses, worms and spyware.
How does anti-malware software work?
Some types of anti-malware software use a database of malware signatures (the patterns associated with a known piece of malware). If the anti-malware detects a file that has a pattern that matches a known signature, it deletes or quarantines it.
What makes a software robust?
If it can handle unexpected actions without crashing or producing incorrect output and if it is free from vulnerabilities that could be exploited by criminals.
Three things programmers can do to make their programs robust:
- adhere to good programming practices
- carry out regular code reviews
- keep an audit trail
Four features of low-level languages:
- are difficult and time consuming to use
- have few tools to help with maintenance and debugging
- are machine-specific - the programs written in a low-level language will not run on a computer with a different type of CPU
- interact directly with the hardware, enabling memory to be used efficiently
Four features of high-level languages:
- are programmer-friendly
- have tools that make maintenance and debugging easier
- are machine-independent (portable) - they will run on computers with different types of CPU
- are generally less memory efficient