Topic 3 Flashcards

1
Q

von Neumann stored program

A

Includes:

  • memory unit : into which program instructions and data are loaded prior to being processed.
  • processing unit : decodes and executes program instructions fetched from memory one at a time.
  • input and output mechanism: to input programs and data and output the result of processing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

main memory

A

–> short term, work memory.
only holds the instructions and data that the CPU is currently using.

–> consists of a collection of storage location, each with a unique address.
a storage location can hold a program instruction of an item of data.

  • -> referred to as RAM.
  • -> volatile
  • -> primary storage because the CPU has fast, direct address to it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Central processing unit (CPU) : detailed

A

buses: work together to transfer data between the CPU, main memory and input/output devices.

control unit: fetches program instructions from main memory one a time, decodes them and directs the operations of the other parts of the system to execute them.

clock - synchronise the actions of the CPU,

ALU - performs arithmetic and logic operations on data.

Registers: also know as immediate access storage.
memory that is extremely fast.
some are general purpose others have specific functions.

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

CPU includes:

A
Buses
Control unit 
Clock
ALU 
Registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Clock

A

an electronic device that ticks at regular intervals and is used to synchronise the actions of other components of the CPU.

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

Control bus

A

signals are carried 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
7
Q

Address bus

A

holds the memory address of the memory location that the CPU needs.
(unidirectional).

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

data bus

A

transfers program instructions and data between memory and teh CPU.

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

Fetch - Decode - Execute

A

The Fetch stage

1) the CPU places the memory address of the next instruction on the address bus.
2) the control unit sends a read signal along the control bus to memory.
3) the content of memory location is transferred along the data bus to the CPU, where its stored in a register.

The decode stage
- the control unit decodes the instruction by looking it up in the CPU’s instruction set

The execute stage

  • the CU then carries out the instruction.
  • it instructs the ALU if calculations need to be performed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why secondary storage is needed

A

RAM is volatile.
it loses its contents when the power of switched off.

Secondary storage provides non-volatile storage that can be used to write and rewrite data, so that it does not vanish when the power is turned off.

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

differences between primary and secondary storage

A

primary

  • volatile and power dependent
  • short term
  • directly accessible by CPU
  • Limited storage capacity
  • Limited scope for expansion.

Secondary:

  • non volatile
  • long term
  • programs and data must be transferred to memory in order for them to be accessed by the CPU.
  • large storage capacity
  • can be expanded by using external device (USB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

advantages and disadvantages of optical

A

+ cheap yo produce
+ thin and lightweight
+ portable

  • slow to access
  • low capacity
  • prone to scratches
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

advantages and disadvantages of magnetic

A

+ high capacity
+ quick to access, providing the disk is defragmented periodically.

  • Has moving parts that will eventually fail.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

advantages and disadvantages of solid state

A
\+ quick to access
\+ no moving parts so reliable 
\+ quite 
\+ low power requirements 
\+ no need to defragment 
  • expensive
  • has a limited number of read write cycles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

magnetic storage

A

Magnetic media are coated with a substance that can be magnetised.

Magnetic storage technology works by magnetising parts of this substance as north and south poles to represent binary 1s and 0s.

Examples include: hard disk drive, tape drive and cassette.

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

optical storage

A

Optical media consists of a platter with a flat reflective surface.

Optical storage technology works by using a laser to burn ‘pits’ into the flat surface.

The reflective areas between pits are known as ‘lands’.

A laser is directed onto the medium’s surface.

When it hits land, a beam reflects (this is read as binary 1).

When it hits a pit, the beam does not reflect (this is read as binary 0).

Examples: CD and DVD.

17
Q

solid state / flash storage

A

Solid state media consists of silicon chips that feature a special kind of transistor called NAND flash.

This type of media is called ‘solid state’ because it has no moving parts.

Solid state technology works by using a large electric current to force electrons through a barrier trapping them in positions called pools.

A full pool - 0.

An empty pool - 1.

Examples include: SSD card, USB, SD memory card and flash storage.

18
Q

Embedded systems

A

features
hardware
firmware
IoT

19
Q

operating system (user management)

A
  • provides a user interface to enable users to interact with the computer.

access control: the OS uses log in name and passwords and or some form of biometric identification to authenticate users and control who can log in.

file permissions: control who can do what with each file
(read, write, execute, delete)

20
Q

utility programs (data compression)

A

data compression

purpose - to reduce the size of a file so that it takes up less space in secondary storage and is quicker to transfer across networks.

how it works - it repackages (lossless compression) or removes (lossy compression).
some of a file’s data to reduce its size

21
Q

robust software

A

a program is deemed robust if it can handle unexpected actions without crashing or producing incorrect output and if it free from vulnerabilities that can be exploieed by criminals.

22
Q

code reviews

A

purpose to a code review is:

  • to check that software adheres to agrees standards.
  • to find any instances of insufficient code
  • to identify potential vulnerabilities

how it works:

  • -> carried out by other programmers or by specialised software.
  • -> that checks the code to make sure it meets a pre-defined set of rules
  • -> detect bugs and security issues
  • -> may suggest ways to fix them
23
Q

audit trail

A

what is it:

  • helps improve accountability
  • by keeping track of who made what changes and when during the development process.
  • if a problem is discovered, it can be tracked back to its source and the code rolled back to a version before the flow was introduced.

version control software

  • -> often used alongside audit trails, especially when a team of programmers is working on a large program.
  • it uses a database to keep track of every modification to the code.
  • if a mistake is made, programmers can revert to an earlier version
24
Q

three things programmer can do to make their programs robust?

A

adhere to good programming practises

carry out regular code reviews

keep an audit trail

25
bad programming practises:
1) poor planning that does not take account of potential security issues 2) using a quick fix rather than taking time to solve a problem properly 3) poorly structured code that does not here to agreed standards. 4) insufficient testing
26
four things to look for in a code review?
errors in code code inefficiencies bad programming practises requirements are fully implemented
27
Low level language
Mnemonics. One line generates one instruction in machine code. Microprocessor specific. A very limited range of instructions is available. Every task, even the simplest, has to be built up from the smallest steps. There are no strings, integers or real numbers, just binary, so you have to decide how to represent your data. You also have to decide and manage where it is stored in memory.
28
high level language
English-like keywords. One line generates multiple instructions in machine code. Very abstracted instructions that are portable across different architectures, wherever there is a translator. Complex programming constructs (if, for) available for working at a more abstracted level. Enforced data types help manage storage.
29
interpreter
translates the high level code line by line into machine code. it is needed each time the program is run. + works across different platforms because the machine code is not sent, + simpler to test as it reads source and runs it. + can be easier to debug because source code is always available. - execution is slower - source code is public because you have to send it to whomever you want to run the program. - whomever wants to run the source code must have the interpreter for the language,
30
assembler
translates the mnemonics of assembly language machine-code instructions. very similar to machine code. there is one assembly code instruction for each machine code instruction.
31
compiler
translates the source code to a stand alone machine code program that can be executed by the processor. + can be optimised to run very quickly on the targeted CPU. + the source code is private because you don't have to send it to everyone you want to execute the file. + once compiled, the machine code us saved to disk in a file and its immediately ready to rum. - executable file is not portable across different platforms. - compilation is an extra step that is required each time the source file is changed - source code has to be recompiled to target each different type of CPU.
32
the OS: User management (GUI and CLI)
Graphical user interface: - use the wimp formatGraphical user interface (GUIs) Most GUIs use the WIMP format. Windows - programs that open in frames that can be moved around and overlaid. Icons - pictures to represent programs you can execute or actions you can do. Menus - lists of options to choose from Pointer - using a mouse to click on items. Command line interfaces (CLIs) -CLIs are commonly used by people who need to control the function of a computer, server or network. -There are no icons or pointers in a CLI. The user can only interact with the computer by typing in commands to be executed. -CLIs give the user more control over the function of the computer. -It's quicker. GUI Features - Windows, icons, menus, and pointers. Advantages - Intuitive, as icons (pictures) represent applications or tasks. Little if any interaction with the keyboard, so the user does not need to know how to type. Protects the machine itself by limiting what the user has access to. Disadvantages -Competes for system resources such as memory and CPU. CLI Features - User types keyword commands on a blank screen. Advantages -Can access complex system- level commands. Allows greater productivity, as a user can normally input more quickly typing than with a mouse. Uses fewer system resources than GUI. Disadvantages - User needs to learn the key commands.