unit 2 Flashcards

1
Q

what are the functions of the OS?

A

user interface
memory management
interrupt handling
processor scheduling
file management

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

what is the purpose of a UI?

A

the OS hides the complexity of the hardware from the user by providing a user interface

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

why is memory management needed?

A

programs and their data need to be loaded into RAM
the OS must manage allocation of RAM to the different programs

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

what are the 2 types of memory management?

A

paging and segmentation

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

how does paging work?

A
  1. available memory is divided into fixed size chunks called pages
  2. each page has an address
  3. a process loaded into RAM is allocated sufficient pages but may not be contiguous
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how does segmentation work?

A

memory is divided into segments which can be of different lengths
segments can relate to parts of a program like a function

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

what are the benefits to paging?

A

As users move between applications, memory is dynamically allocated
Pages will be taken away from applications not in active use and granted to applications that are in active use

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

what are the disadvantages of paging?

A

can lead to internal fragmentation
unused space in a page is wasteful

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

what are the advantages of segmentation?

A

space efficient due to allocating space depending on the amount an application needs

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

what are the disadvantages to segmentation?

A

can lead to external fragmentation
physical gaps reduce the maximum size of new segments

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

what is virtual memory?

A

secondary data which acts as an extension of main memory

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

what is the purpose of virtual memory?

A

to create an illusion of larger memory and so the OS can offload data from primary memory into vm

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

how does virtual memory work?

A

when memory intensive applications exceed the available RAM the OS moves less frequently accessed pages to the hard disk

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

what is an interrupt?

A

a signal to the processor that stops its current task and performs a different task temporarily and transfers control to an ISR

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

what are the purposes of interrupts?

A

real time event handling - hardware errors
device communication - alerts from printers for example
multitasking - suspending processing in one application so that the user can switch to another

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

what are the steps of an interrupt?

A
  1. external device or software generates an interrupt signalling to the processor to stop its current task
  2. the interrupt handler decides if the interrupt needs to be dealt with now or later
  3. if now, the current contents of the processor registers are pushed onto a stack
  4. the processor fetches the right ISR
  5. the processor transfers controls to the ISR and is executed
  6. the processor restores the contents of the registers by popping the stack and continues the previous task
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what is an ISR?

A

a special function that handles a particular interrupt type

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

why do we need interrupt priority?

A

means the process can acknowledge and switch to resolving a higher priority interrupt
many things can go wrong at the same time

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

what is interrupt nesting?

A

the ability of the processor to handle interrupts within interrupts

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

why do we need interrupt nesting?

A

avoids potential conflicts and ensures system stability

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

what is scheduling?

A

the process of deciding which tasks to process, for how long and in what order

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

what are the aims of scheduling?

A

provides an acceptable response time to all users
to maximise the time the CPU is usefully engaged
to ensure fairness on a multi user system

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

what is preemptive scheduling?

A

allocates the CPU for time limited slots

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

what is non preemptive scheduling?

A

allocates the CPU to tasks for unlimited time slots

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
how does round robin work?
each job is allocated a time slice during which it can use the CPU's resources if the job has not finished by the end of its time slice the next job is allocated a time slice
26
how does shortest remaining time work?
time to completion is estimated as each new job arrives job with shortest remaining time to completion is executed
27
how does shortest job first work?
total execution time of each job is estimated on arrival the waiting job with the smallest total execution time is executed when the current job completes
28
how do multiple level feedback queues work?
created with different priority levels if a job uses too much CPU time it is moved to a lower priority queue processes can be moved to higher priority queues if they have waited too long
29
how does first come first served work?
job that arrives first is executed first and all new jobs join the end of the queue
30
what are the benefits of round robin?
all processes get a fair share of the CPU predictable good for time sharing systems
31
what are the drawbacks of round robin?
choosing the right time slice can be difficult can lead to a high turnaround time
32
what are the benefits of shortest remaining time first?
good for jobs with shorter burst times preemptive so can be aligned with CPU for best performance
33
what are the drawbacks of shortest remaining time?
requires knowing the burst time high context switching overhead due to preemption
34
what are the benefits of shortest job first?
minimises waiting time efficient and fast for short processes
35
what are the drawbacks of shortest job first?
requires knowing burst time of processes in advance starvation - long processes are restricted of CPU access as shorter jobs are completed first
36
what are the benefits of multi level feedback queues?
smaller tasks are prioritised creates a prioritisation system where similar sized tasks are queued together
37
what are the drawbacks of multi level feedback queues?
more complex than other algorithms setting the correct parameters can be complex
38
what are the benefits of first come first served?
simple and easy to understand fair in the sense processes served in order
39
what is an OS?
a fundamental software that manages hardware, provides common services for programs and acts as an interface between users and the machine
40
what is a distributed os?
run on multiple machines appearing as a single unit and co ordinates the processing of a single job across computers
41
what is an embedded operating system?
designed for specific tasks, a system running inside a device, has minimal features, programs held in ROM
42
what is a multi tasking os?
allows multiple tasks to run concurrently on a single processor manages system resources and allocates CPU time to different processes
43
what is a multi user os?
supports multiple users accessing computer resources concurrently efficiently manages resource allocation provides features for data security
44
what is a real time os?
designed for immediate data processing ensure tasks are processed in real time responds quickly to inputs
45
what is an open source os?
allows for major customisation device manufacturer can fine tune the OS to suit their devices
46
what is a mobile os?
smart phone is a computer with a multi tasking OS linked to specific hardware handles user interface and running applications
47
what is an example of a distributed os?
Hadoop designed to process big data in a distributed network
48
what is an example of an embedded os?
Internet of things dishwasher
49
what is an example of a multi tasking os?
window mac linux
50
what is the BIOS?
a piece of firmware stored on a chip on the motherboard that boots the computer at start up and intialises hardware loads the os into RAM
50
what is an example of a multi user os?
window mac linux
50
what is an example of a real time os?
tesla aerospace
50
what does BIOS stand for?
basic input output system
51
what is a device driver?
a piece of software that enables communication between an OS and specific hardware devices like printers
52
what is a virtual machine?
a software emulation of a physical computer/system operating system running inside another os
53
what are the benefits of a virtual machine?
provides isolation from host system can run multiple operating systems on the same computer shielding malware as VM is independent of the host so real device is not affected
54
what are the disadvantages of a virtual machine?
programs run less efficiently still need proper licenses to run the operating system
55
what is bytecode?
the intermediary code between source code and machine code
56
what is an advantage of bytecode?
do not have to rewrite and recompile every program they code portable so can run on any machine
57
how are virtual machines used in software testing?
create isolated test environments monitor the way their software affects system performance can create vms that act like they have older hardware more users can run this software
58
what is software split into?
system and application
59
what is system software?
software needed by the system to control hardware and run applications
60
what are some examples of system software?
operating system utility programs libraries translators
61
what is application software?
software designed to perform a specific task for the user
62
what are some examples of application software?
word processors, database management, web browsers, graphic interface,
63
what is utility software?
- software designed to help analyse, configure and optimise a computer - supports the os to be as efficient as possible
64
what are some examples of utility software?
disk defragmentation file management device driver security back up
65
how does the disk defragmenter work?
- large files stored on a magnetic hard drive split up across several disk locations - disk defragmenter reorganises the hard drive so that files are in sequential blocks - so files can be read faster
66
why do we need disk defragmentation?
fragmentation can slow down performance + causes rotational delay in order to move to different disk areas
67
how does automatic back up work?
- process tends to be automated - specifies where, when, what and how
68
what is a full backup?
copies anything identified as important typically all data time consuming + need space
69
what is an incremental back up?
only copy files that have been changed since las full back up
70
how does automatic updating work?
- runs in background detecting software update releases - fix patches
71
how does virus checker work?
- scans storage for viruses by comparing files to known virus definitions - software quarantines the file and isolates it to not cause further damage
72
why is compression software needed?
- reduce size of files - saves space reduces transmission time
73
what is application software?
software that performs a task to benefit the user
74
what categories is application software split into?
general purpose, special purpose, bespoke
75
what is off the shelf software?
ready made software available to anyone to purchase
76
what is bespoke software?
software that is custom created for a specific user
77
what is open source software?
software where anyone can access its source code open source licensed and free to use anyone can modify and sell it
78
what is freeware?
software that is free for anyone to use but source code is not available
79
what is closed source/proprietary software?
does not allow access to source code users must may person who owns copyright for a license
80
what is assembly code?
low level programming language that provides a human readable representation of machine code using mnemonics has a 1 to 1 correspondence hardware specific
81
what is an assembler?
a translator that translates assembly code into machine code which produces hardware specific object code
82
what is a compiler?
a translator which translates a high level programming language into machine code in one go any errors reported at the end
83
what is an interpreter?
a translator which translates high level code into machine code line by line
84
what is the difference between a compiler and intepreter, object code?
a compiler provides a separate object code interpreter does not generate file
85
what is a virtual machine?
entire operating systems running inside another operating system which emulates hardware and takes on the function of a machine
86
why do we use VMs?
a way to create isolated test environments leaving host OS unaffected great for developers, testing software on older hardware or different OS
87
what is bytecode?
a compact platform independent version of high level code intermediary step between source code and machine code
88
what are the stages of compilation?
lexical analysis symbol table syntax analysis semantic analysis code generation
89
what happens in lexical analysis?
- all unnecessary space and all comments are removed - keywords, constants and identifiers are replaced with tokens representing their function - symbol table is created: keeps track of run time memory address for each identifier
90
what happens in syntax analysis?
- stream of tokens from lexing stage is split up into phrases - each phrase is parsed: checked against rules of the language - error recorded if not valid
91
what happens in semantic analysis?
- checks for invalid programs - checks if identifiers have not been previously declared
92
what happens in code generation?
- compiler generates machine code - several passes
93
what happens in code optimisation?
- remove redundant instructions - replace inefficient code
94
what is a library?
a set of pre written and pre compiled functions which can be easily maintained and enhanced
95
what is the role of the linker?
needs to put appropriate memory address in place so that the program can call and return from a library function combine different code files and libraries into a single executable file
96
what is the role of the loader?
-loads executable file into main memory (RAM) so they can be run by the operating system