Computers Flashcards

1
Q

Describe the

five-box model.

A

Main Memory
……………….^……………….
……………….|……………….
Input -> CPU -> Output
……………….^……………….
……………….|……………….
Secondary Storage

(secondary storage to CPU is a two-way arrow)

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

What are two examples of

secondary storage?

A

SSD and HDD

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

What is the

stored program concept?

A

a proposed design for a new computer architecture by von Neumann that allowed both program instructions and data to be stored together in a computer’s main memory

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

What does

von Neumann architecture consist of?

A

main memory and a central processing unit (CPU) interconnected by buses

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

Why was the

stored program concept such an important breakthrough?

A

it meant that computers could swap from one task to another simply by replacing the contents of memory

because program instructions and data are only stored in a computer’s memory for as long as they are needed

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

What does

main memory consist of?

A

a collection of storage locations

each location has its own unique memory address

you can think of memory like a series of letterboxes each with a space to store a program instruction or an item of data

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

What is

RAM?

and what does it stand for?

A

the main place for storing instructions and data whilst a program is being executed (aka main memory)

Random Access Memory

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

What are the

two different types of RAM?

A

DRAM (Dynamic RAM) - main memory
SRAM (Static RAM) - cache memory

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

What is the purpose of the

control unit (CU)?

A

to decode instructions received from main memory and coordinate the actions of other parts of the CPU in order to execute them

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

What is the purpose of the

arithmetic logic unit (ALU)?

A

to perform arithmetic and logic operations on data

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

Define

embedded system.

A

a small computer designed to perform one specific function

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

What are some

characteristics of embedded systems?

(9)

A
  • small
  • inexpensive
  • limited functionality
  • customised hardware and software
  • single purpose not general purpose
  • have limited user interface
  • have simple and robust operating systems
  • have low power consumption
  • have limited processing resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is in the

microcontroller

of an embedded system? (3)

A
  • CPU
  • flash memory
  • RAM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does an

embedded system work?

(4 steps)

A
  1. Input devices supply an embedded system with information from the outside world.
  2. Data received from an input device is stored temporarily in the microcontroller’s RAM.
  3. The CPU interprets and acts upon the data according to the program instructions stored in flash memory.
  4. If necessary, a signal is sent to an output device (e.g. an actuator) to carry out an appropriate action.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the

Internet of Things (IoT)?

A

the converging of the internet and embedded systems, enabling devices to collect and exchange data with little or no human intervention

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

What is

utility software?

A

a collection of tools available that help minimise the impact of data loss or damage caused by events such as system failure, a cyberattack, a fire or a flood

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

What are some examples of

utility software?

(5)

A
  • file repair
  • backup
  • data compression
  • disc defragmentation
  • anti-malware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does a

file repair tool do?

A

it scans a damaged file, extracts as much data from it as possible and stores it in a new useable file

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

What does

backup do?

and why is this helpful?

A

it automatically backs up data stored on a computer’s hard drive to another location

should a file get lost or damaged, the most recent backup can be restored

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

What is

disaster recovery planning?

A

a set of protocols and procedures for backing up data on a regular basis and for being able to recover data quickly in the event of loss

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

What does a

data compression tool do?

and why is this helpful?

A

compresses files to reduce their file size

this frees up storage space and speeds up file transfer across networks

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

Why is

disk fragmentation a problem?

but only for mechanical hard drives?

A

it means that the heads have to move all over the disk platter to read and write data

although SSDs become just as fragmented, it makes no difference to the speed at which they operate since they have no mechanical parts

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

What does a

disk defragmenter do?

A

rearranges all the files so that every file is stored in sequential sectors and free space is consolidated

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

What are some examples of things that could go

wrong when a program is executed?

(4)

A
  • a user may select an incorrect option or supply an inappropriate input
  • data required by the program may somehow become corrupted
  • a hardware fault may occur
  • a peripheral may not be available when required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
# Define robust software.
software that is capable of handling the unexpected without crashing, generating incorrect output or revealing sensitive data
26
# Define code vulnerability. | and why is this is a bad thing?
a flaw in a program that comprises security ## Footnote it can be exploited by an attacker to gain access to a computer system, enabling them to: - steal or corrupt data - introduce malware - take over control of the computer for some purpose of their own
27
# What does input validation do? | (2 things)
1. Check if a user input meets certain criteria. 2. Report an error or request the data be re-entered if needed.
28
# What does sanitization do?
modify the user input to make it valid | e.g. trim off spaces of ensure uniform case
29
# What does authentication do?
ensure that the system is only accessible to users who can pass a security test
30
# What are some examples of bad programming practices? | (6)
- not having properly thought-through design - not sticking to agreed coding practices and standards - making do with a temporary fix for a problem - writing unstructured code instead of separating it into subprograms - saving time by using third party library modules without first checking that they are free from vulnerabilities - skimping on testing
31
# What are code reviews | designed to do? (3)
- spot instances of poor programming practice - fins any vulnerabilities in the code - check its efficiency
32
# What are the two main types of code review?
- review by another programmer (labour intensive and time consuming) - automated review (probably won't identify every issue)
33
# What does the operating system (OS) do? | (3)
- allows the hardware to communicate effectively with the software - provides an interface for users to interact with the computer - determines who is allowed to use the computer system
34
# What are the three types of user interface?
- graphical user interface (GUI) - windows, icons, menus and pointers - WIMP - e.g. Microsoft Windows or macOS - command line text interface (CLI)
35
# Define process.
a program that is loaded into main memory and is being executed
36
# What are some examples of scheduling algorithms? | (3)
- first in, first out - shortest job first - round robin
37
# How does the scheduling program first in, first out work?
Processes queue in the order in which they arrive. The process at the head of the queue gets to use the CPU until it is finished or held up waiting for another resource like a printer.
38
# How does the scheduling program shortest job first work?
The process which is closest to finishing goes next.
39
# How does the scheduling program round robin work?
Each process is assigned a **time slice**. Processes wait their turn in a queue. The process at the head of the queue goes next. At the end of its time slice, if it isn't finished, it goes to the back of the queue and the next process is taken from the front of the queue. ## Footnote Some processes have a higher priority than others and get more time slices.
40
# What are the three types of bus?
- address bus - data bus - control bus
41
# What are some characteristics of the address bus? ## Footnote - carries? - direction?
- carries the address of the memory location that the CPU will read or write to - unidirectional - only the CPU can put an address on this bus
42
# What are some characteristics of the data bus? ## Footnote - carries? - direction?
- carries the value being read from or written to memory - bidirectional
43
# What are some characteristics of the control bus? ## Footnote - carries? - direction?
- carries the command signals from the control unit to other components (so that they know whether to read or write data), and status signals back to the CPU - bidirectional
44
# What is bus width?
the number of connections on a bus | greater bus width means larger number values can be communicated
45
# What is the purpose of the clock?
send out electronic signals at regular intervals to all the other hardware components in order to synchronise their actions ## Footnote the faster the **clock**, the more instructions the CPU can execute per second
46
# What is clock speed measured in?
Hz | 1Hz = 1 cycle per second
47
# What equation allows you to calculate the clock period?
period = 1/frequency
48
# What are three common types of secondary storage?
- magnetic storage - optical storage - solid-state storage
49
# What are the positives and negatives of magnetic storage? | (2+, 2-) ## Footnote and what are some examples of this? (4)
+cheap +large capacity -slow access times -fragile | e.g. hard drives, floppy disks, cassette tapes, video cassette tapes
50
# What are the positives and negatives of optical storage? | (3+, 2-) ## Footnote and what are some examples of this? (3)
+cheap +lightweight +portable -slow access times -prone to scratches | e.g. CDs, Blu-rays, DVDs
51
# What are the positives and negatives of solid-state storage? | (5+, 2-) ## Footnote and what are some examples of this? (3)
+durable +fast access times +no moving parts, very reliable +no noise +low power -expensive -limited read/writes | e.g. SSDs, memory sticks, flash memory cards
52
# How is data stored on an optical disc? | (2 steps)
1. One layer of the optical disc stores data through a series of pits and lands. 2. These can be interpreted as land representing the binary value 1 and a pit the value 0.
53
# How is data read from an optical disc? | (3 steps)
1. A laser beam is shone onto the layer with the pits and lands. 2. The amount of light reflected off the surface is detected by a light sensor. 3. This is then interpeted as 1s and 0s.
54
# How is data stored on a magnetic disc? | (3)
1. The surface of the platter has a thin layer of magnetic coating. 2. This coating is split up into lots of little areas which can be individually magnetised. 3. An area that is magnetised represents a 1, an area that is demagnetised represents a 0.
55
# Tell me about solid state storage. | (4 key points)
- it uses NAND flash chips which are comprised of special kinds of transistors that can trap electrons in a 'pool' - full pools represent 0s, emtpy pools represent 1s - to write data, control signals apply very precise electrical charges to the pool, causing electrons to move betwen two pools - to read data, control signals apply a small voltage to the pool, if the electron pool is empty, the transistor turns on and a 1 is read out (and vice versa)
56
# Define instruction set.
the instructions that a CPU can execute
57
# Define machine code.
the binary codes representing a program
58
# What are the key points about assembly langauge? | (2)
- it is a **low-level language** - each instruction is written as a short, memorable keyword called a **mnemonic**
59
# Why is writing code in assembly language more difficult than a high-level language? | (3)
- there are a very limited range of instructions - there are no strings, integers or real numbers - debugging can be more difficult
60
# What machine converts assembly language to machine code?
an assembler
61
# What are some examples of high-level languages? | (3)
- python - visual basic - java
62
# What machine converts high-level languages to machine code?
translators
63
# What are some key characteristics of low-level languages? ## Footnote - readability? - portability? - tools? - uses? - speed? - ease of use? - memory use? - language features?
- very hard to read - not portable (because it is CPU dependent) - fewer tools (than high-level) - embedded systems - faster (than high-level) - harder for humans to use as it is unclear and difficult to read, write and debug - uses less memory (than high-level) - directly manipulates the hardware
64
# What are some key characteristics of high-level languages? ## Footnote - readability? - portability? - tools? - uses? - speed? - ease of use? - memory use? - language features?
- very easy to read - very portable (because it can run on many different CPUs - syntax errors, debuggers - general use - quite slow (as code must be translated before being executed) - a lot easier for humans to use as it is easier and clearer to read, write and debug - uses more memory - if and else, for and while, functions, named variables, multiply, loops, arrays
65
# What does the CPU consist of? | (4)
- control unit (CU) - arithmetic logic unit (ALU) - instruction register - accumulator
66
# Describe the fetch-decode-execute cycle in the CPU.
1. **Fetch** - the control unit places the memory address of the next instruction on the address bus. It sends a read sgnal to RAM along the control bus. The RAM receives the signal and copies the content of the memory location indicated by the address bus onto the data bus. 2. **Decode** - the control unit decodes the instruction. 3. **Execute** - the control unit sends signals to the other components of the CPU instructing them what to do.
67
# What are the two different types of translator?
- compiler - interpreter
68
# What are the characteristics of a compiler? ## Footnote - source code processing? - reporting? - portability?
- translates the entire source code into machine code all in one go - all syntax errors reported during compilation - produces machine code that is specific to one type of CPU - source code must be recompiled for each type of CPU
69
# What are the characteristics of an interpreter? ## Footnote - source code processing? - reporting? - portability?
- translates one line of source code, executes it, then moves on to the next line - syntax errors are reported when that line is translated - source code can be used on any platform with a suitable interpreter
70
# What are the characteristics of compiled programs? ## Footnote - speed of execution? - changes to source code? - source code availability?
- execution is faster (than interpreted) because no translation is needed - source code must be recompiled - not available
71
# What are the characteristics of interpreted programs? ## Footnote - speed of execution? - source code availability?
- execution is slower (than compiled) because each line needs to be translated as it runs - needed to run the program with the interpreter