Content of Computer systems

5.0(1)
Studied by 4 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/77

encourage image

There's no tags or description

Looks like no tags are added yet.

78 Terms

1
New cards

algorithm

process or set of rules to be followed or calculated to solve problems, especially by a computer

2
New cards

decomposition

breaking down a large problem into smaller, more manageable parts

3
New cards

abstraction

removing unnecessary details from a problem to allow focus on essential components

4
New cards

pseudocode

step-by-step descriptions of an algorithm written in simple english words using a code-like structure


5
New cards

why use pseudocode

  • planning before writing actual code

  • makes the logic easier to understand

  • reduces logical errors before implementation


6
New cards

characteristics of a good algorithm

(CITEE)

  • clear and precisely stated steps

  • allows invalid inputs (without crashing)

  • terminates at some point, when needed

  • efficient, and in as few steps as possible

  • easy to maintain and understandable by others (for modification)


7
New cards

sorting algorithms (3 types)

  • merge: splitting and rejoining in order

  • insertion: having two lists: unordered and ordered list

  • bubble: comparing adjacent values and swapping if needed


8
New cards

searching algorithms (2 types)

linear: comparing each value, one by one

binary: compares middle value, then uses > or < to half the number of values, repeat→ MUST BE IN ASCENDING/ALPHABETICAL ORDER FIRST

9
New cards

CPU

process data and instructions by constantly repeating the FDE cycle


10
New cards

CU

coordinates the activity of all other components and the flow of data and instructions


11
New cards

ALU

performs all arithmetic, logic and shift operations in the cpu

12
New cards

register, and all 5 dedicated registers

super-fast memory that temporarily store data


PC

CIR

MAR

MDR

ACC

13
New cards

PC (register)

stores the memory address of the next instruction to be fetched from RAM

14
New cards

MAR

stores the memory address to be fetched from RAM, may be instruction or data

15
New cards

CIR

holds current instruction, splitting it into opcode and operand

16
New cards

MDR

holds the data instruction that was fetched from main memory into the cpu

17
New cards

ACC

stores data currently being processed and the result of calculations or logical operations

18
New cards

CPU buses

a series of connectors between internal components

→ typically consist of 8,16,32,64

19
New cards

3 types of buses

  • control bus

  • data bus

  • address bus


20
New cards

5 different types of bus signals

  • memory read

  • memory write

  • bus request

  • bus grant

  • clock


21
New cards

computer

electronic device that takes input, processes data and delivers output

22
New cards

(FDE CYCLE) fetch stage

  • PC is checked

  • address stored in the PC is copied to the MAR

  • address is sent along address bus to main memory → waits to receive signal from control bus

  • CU sends a specific signal (e.g. read, plus, etc) along the control bus to main memory

  • data is then sent along the data bus to MDR

  • data in MDR copied into CIR

  • PC incremented by 1

→ fetch stage complete


23
New cards

operode and operand

operode: what to do

operand: what to do it to

24
New cards

(FDE CYCLE) decode stage

  • the instruction is decoded (which could be to load, plus, etc) and is to be stored into the acculumator


25
New cards

(FDE CYLE) execute stage

  • carries out the decoded instruction

may involve:

→ ALU for calculations or logical

→ data movement

→ branching / jumps


26
New cards

how a magnetic disk drive operates

  • a HDD contains many platters (disks), where they can spin at very high speed, and divided into sectors

  • read/write heads move across the disk to read and write data

  • data is written/read from the disk by magnetising different microscopic regions on the disk

  • one magnetic orientation represents a 1, and the other a 0

  • a whole block is read in one go



27
New cards

how cd’s operate

  • a disk such as a cd have bumps and flats on their surface, where they form a spiral from the centre to the outside

  • cd is spun so all data can be read

  • a laser is shone on the disk

  • the laser is reflected, and a sensor detects changes in reflectivity

  • bumps and flats represent the two possible bit values (1s and 0s)


28
New cards

clock speed and how it impacts performance

number of fde cycles per second


  • increased clock speed = more instructions can be executed per second


29
New cards

number of cores and how it impacts performance

number of processors in the CPU


  • more cores = more instructions can be executed simultaneously = improved multitasking




30
New cards

cache size and how it impacts performance

small, very fast memory inside the CPU that stores frequently used instructions


  • more cache = reducing the number of times CPU needs to access RAM (accessing ram is slower)


31
New cards

pipelining and how it impacts performance

allows overlapped processing of multiple instructions


  • one instruction can be fetched, whilst another is decoded, and another is executed → this overlapping increases overall speed


32
New cards

von neumann architecture

uses a single main memory (RAM) that stores both program instructions and data, that travels along the same buses

→ can lead to congestion

33
New cards

harvard architecture

separates the storage of program instructions and data, having two different memory locations

→ so they can be fetched simultaneously, improving performance

34
New cards

contemporary architecture

has included features such as onboard graphics, performance boosting mode and virtual cores

35
New cards

instruction set

complete list of machine code instructions a CPU is designed to execute

36
New cards

two types processors

CISC

RISC

37
New cards

CISC (complex instruction set computer) - type of processor

CISC CPU’s have a large set of complex instructions so tasks can be achieved in fewer lines of code

→ but some take multiple clock cycles


38
New cards

RISC (reduced instruction set computer) - type of processor

RISC CPU’s have a smaller set of simple instructions, each designed to be executed in one clock cycle

→ makes execution faster but may require more instructions overall

39
New cards

GPU (graphics processing unit)

co-processor with thousands of smaller cores designed for parallel processing

40
New cards

GPU uses (graphics related)

  • games and multimedia (rendering, animations, etc.)


41
New cards

GPU uses (not graphics related)

  • machine learning

  • scientific simulations

  • data anlysis

  • cryptocurrency mining


42
New cards

GPU vs CPU (number of cores)

GPU → thousands of small cores

CPU → small number of powerful cores

43
New cards

multicore processor and its pros and cons

has multiple independent cores on a single CPU chip, where each core can carry out its own FDE cycles

  • tasks can be split up, allowing multitasking and faster processing

    • HOWEVER, not all softwares are designed to use multiple cores


44
New cards

parallel system and its pros and cons

uses multiple processors or cores, working together on the same problem at the same time

  • greatly improves performance for tasks that can be split into sub-parts

    • HOWEVER, some problems cannot be parallelised because they must be executed sequentially


45
New cards

operating system

performs essential functions to keep a computer running efficiently

→ also managing hardware like the CPU

46
New cards

location of the OS

OS is a part of the boot strap in the ROM


when the computer is switched on: ROM loads the boot strap loader → boot strap loads the OS into RAM

47
New cards

4 parts of the OS

  • user interface

  • memory management

  • processor scheduling

  • interrupt handling


48
New cards

OS: user interface

hides the complexity of the hardware from the user by providing GUI or command line interface

49
New cards

OS: what does GUI stand for

graphical user interface

50
New cards

OS: memory management

managing the allocation of RAM to different programs

51
New cards

OS: paging and contiguousness

a memory management method that splits memory into equal-sized blocks called pages, each page having an address


→ it may be contiguous or not, meaning processes may be stored sequentially or randomly depending on free spaces available

52
New cards

OS: why is paging used in modern computers over segmentation

more efficient memory use as programs don’t need to be stored sequentially

→ but, some space may be wasted inside a page

53
New cards

OS: segmentation

divides memory into segments of different sizes based on program structure

54
New cards

OS: why is segmentation inefficent

leaves small unused gaps in memory that can’t easily be fulle dby other data

55
New cards

OS: what happens to performance if pages must be swapped between RAM and VM too much?

  • slows down the computer as VM access is slower than RAM access

  • disk thrashing


56
New cards

OS: interrupts + examples

a signal that tells the CPU to pause its current task and respond to something more urgent


  • printer runs out of paper

  • error occurs in program

  • scheduled interrupt from internal clock


57
New cards

OS: how interrupts happen

  1. CPU checks for interrupts at the end of current fde cycle

  2. CPU saves its current state by placing current register values into a stack

  3. CPU runs an interrupt service routine (ISR) to handle the interrupt

  4. after, the CPU restores its state by retrieving values from the stack back into registers

  5. processing resume


58
New cards

(true/false) interrupts dont have different priorities

false

59
New cards

processor scheduling

method by which the OS allocates CPU time to completing processes, ensuring multiple tasks appear to be running simultaneously

60
New cards

OS: why process scheduling is important

  • ensure fairness between processes

  • provide acceptable response time

  • maximise CPU utilisation



61
New cards

scheduling type: how round robin works

  • all jobs are allocated a time slice for when it can use the CPU

  • CPU takes first job in a first-in-first-out (fifo) basis

  • if the job is not completed by the end of the time slice, the remainder is moved to the end of the queue

→ next job

62
New cards

scheduling type: how “shortest remaining time” (SRT) works

  • the time completion for each job is estimated as it arrives

  • the job with the shortest remaining time is executed but this means that a shorter new job can take over from the current one


63
New cards

scheduling type: how “shortest job first” (SJF) works

→ similar to “shortest remaining time”

  • the time completion for each job is estimated as it arrives

  • the job with the shortest remaining time is executed but a shorter new job CANNOT take over from the current one, so the current is fully executed


64
New cards

scheduling type: how “multi level feedback queues” (MLFQ) works

  • OS creates multiple queues with different priority levels

  • if a job has a high CPU time, its moved to a lower priority queue

  • if a job has been sitting in a low priority queue for a long time, its automatically promoted to a higher priority queue


65
New cards

what does BIOS stand for


basic input output system

66
New cards

BIOS

boots up a computer by checks hardware for faults, runs a bootstrap loader, and loads the OS into RAM

→ stored in ROM


67
New cards

device driver

a program that provides an interface that allows communication between the OS and an external device

68
New cards

why are device drivers needed?

allows the operating system to communicate with (inputs and outputs) and control hardware devices

69
New cards

virtual machine

software that is used to emulate a machine


→ runs one OS inside another, to emulate (imitate) different hardware

70
New cards

5 types of OS

  • distributed (DoS)

  • embedded

  • multi-tasking

  • multi-user

  • real-time


71
New cards

TYPES OF OS: distributed OS

manages a group of networked computers as a single system, sharing resources and tasks

72
New cards

TYPES OF OS: embedded OS

a specialised, dedicated OS designed to perform a specific, singular task within a larger mechanism

73
New cards

TYPES OF OS: (choose) an embedded OS is stored in ROM / RAM, has a lot of / minimal RAM, and runs with unlimited / limited resources

ROM

minimal

limited

74
New cards

TYPES OF OS: multi-tasking OS

allows a single user to run multiple programs or tasks seemingly simultaneously by quickly switching processor time between them

75
New cards

TYPES OF OS: multi-user OS

allows multiple users to access a single computer and its resources seemingly simultaneously using different terminals

76
New cards

TYPES OF OS: real-time OS

designed to provide guaranteed processing and response time, for time-critical tasks


→ such as medical devices or industrial robots

77
New cards

why is it good that a real-time OS used in intensive-care units is stored in the ROM?

  • non volatile, so data will not be lost when power is switched off

  • read-only, so any critical programs or data cannot be changed or deleted


78
New cards