Topic 3 Computers

studied byStudied by 12 people
5.0(2)
get a hint
hint

Stored Program Concept

1 / 34

Studying Progress

0%
New cards
35
Still learning
0
Almost done
0
Mastered
0
35 Terms
1
New cards

Stored Program Concept

  • Instructions and data stored in the memory of the computer

  • Instructions retrieved from memory, executed in sequence

  • By processor that carries out logical + arithmetic operations from instructions

New cards
2
New cards

The Von Neumann Architecture

  • Main memory and central processing unit connected by buses

  • Data and instructions are stored in the same memory

  • Instructions can be treated as data and data can be treated as instructions

New cards
3
New cards

RAM

  • Stores data and instructions relating to running programs

  • Volatile

  • Directly accessible by CPU

  • Numeric address for each memory location

New cards
4
New cards

CPU

  1. Control Unit

    • Synchronizes components of the CPU, managing flow of data between these components and memory

  2. Arithmetic Logic Unit

    • Performs logical and arithmetical operations on data

  3. Registers

    • Small, fast memory units storing values CPU is working on, some specialized some generalized

New cards
5
New cards

Clock

  • Electrical pulse syncs computer components (in Hz)

  • Modern computers can achieve ~1 instruction per cycle using pipelining

New cards
6
New cards

Address bus

  • Carries address of data/instruction to be read/written from CPU to memory unidirectionally

New cards
7
New cards

Data bus

  • Carries data/instruction from memory to CPU (reading data/instruction)

  • Or from CPU to memory (data write)

  • Hence bidirectional

New cards
8
New cards

Control bus

Control information e.g.

  • Read/write signals

  • Status

  • Interrupt signals

  • Bidirectional

New cards
9
New cards

Fetch in FDE Cycle

  1. Address of next instruction placed on address bus

  2. Control Unit issues read signal to read the next instruction from memory → places this signal on the control bus

  3. Instruction at the address in RAM is placed on the data bus

  4. Instruction travels from RAM to the CPU along the data bus

New cards
10
New cards

Decode

  1. Control unit decodes the fetched instruction so that it can be executed

New cards
11
New cards

Execute

  1. Instruction is carried out

New cards
12
New cards

Primary memory

  • Directly accessible by the CPU

  • Stores boot (start-up) instructions (ROM) or data/instructions for running programs (RAM)

  • Internal (inside the computer)

  • Faster access

  • Volatile (RAM) or non-volatile (ROM)

New cards
13
New cards

Secondary

  • Not directly accessible by the CPU

  • Internal or external

  • Stores files/software relating to programs that are (generally) not currently running

  • Slower access

  • Non-volatile

  • HDDs and SSDs

New cards
14
New cards

SSDs

  • Secondary memory

  • Faster read/write times

  • No moving parts

  • More expensive than HDD

  • Lower capacity than HDD (e.g. 500 GB)

  • Less power consumption

  • Less heat generation

  • Uses flash memory (transistors) (non-volatile)

  • Current passed through each transistor can store charge to represent 0 or 1

  • Limited number of read/write cycles so they slowly wear out after you've used them for a long time.

New cards
15
New cards

HDDs

  • Secondary memory-

  • Magnetic coating on surface can be changed to represent 1 or 0

  • High capacity (e.g. 2 TB)

  • Concentric tracks

  • Slower access (higher latency) due to moving parts

  • Higher power consumption due to moving parts

New cards
16
New cards

Optical disks

  • Secondary memory

  • Uses low-powered lasers to read and write data, causing different reflections interpreted as a 0 or 1

  • High-powered lasers etch Pits and lands to represent 0 or 1 on a reflective surface

  • Single spiral track (like a vinyl record)

  • Low capacity compared to SSD and HDD (e.g. 5-50 GB)

New cards
17
New cards

Embedded Systems

  • Designed for one specific function

  • Built-in to another machine

  • Inputs e.g. buttons, sensors

  • Outputs e.g. screens, audio, actuators

  • Has microcontroller with CPU for processing (and own memory)

    • Flash memory (ROM) is non-volatile so stores data and instructions: ‘firmware’

    • RAM is volatile and stores temporary input data from user and sensors

New cards
18
New cards

Internet of Things

  • Physical objects equipped with sensors, processors and software that are able to connect to the internet and exchange data

  • Concerns with security (e.g. vulnerability to hackers taking control/intercepting)

  • Concerns with privacy (e.g. Extent of data collection and consent, ethical usage)

New cards
19
New cards

Operating System

  • Controls hardware of a computer system and how other programs use it

  • Has a UI for human user communication and use

  • Composed of many separate programs with different functions

  • Also has utility programs for management

New cards
20
New cards

Operating System Functions: File Management

  • User permissions

  • File management functions

  • Organizing files into directories, folders, subfolders

New cards
21
New cards

Process Management

  • Deciding when and which processes use the CPU through scheduling

    • Hence can multitasking

  • Make sure a process does not overwrite the memory address of another process

New cards
22
New cards

Peripheral management

  • For devices that are not part of the main computer system

  • OS manages communication between computer and peripheral using a device driver (small program containing instructions)

  • Can allocate the device a small area of memory

  • Can be updated to remove bugs or incorporate new types of hardware

New cards
23
New cards

Memory management

  • OS allocates a separate address space to each running process

  • OS protects memory so one process cannot access the memory of another

  • Hence several programs can run simultaneously

New cards
24
New cards

Virtual Memory

  • The address space allocated to each running process is a virtual address

  • OS can swap data/instructions for a running process from RAM and store it temporarily on the disk even though the process is still running

    • Because the OS stores a table which maps virtual to physical addresses

    • When a process uses their virtual address to request data, the OS looks up the physical address using that table

    • Since processes only see their virtual address, the physical address can be in cache, RAM or the disk

  • This is done when the process has not been used for some time to make room for a new process.

  • The process can be swapped back into RAM when it is needed.

  • In this way the operating system can run more programs than it would be able to if it only used RAM to store process data.

New cards
25
New cards

User Interface

<ul><li><p>The means by which users easily interact with the OS</p></li><li><p><strong>Command Line Interface:</strong> Typed commands so <strong>more difficult to use</strong> but <strong>more precise control</strong> and <strong>less memory/CPU usage</strong></p></li><li><p><strong>Graphical User Interface:</strong> Windows, buttons etc. so <strong>easier to use</strong> but <strong>less precise control</strong> and <strong>greater memory/CPU usage</strong></p></li></ul>
  • The means by which users easily interact with the OS

  • Command Line Interface: Typed commands so more difficult to use but more precise control and less memory/CPU usage

  • Graphical User Interface: Windows, buttons etc. so easier to use but less precise control and greater memory/CPU usage

<ul><li><p>The means by which users easily interact with the OS</p></li><li><p><strong>Command Line Interface:</strong> Typed commands so <strong>more difficult to use</strong> but <strong>more precise control</strong> and <strong>less memory/CPU usage</strong></p></li><li><p><strong>Graphical User Interface:</strong> Windows, buttons etc. so <strong>easier to use</strong> but <strong>less precise control</strong> and <strong>greater memory/CPU usage</strong></p></li></ul>
New cards
26
New cards

Authentication

  • Mechanism for users to prove their identity

  • e.g. Username + password, biometrics, MFA

New cards
27
New cards

Scheduling

  • How the OS decides which processes can use CPU

  • OS Swaps processes in and out and give each a certain amount of time (time-slicing)

  • Time-slicing gives the process exclusive use of the CPU

  1. Round-robin: Queue system, fair policy

  2. First come first serve: Reduce total waiting time

  3. Priority scheduling: Highest priority use first

New cards
28
New cards

Utilities

  • File repair: Detect and correct errors in files (if possible).

  • Backup: Creates a copy of files so that they can be restored if the original file is lost or damaged

  • Data compression: Creates a new version of files using fewer bits than the original.

    • Compression saves disk space, but it takes time to compress and decompress files.

    • Files need to be decompressed before they can be used again.

  • Disk defragmentation: Over time, data on disks becomes split up into on different parts of the disk. This slows the system down. A defragmentation utility reorganizes programs so all their parts are next to each other.

  • Anti-malware: Detect, and quarantine or remove malware threats.

New cards
29
New cards

Robust Software

  • Handle unexpected input without crashing

  • Does not reveal sensitive information, even when something goes wrong.

New cards
30
New cards

Methods of Developing robust software

Audit trails

  • Keep track of all changes made and who made them

    • More accountability

    • Can roll back to working version before an error

Code reviews

  • Peer review

    • More experienced programmer checks for bad practices, security vulnerabilities, inefficient code and adherence to requirements

    • Time consuming, labour intensive

  • Automated review

    • Special program, cheap

    • May not spot some times of problems

New cards
31
New cards

Consequences of security vulnerabilities

Criminals exploit vulnerabilities to:

  • Damage or destroy data or computer systems

  • Gain access to sensitive information such as passwords or credit card numbers

New cards
32
New cards

High-level Languages

  • Like human language → Easier to understand

  • Need compilation or interpretation before execution

  • More portable, runs on different architectures

  • Have libraries for common tasks e.g. UIs, buttons

  • Less control as one instruction can be several machine instructions

  • Good for general tasks when:

    • Efficiency and precision less important

    • Standard libraries are required

    • Low level would be complex for e.g. UIs

New cards
33
New cards

Low-level languages

  • Assembly/machine code

  • No translation needed

  • Each instruction is a machine instruction

  • Runs faster, uses less memory

  • Always needs many lines of code

  • Very difficult to understand

  • Not portable, code written for only one architecture

  • Good for real-time systems when:

    • Need efficiency and precision

    • Controlling hardware, device drivers

New cards
34
New cards

Compilation

  • Translated:

    • In one go

    • Before the program runs

    • Once

  • Produces a new (.exe) file

  • Runs faster

  • Needs to be recompiled if:

    • Run on different OS

    • Program is changed → less portable

New cards
35
New cards

Interpretation

  • Translated:

    • Line by line

    • Every time it is run

    • While the program runs

  • No new file

  • Runs slower

  • Can run on different OS if have interpreter → more portable

New cards

Explore top notes

note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 52 people
Updated ... ago
4.5 Stars(2)
note Note
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 17 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 34 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 133159 people
Updated ... ago
4.8 Stars(680)

Explore top flashcards

flashcards Flashcard77 terms
studied byStudied by 26 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard58 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard32 terms
studied byStudied by 214 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard68 terms
studied byStudied by 26 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard165 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard60 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 39 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard45 terms
studied byStudied by 1095 people
Updated ... ago
5.0 Stars(2)