Topic 3: Computers Flashcards

1
Q

Computer architecture

A

the hardware components it has and how they work together to execute programs.

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

Von Neumann architecture

A
  • A processing unit to decode and execute program instructions
  • Input and output mechanisms to input programs and data and output program results.
  • A memory unit which receives and loads data and program instructions before being processed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Keyfacts about main memory

A
  • short-term memory
  • collection of storage locations
  • referred tp as RAM
  • primary storage
  • Volatile
  • 4GiB to 32GiB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why the stored program concept enabled computers to become general purpose machines capable of performing a variety of different tasks

A

Computers could then be reprogrammed to carry out different tasks, because they were able to store program instructions and data in memory.

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

Advantaje of storing programs in memory

A

Enabled computers to be general purpose machines capable of carrying out lots of different tasks.

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

Describe how the CPU and main memory work together to run programs (4 marks)

A
  • Programs instructions and data are STORED IN RAM and TRANSFERRED/fetched one at a time TO THE CPU
  • where they are decoded and executed (in CPU).
  • Results of operations carried out in the CPU are STORED in/written to MEMORY.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CPU

A

hardware component that decodes and executes program instructions.

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

Clock

A

tiny quartz crystal that vibrates at a constant rate and synchronises the actions of the CPU

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

Control unit

A
  • fetches program instructions from main memory
  • decodes them
  • directs operations to the ALU if needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ALU (Arithmetic Logic Unit)

A

Performs arithmetic and logic operations on data.

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

Registers

A

Direct-access storage for instructions, results and data

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

Control bus

A

(bidirectional) carries signals between the CPU and other parts of the computer system

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

Data bus

A

(bidirectional) transfers program instructions and data between memory and CPU

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

Address bus

A

(unidirectional) holds address of the memory location that the CPU will read from or write to

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

Bandwidth in address bus

A

determines how much addressable memory there is

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

Reason why data bus needs to be bidirectional

A

Because CPU must read data and program instructions from main memory, and after write the result of the operation to memory.

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

Describe how the bandwidth of the address bus determines the size of the memory that a CPU can use

A

Each memory location has a unique binary address.
Each wire in the address bus represents one bit of the address, so the number of wires in the address bus determines how many unique addresses can be generated.

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

Fetch stage

A
  • The CPU places the memory address of the next instruction 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. And STORED IN REGISTERS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Decode stage

A

The CU looks up the instruction in the CPU’s instruction set.

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

Execute stage

A

The CU coordinates the actions of the other components of the CPU to carry out the operation. If an arithmetic or logic opeartion required ALU carries it out.

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

State the fetch-decode-execute cycle

A

Fetch: The next instruction to be executed is transferred from RAM to CPU
Decode: The CU decodes the instruction by looking it up in the CPU’s instruction set
Exectue: The CU carries out the instruction. It instructs the ALU of any necessary calculations.

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

If they ask: how program instructions stored in memory are processed by the CPU

A

Then state the fetch-decode-execute cycle

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

Primary storage

A
  • Volatile
  • Short term
  • Directly accessed by the CPU
  • Limited storage capacity (500MiB to 8GiB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Secondary storage

A
  • Non-volatile
  • Long-term
  • Programs and data must be transferrerd to main memory in order to be accesed by the CPU
  • Large storage capacity (4TiB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How primary and secondary storage work together

A
  • When a user opens a program it is loaded from secondary storage to main memory
  • Any data files that are opened for use in that application are also loaded into main memory
  • WHen the user saves a file, it is transferred from main memory to secondary storage
  • When the application is closed, it is removed from main memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Write data in Magnetic storage

A

an electromagnet in the read-write head magnetises the surface of the platter to one of the two polarities: north-south or south-north. These represent 1 or 0

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

Read data in Magnetic storage

A

the read-write head detects the magnetic state of the platter

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

Write data in Solid-state storage

A

an electrical current is applied to the transistor. This forces electrons through a barrier, trapping them in pools. A full pool represents 0 and an empty pool represents 1.

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

Read data in Solid-state storage

A

a small voltage is applied. If the electron pool is empty, the transistor turns on and a 1 is read out. If it is full, the transistor does not turn on and a 0 is read out

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

Write data in Optical storage

A

a laser is used to brurn the surface of the disk , changing its form to become more reflective or less reflective. Reflective areas are called lands, and less reflective areas are called pits. A land represents 1 and a pit 0

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

Read data in Optical storage

A

a laser beam is shone onto the surface of the disk. A pit reflects light more dimly than a land. The amount of light refleced off the surface is detected by a light sensor and translated into 1s and 0s

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

Magnetic storage used in

A

-Internal/external hard drives
- Tape drives

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

Optical storage used in

A
  • CD, DVD and Blu-ray drives
34
Q

Solid-state storage used in

A
  • Solid-state drives
  • USB sticks
  • SSD cards
  • Mobile devices and wearables
35
Q

Advantages of Magnetic

A
  • High capacity
  • Fast data access
36
Q

Advantages of Optical

A
  • Portable
  • Disks are cheap
37
Q

Advantages of Solid-state

A
  • Very fast data access
  • No moving parts
  • Low power
  • Quiet
38
Q

Disadvantages of Magnetic

A
  • Has moving parts that will eventually fail
  • Noisy
39
Q

Disadvatages of Optical

A
  • Slow to access
  • Prone to scratches
40
Q

Disadvantages of Solid-state

A
  • Relatively expensive
  • Has a limited number of read-write cycles
41
Q

Embedded systems

A

a small computer on a chip, that performs a dedicated task within a bigger system.

42
Q

Examples of embedded systems

A

A washing machines that regulates water usage according to size of load
- A drinks dispenser that sends a recorder request to the supplier when stock is running low

43
Q

Operating system

A

the progran that acts as an interface between hardware and software

44
Q

4 main tasks performed by an operating system

A
  • Process management
  • File management
  • User management
  • Peripheral management
45
Q

Process management

A

overseeing the execution of programs by the CPU and allocating each of them a share of main memory and CPU time

46
Q

File management

A

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

47
Q

User management

A

providing a user interface to enable users to interact with the computer

48
Q

Peripheral management

A

communicating with device drivers to control peripheral devices

49
Q

Round robin algorithm

A
  • Each process has a time slice bigger or smaller depending on its priority
  • Processes are on a queue, and the first one goes next to the CPU
  • During time slice, process has exclusive use of CPU
  • At the end of the time slice, if process is unfinished goes to the back of the queue.
50
Q

1 adv + 1 disadv of round-robin

A
  • All processes will eventually be comleted, because every process gets a turn
  • Processes may have to wait a long time to be completed, because there are a lot of them waiting in the queue.
51
Q

Describe how multitasking works on a computer with a single CPU

A

The OS shares CPU time between processes, so that each process gets CPU time. Processes are prioritised so that those designated as high priority get more processor time

52
Q

Utility software

A

a collection of small programs, which perform a specific task

53
Q

Data compression software

A

Purpose: to reduce file size
How it does it: it repackages or removes data

54
Q

File repair software

A

Purpose: To recover data corrupted by cyberattack
How it works: Scans damaged file, extracts as much data as possible, and stores is in a new usable file

55
Q

Disk defragmentation software

A

Purpose: To speed up acces to files stored on MAGNETIC drive
How it works: rearranges individual file blocks for each file so that they are stored in adjoining blocks

56
Q

Backup software

A

Purpose: To keep a copy of files

57
Q

Do solid state drives get fragmented?

A

Yes, they get fragmented, but it does not affect the data access speed

58
Q

Why fragmentation occurs?

A

When a file is saved, it gets split into blocks. Blocks belonging to one file are saved in adjoining sectors. But as files are changed, blocks save wherever there is a free space

59
Q

Consequences of fragmentation

A

Slows down read operations, because more disk accesses are needed.

60
Q

Anti-malware software

A

Purpose: to protect computer systems and data from damage caused by malware, such as viruses, worms and spyware.
How it works: use a database of patterns associated with a known malware, to detect if that file matches the pattern

61
Q

One reason to keep anti-malware software updated

A

To have the newest signatures of viruses in its data base. This is vital as new viruses are constantly released.

62
Q

5 utility softwares

A
  • data compression software
  • file repair software
  • disk defragmentation software
  • backup software
  • anti-malware software
63
Q

Code vulnerabilities

A

a program with hidden weaknesses which criminals can use to cause damage

64
Q

3 things programmers can do to make their program robust

A
  • adhere to good programming practices
  • carry out regular code reviews
  • keep an audit trail
65
Q

Bad programming practices

A
  • poor planning that does not take account potential security issues
  • using a quick fix rather than solve the problem properly
  • poorly structured code
  • insufficient testing
66
Q

Purpose of code reviews

A
  • to check that software adheres to agreed standards
  • to find any inefficient code
  • to find potential vulnerabilities
67
Q

Audit trails

A

Keeps track of who made changes and when

68
Q

Low-level languages

A

work directly with a computer’s hardware
e.g: Machine code, Assembly language
Use: to write drivers and firmware for embedded systems

69
Q

High-level languages

A

enable programmers to focus on their program’s logic, as they are closer to human languages as they use keywords such as ‘print’ or ‘if’
e.g: Java, Python
Use: to write most softwares

70
Q

3 disadv. and 1 adv. of low-level languages

A
  • difficult and time-consuming to use
  • few tools to help with maintenance and debugging
  • only for 1 type of machine, it may not work with another CPU
  • (adv) Interact directly with the hardware, enabling memory to be used efficiently
71
Q

3 adv. and 1 disadv. of high-level languages

A
  • are programmer-friendly
  • have tools that make maintenance and debugging easier
  • they will run in different CPUs
  • (disadv) are generally less memory efficient
72
Q

1 reason why program code developed in high-level needs to be translated

A

Instructions must be translated into machine code, because that is the only language the processor can execute

73
Q

Compiler

A
  • transfers data and program instructions directly from RAM to CPU and doesn’t need any time to translate the program, as it is already translated
  • machine code that can be executed by the processor
    e.g: .exe files
74
Q

Advantages of compilers

A
  • The translation is done once and as a separate process
  • The program is already in machine code, making process faster
  • Protects the software from competitors who would be able to see the source code
75
Q

Disadvantages of compilers

A
  • If it encounters errors, it carries on and reports error at the end. Programmers use error messages to identify the bug
  • You cannot change the program without going back to original source code
76
Q

Interpreter

A

translates the high-level code line by line into machine code
e.g: when you run a python program (F5)

77
Q

Advantages of interpreters

A
  • If there is an error, the interpreter reports it, stops and pinpoints the error so that the programmer knows where it has occurred
  • The code is not platform-specific and cun run on different os
  • Can be easily edited as it is always a source code.
78
Q

Disadvantage of interpreter

A
  • Every line has to be translated, therefore it is slower
79
Q

Assemblers

A

Translate the mnemonics of assembly language into machine code instructions.

80
Q

1 reason why program code in high-level must be translated

A

because that is the only language that the processor can execute.