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 insturction 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 (e.g. a sensor) 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
Q

Define

robust software.

A

software that is capable of handling the unexpected without crashing, generating incorrect output or revealing sensitive data

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

Define

code vulnerability.

and why is this is a bad thing?

A

a flaw in a program that comprises security

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

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

What does

input validation do?

(2 things)

A
  1. Check if a user input meets certain criteria.
  2. Report an error or request the data be re-entered if needed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What does

sanitization do?

A

modify the user input to make it valid

e.g. trim off spaces of ensure uniform case

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

What does

authentication do?

A

ensure that the system is only accessible to users who can pass a security test

30
Q

What are some examples of

bad programming practices?

(6)

A
  • 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
Q

What are

code reviews

designed to do? (3)

A
  • spot instances of poor programming practice
  • fins any vulnerabilities in the code
  • check its efficiency
32
Q

What are the

two main types of code review?

A
  • review by another programmer (labour intensive and time consuming)
  • automated review (probably won’t identify every issue)
33
Q

What does the

operating system (OS) do?

(3)

A
  • 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
Q

What are the

three types of user interface?

A
  • graphical user interface (GUI) - windows, icons, menus and pointers
  • WIMP - e.g. Microsoft Windows or macOS
  • command line text interface (CLI)
35
Q

Define

process.

A

a program that is loaded into main memory and is being executed

36
Q

What are some examples of

scheduling algorithms?

(3)

A
  • first in, first out
  • shortest job first
  • round robin
37
Q

How does the scheduling program

first in, first out work?

A

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
Q

How does the scheduling program

shortest job first work?

A

The process which is closest to finishing goes next.

39
Q

How does the scheduling program

round robin work?

A

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.

Some processes have a higher priority than others and get more time slices.

40
Q

What are the

three types of bus?

A
  • address bus
  • data bus
  • control bus
41
Q

What are some characteristics of the

address bus?

  • carries?
  • direction?
A
  • 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
Q

What are some characteristics of the

data bus?

  • carries?
  • direction?
A
  • carries the value being read from or written to memory
  • bidirectional
43
Q

What are some characteristics of the

control bus?

  • carries?
  • direction?
A
  • 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
Q

What is

bus width?

A

the number of connections on a bus

greater bus width means larger number values can be communicated

45
Q

What is the purpose of the

clock?

A

send out electronic signals at regular intervals to all the other hardware components in order to synchronise their actions

the faster the clock, the more instructions the CPU can execute per second

46
Q

What is

clock speed measured in?

A

Hz

1Hz = 1 cycle per second

47
Q

What equation allows you to calculate the

clock period?

A

period = 1/frequency

48
Q

What are

three common types of secondary storage?

A
  • magnetic storage
  • optical storage
  • solid-state storage
49
Q

What are the positives and negatives of

magnetic storage?

(2+, 2-)

and what are some examples of this? (4)

A

+cheap
+large capacity
-slow access times
-fragile

e.g. hard drives, floppy disks, cassette tapes, video cassette tapes

50
Q

What are the positives and negatives of

optical storage?

(3+, 2-)

and what are some examples of this? (3)

A

+cheap
+lightweight
+portable
-slow access times
-prone to scratches

e.g. CDs, Blu-rays, DVDs

51
Q

What are the positives and negatives of

solid-state storage?

(5+, 2-)

and what are some examples of this? (3)

A

+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
Q

How is data stored on an

optical disc?

(2 steps)

A
  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
Q

How is data read from an

optical disc?

(3 steps)

A
  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
Q

How is data stored on a

magnetic disc?

(3)

A
  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 demanetised represents a 0.
55
Q

Tell me about

solid state storage.

(4 key points)

A
  • 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
Q

Define

instruction set.

A

the instructions that a CPU can execute

57
Q

Define

machine code.

A

the binary codes representing a program

58
Q

What are the key points about

assembly langauge?

(2)

A
  • it is a low-level language
  • each instruction is written as a short, memorable keyword called a mnemonic
59
Q

Why is

writing code in assembly language more difficult than a high-level language?

(3)

A
  • there are a very limited range of instructions
  • there are no strings, integers or real numbers
  • debugging can be more difficult
60
Q

What machine converts

assembly language to machine code?

A

an assembler

61
Q

What are some examples of

high-level languages?

(3)

A
  • python
  • visual basic
  • java
62
Q

What machine converts

high-level languages to machine code?

A

translators

63
Q

What are some key characteristics of

low-level languages?

  • readability?
  • portability?
  • tools?
  • uses?
  • speed?
  • ease of use?
  • memory use?
  • language features?
A
  • 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
Q

What are some key characteristics of

high-level languages?

  • readability?
  • portability?
  • tools?
  • uses?
  • speed?
  • ease of use?
  • memory use?
  • language features?
A
  • 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
Q

What does the

CPU consist of?

(4)

A
  • control unit (CU)
  • arithmetic logic unit (ALU)
  • instruction register
  • accumulator
66
Q

Describe the

fetch-decode-execute cycle in the CPU.

A
  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
Q

What are the

two different types of translator?

A
  • compiler
  • interpreter
68
Q

What are the characteristics of a

compiler?

  • source code processing?
  • reporting?
  • portability?
A
  • 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
Q

What are the characteristics of an

interpreter?

  • source code processing?
  • reporting?
  • portability?
A
  • 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
Q

What are the characteristics of

compiled programs?

  • speed of execution?
  • changes to source code?
  • source code availability?
A
  • execution is faster (than interpreted) because no translation is needed
  • source code must be recompiled
  • not available
71
Q

What are the characteristics of

interpreted programs?

  • speed of execution?
  • source code availability?
A
  • execution is slower (than compiled) because each line needs to be translated as it runs
  • needed to run the program with the interpreter