Systems software and software development Flashcards

1
Q

State functions of OS

A

Memory management (paging, VM, allocating memory etc.)
Provide a (user) interface
Manage hardware/peripherals
Manage CPU usage / handles interrupts
Provide system security
Provide platform to run other software
Provide utilities for system maintenance

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

What is virtual memory

A

Memory content divided into pages
Pages not needed get moved to VM
VM is an area on a secondary storage device
When required, pages are moved from VM back into RAM

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

What is paging

A

Paging is fixed size / physical divisions (units)

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

What is segmentation

A

Segmentation is dividing memory logically (variable size)

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

What is an interrupt

A

A signal to the processor indicating a device/process needs attention

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

Describe the process of receiving interrupts

A

-Complete current FDE cycle
-Check priority of incoming interrupt
-If it’s a higher priority than the current task…
-…contents of registers are stored in memory…
-…in a stack
-…relevant interrupt service is loaded
-… by changing PC to memory location of ISR
-…when ISR (Interrupt Service Routine) has completed, the previous state is popped from the stack…
-…and loaded back into registers

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

State the scheduling algorithms

A

First come first served
Round Robin
Multi-level feedback queues
Shortest job first
Shortest time remaining

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

When is the scheduling algorithm “first come first served” suitable

A

When jobs are dispatched FIFO, jobs are equal priority and equal processing time

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

What is open source software

A

Source code is freely available, for others to amend

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

Explain an advantage of using open source software for a company

A

A lot of the core functionality needed is already available, so the company just has to make amendments/additions specific to their system, saving time and money

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

What is closed source software

A

Closed source software is distributed in binary form only/source code is not freely available, and there are licensing conditions restricting the redistribution/no permission to amend program

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

State the disadvantages of custom-written software

A

Wait time is long, large cost, help not easily available (no user community), has not been trial and tested, there are likely to be other off-the-shelf alternatives

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

What is RTOS

A

Processor will make decisions based on changes and take action immediately (within a small fraction of a second)

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

What is an advantage of RTOS over non-RTOS, stating an

A

RTOS gives a guaranteed response time
Non-RTOS might be busy might be busy dealing with other tasks and may respond once it’s too late
Needed in systems which need to respond to changes immediately, such as in self-driving cars (eg. person steps in front of car)

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

What is an embedded system

A

Software used to manage device
Which is built into the device itself
Stored in device’s ROM so cannot be changed
Specific to hardware/purpose

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

What is a distributed OS, and what tasks might it be used for

A

Allows multiple computers to work together on a single task
Used for computationally intensive tasks (textbook)

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

What is a multitasking OS

A

Can run multiple programs simultaneously

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

What is a multi-user OS

A

Allows multiple users to use a system and its resources simultaneously (this does not mean just allowing multiple accounts)

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

What is a virtual machine

A

A piece of software that behaves in the same way as an actual computer.
A theoretical computer which provides an environment in which a translator is available
Uses an interpreter to run intermediate code

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

State the advantages of virtual machine

A

-reduced hardware costs
-improved security by keeping all software running from one physical device
-easier/cheaper to manage as only one physical device runs programs
-can add/remove resources
-no direct access to hardware
-resources can be used more flexibly between the machines

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

What is intermediate code

A

Is simplified code that…
…is between high level & machine code
…is produced by compiler
…runs on any computer
…allows portability between machines
Not machine code, cannot be read by CPU, but still a similarly efficient representation of a program. Any device running appropriate VM can read this intermediate code, while machine code is hardware specific (textbook)

22
Q

State advantages of intermediate code

A

Allows sections of code to be written in different languages…
…by different programmers
…suitable for specific tasks
Error free
Protects source code

23
Q

What is an assembler

A

A program that translates assembly code into machine code/object code
Useful for developers

24
Q

What is a compiler

A

A program that translates high level language into hardware specific machine code/object code.
Creates an executable file and compiles the whole program at once, and returns all the errors (not MS)

25
Stages of compilation AO1
Compiler is effectively a group of programs Lexical analysis, syntax analysis, code generation and optimisation Linker used to combine object code with the library code to make the final executable
26
Stages of compilation, first stage AO2
Source code is inputted into compiler program First stage is lexical analysis in which… …comments and whitespace are removed …variables and subroutines are stored in a symbol table …which also holds data such as scope and data type …code is converted into a series of tokens Series of tokens and symbol table is passed onto the next stage, syntax analysis…
27
Stages of compilation, second stage AO2
…code is checked to ensure that it follows the rules of the language …errors are generated (reported as a list) when rules are broken If no rules are broken, it is passed onto code generation…
28
Stages of compilation, third stage AO2
…object/machine code is created …may be inefficient …main program source code will have contained lines importing the library code …a program called a linker can incorporate the code from the library with the main program …into a single executable program
29
Stages of compilation AO3
Lexical analysis necessary to put code into format which can be read and processed by a syntax analyser Syntax analysis is necessary to ensure code meets all structural rules of the language, so guaranteeing it will run, though maybe not as expected Code generation is necessary to turn code into a format that the processor can understand Optimisation is not necessary, but improves efficiency Linking is necessary to ensure library code is incorporated into the final program
30
What are linkers
A linker links the main program to software libraries (1) by either including them in the final executable code (1) or by getting the executable code to point to the external libraries (1) to form a single executable file (1)
31
What are loaders
Part of the operating system Loads an executable file into memory… …from secondary storage Loads the required software libraries
32
What are libraries
Libraries are ready compiled programs (1), grouped in software libraries (1) which can be loaded and run whenever (1)
33
What are advantages of libraries?
Advantages of libraries: saves time/money as it is prewritten, draws on expertise of other programmers, pre-tested, can have been written in a different language
34
What are disadvantages of libraries
Disadvantages: may increase size of compiled file as library contains many routines that aren’t being used, not written by the programmer so introduces uncertainty
35
Compiler > Interpreter
Object code can be saved on a disk and run whenever required without need to recompile Object code executes faster than interpreted code Object code can be distributed or executed without compiler present Object code is more secure, cannot be read without a great deal of reverse engineering
36
In what situation is a compiler appropriate
Overall, compilers are appropriate when a program is run regularly, with occasional change. Also if distributed / sold since the source code is not present
37
Interpreter > Compiler
Platform independence (source code can be run on any machine with appropriate interpreter) Useful for program development, no need for lengthy recompilation each time error is discovered
38
Define utility software
Utility software performs a specific task usually related to the upkeep of a system
39
File management purpose and uses
Purpose - manages/organises data storage Uses - moving/deleting files/folders, manage storage of software/allows access to files
40
Hardware drivers purpose and uses
Purpose - software that allows for communication between the operating system and hardware device (peripheral) Uses - to configure hardware, used to install a new keyboard, mouse etc.
41
Backup utilities purpose and uses
Purpose - automatically makes copy of files, storing them in a different location in case of loss/corruption Uses - to make incremental backups
42
Disk defragmenter purpose and uses
Purpose - will reorganise a magnetic hard disk so that files which have been split up blocks and stored all over the disk will be recombined into a single series of sequential blocks Uses - makes reading a file more rapid relatively
43
Difference between system software and application software
System software controls the hardware (eg. any function of OS) Application software allows the user to do something useful, complete a specific task
44
Assembly modes of addressing
Direct Indirect Immediate Indexed
45
Use cases for assembly language
Quicker / more efficient to translate Makes more efficient use of CPU/memory/system resources Gives programmer direct control over hardware/memory Code might be written for a specific architecture Compilers/interpreters may not be available
46
Assembly vs high level
Assembly language uses mnemonics ● HLL uses English-like words Assembly language uses an assembler to convert to machine code ● HLL uses a translator (compiler/interpreter) to convert to machine code Assembly language is a one-to-one conversion to machine code ● HLL may produce multiple lines of machine code per line of code // one-to-many Assembly language requires more knowledge of the processor // allows direct control of the processor ● HLL provides more abstraction // requires less knowledge of the processor Assembly language is likely to be specific to the processor type used // is machine dependent ● HLL is portable // is machine independent
47
Briefly describe the structure of assembly code
Three columns: labels, opcode, operand Uses mnemonics
48
Extreme programming
The programming stage is the main focus / priority Is a form of agile development Includes planning, design, code, test Testing is focused throughout development Prioritises code quality... ... over documentation Encourages the use of pair programming
49
Waterfall lifecycle
Includes analysis, design, implementation/programming, testing, evaluation (accept any sensible variant of these phases) Each phase is moved down in turn // linear process Phases can be revisited back in turn
50
Spiral model
Incremental design Includes planning, design, programming and evaluation At the end of all 4 phases it repeats Each phase usually adds a new element to the problem Is used to manage risk Prioritises riskiest elements first