Unit 1.2 Flashcards

Memorise all again

1
Q

What is a compiler?

A

A compiler translates a whole program written in high level language into executable machine code all at once

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

What is a interpreter?

A

Translates code written in high level language to executable machine code line by line

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

What are advantages of interpreters?(2)
- Source could be run on…
- When error code is found…

A
  • Source code can be run on any machine with the interpreter
  • If a small error is found, no need to recompile the entire program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is lexical analysis?

A
  • All unecessary spaces and all comments are removed
  • Keywords, constants and identifies are replaced with tokens.
  • Example <identifier></identifier>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a symbol table?(2)
1 hint: Helps keep track of run…

A
  • Built by the lexer, contains every keyword and identifer in the program
    -Helps keep track of the run-time memory address for each identifier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Syntax Analysis?
1) Streams of tokens from the lexing stage are…
2) Each phrase iis parsed meaning…
3) If the phrase in not valid…

A
  • The streams of tokens from the lexing stage are split up into phrases
  • Each phrase is parsed which means its checked against the rules of the language
  • If the phrase is not valid, an error will be recorded
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are functions of the OS (Operating system?)

A
  • Provides user interface
  • Memory Management
  • Interupt handling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is paging (Memory Management)

A
  • Dividing memory into physical pieces, these are equal sizes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is segmentation?

A
  • Dividing memory into logical division, these are unequal sizes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are similarities between paging and segmentation? (2)

A
  • Both manage memory
  • Both use VM if RAM is full
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are interupts?

A
  • A signal being sent to a CPU indicating that a device/process needs attention or checked by the internal clock
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens in the CPU whilst an interput is happening?
(4 points)
1) CPU checks if the piroity of the interupt is…
2) If higher then…
3) Location of interupt is loaded back…
4) Contents are popped from the stack…

A
  • CPU checks if the interupt signal piroity is lower or equal to the current process. If lower then it carries on.
  • If its higher, it will stop and complete the current FDS cycle
  • Content of the CPU register is copied into a stack
  • The location of the interupt is loaded back into the PC
  • When everything is done, the contents are popped from the stack and loaded back into their registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a distributed OS?
Say its advantage as well

A
  • Controls the processing of a single job across multiple computers.
  • Allows all computers to be treated as one, increasing effiency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a multi-tasking OS?

A
  • Single processor is able to do more than one task simultanously by scheduing processor time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Embedded Operating Systems?

A
  • Software used to manage the device which is built into the device itself
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are Real-Time Operating Systems?

A
  • Systems that give a response in a guratenteed time frame
  • Seen in saftey-critical enviroments
17
Q

Where would you see Real-Time Operating Systems? (3)

A
  • Self driving cars
  • Aeroplane auto-piolet
  • Nuclear power stations
18
Q

What is a Virtual Machine?

A
  • A virtual machine is a software-based computer that runs inside another computer, allowing operating systems to run independently on the same physical hardware.
19
Q

What are advantages of Virtual Machines?
(3)

A
  • It can run multiple operating systems on one computer
  • Able to run old applications that are not compatiable on new devices
  • If a virus is detected, only the virtual machine is affected, not the whole OS
20
Q

What are disadvantages of Virtual Machines (2)

A
  • Programs will run less efficently
  • Expensive
21
Q

What is a Libary?

A
  • Languages with pre-written functions
22
Q

What is a Linker?
Relevant code…

A
  • relevant code needed to be included in the final version of the code. Its job is to combine the code
23
Q

What is a full backup? (Utility) (2)

A
  • A full copy of the orginal data
  • Requires a lot of time to do a full backup
24
Q

What is a incremental backup? (Utlity)
-Only backs up data…
- Faster to backup but…

A
  • Only backs up data that has been changed since the last backup
  • Faster to backup and takes up more space
25
Q

What is a diffrential backup? (Utlility)

A
  • Starts with a full backup then turns into incremental
  • Faster than incremental but larger
26
Q

Removes usel…

Replaces ineffient code with…

What does code optimisation do? (2)

A
  • Removes useless instructions
  • Replaces ineffiecnt code with code that does the same thibg but in a more effiient way