Topic 3 Computers

studied byStudied by 27 people
5.0(2)
Get a hint
Hint

Stored Program Concept

1 / 34

35 Terms

1

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

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

RAM

  • Stores data and instructions relating to running programs

  • Volatile

  • Directly accessible by CPU

  • Numeric address for each memory location

New cards
4

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

Clock

  • Electrical pulse syncs computer components (in Hz)

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

New cards
6

Address bus

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

New cards
7

Data bus

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

  • Or from CPU to memory (data write)

  • Hence bidirectional

New cards
8

Control bus

Control information e.g.

  • Read/write signals

  • Status

  • Interrupt signals

  • Bidirectional

New cards
9

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

Decode

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

New cards
11

Execute

  1. Instruction is carried out

New cards
12

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

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

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

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

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

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

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

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

Operating System Functions: File Management

  • User permissions

  • File management functions

  • Organizing files into directories, folders, subfolders

New cards
21

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

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

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

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

User Interface

  • 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

Authentication

  • Mechanism for users to prove their identity

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

New cards
27

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

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

Robust Software

  • Handle unexpected input without crashing

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

New cards
30

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

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

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

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

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

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 11 people
... ago
5.0(1)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 2701 people
... ago
4.8(12)
note Note
studied byStudied by 3 people
... ago
5.0(1)
note Note
studied byStudied by 14 people
... ago
5.0(1)
note Note
studied byStudied by 32 people
... ago
4.0(1)
note Note
studied byStudied by 23 people
... ago
4.7(3)
note Note
studied byStudied by 37186 people
... ago
4.9(69)

Explore top flashcards

flashcards Flashcard (78)
studied byStudied by 10 people
... ago
5.0(1)
flashcards Flashcard (200)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (98)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (32)
studied byStudied by 31 people
... ago
5.0(3)
flashcards Flashcard (25)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (69)
studied byStudied by 61 people
... ago
5.0(1)
flashcards Flashcard (71)
studied byStudied by 4 people
... ago
4.0(1)
flashcards Flashcard (29)
studied byStudied by 10 people
... ago
5.0(1)
robot