Section 2: Systems software Flashcards

1
Q

What is an operating system?

A

An operating system is a program or set of programs that manages the operations of the computer for the user, acting as a bridge between the user and the computer’s hardware since a user cannot communicate with hardware directly.

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

Where is the operating system held?

A

The operating system is held in permanent storage.

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

What are the 5 basic functions of an operating system?

A

5 basic functions of an operating system:

  • Processor scheduling
  • Interrupt service routines
  • Memory management
  • Management of input and output
  • File management
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does an operating system manage memory?

A

The operating system simultaneously allocates specific areas of memory to programs and files when they’re opened.

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

What is logical memory?

A

Logical memory is the virtual memory allocated in secondary storage.

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

What is physical memory?

A

Physical memory is the memory stored in RAM.

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

How does a paging system work?

A

In a paging system, memory is divided into spaces of 4Kb each. A process currently held in memory could be held in several contiguous pages in logical memory, but physically they may be non-contiguous. A page table uses mapping to store a link between physical memory and logical memory.

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

What is an interrupt?

A

An interrupt is a signal from a software program, hardware device or internal clock to the CPU.

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

When does an interrupt occur? (Software, hardware and clock)

A

A software interrupt occurs when an application program terminates or requests certain services from the operating system.
A hardware interrupt may occur, for example, when an I/O operation is complete, or an error occurs.
A clock interrupt occurs on a regular timer to indicate that a process has had too much time spent on it and the next one needs to be worked on. This is what allows multi-tasking to take place.

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

What happens when the CPU receives an interrupt signal?

A

When the CPU receives an interrupt signal, it suspends execution of the running program or process and disables all interrupts of a lower priority. It then puts all values of the program counter and of each register into the system stack, while an interrupt service routine is called to deal with the interrupt.

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

What is the descending order of priority for interrupts?

A

Priority for interrupts:

  1. Power fail interrupt
  2. Clock interrupt
  3. An I/O device has finished its job or requires service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the objectives of the processing scheduler?

A

Objectives of the processing scheduler:

  • Be fair to all users on a multi-use system
  • Maximise throughput
  • Ensure hardware resources are kept as busy as possible
  • Provided acceptable response times to the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does round robin scheduling work?

A

In round robin scheduling, processes are dispatched on a first in first out (FIFO) basis, with each process in turn being given a limited amount of CPU time called a time slice or quantum.

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

What are the objectives of a multi-level feedback algorithm?

A

Objectives of a multi-level feedback algorithm:

  • Give preference to short jobs
  • Give preference to I/O jobs
  • Separate processes into categories based on their needs to the processor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does the operating system manage backing storage?

A

The operating system is required to keep a directory of where files are stored so that they can be quickly accessed. Similarly, it needs to know which areas of storage are free so that new files or applications can be saved.

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

How does the operating system control peripheral management?

A

The operating system communicates with I/O devices to ensure that they are suited to the function they’re requesting to be used for and then sends it the correct data that it needs to carry out its function.

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

What is a distributed operating system?

A

A distributed operating system is a form of parallel processing in which the load is spread over multiple computer servers.

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

What is a multi-tasking system?

A

A multi-tasking system is a system that can run several programs simultaneously, each stored in the main memory.

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

What are the features of an embedded system found in a household appliance?

A

Features of an embedded system in a household appliance:

  • Minimal user interface comprised of buttons, dials and/or a small screen
  • Will accept input from sensors and send output to control devices
  • Complex memory management is not required as there is very little ram
  • Not any permanent data storage devices to be managed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the features of a real-time (embedded) operating system?

A

Features of a real-time operating system:

  • Must respond very quickly to inputs or sensors
  • Must be able to deal with many inputs simultaneously
  • Must have “failsafe” mechanisms designed to detect and take appropriate action if a hardware component fails
  • Must incorporate redundancy i.e. if one component fails it must automatically switch to backup hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the fundamental purpose of BIOS?

A

The fundamental purpose of BIOS is to initialise and test the system hardware components and load the operating system from the hard disk into RAM.

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

What is a device driver?

A

A device driver is a computer program that provides a software interface to a particular hardware device.

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

What is a virtual machine?

A

A virtual machine can be defined as any instance where software is used to take on the function of the machine, including executing intermediate code or running an operating system within another to emulate different hardware.

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

What are the two classes of software?

A

The two classes of software are systems software and applications software.

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

What is systems software?

A

System software is the software needed to run the computer’s hardware and application programs.

26
Q

What are 4 basic examples of system software?

A

4 basic examples of system software:

  • The operating system
  • Utility programs
  • Libraries
  • Translators
27
Q

Where is the OS located?

A

The OS lies between the applications software and the hardware.

28
Q

What is utility software?

A

Utility software is system software designed to optimise the performance of the computer by performing tasks such as backing up files or defragmenting a disk.

29
Q

What is a disk defragmenter?

A

A disk defragmenter is a program that will reorganise a magnetic hard disk so that files which have been split up into blocks and stored all over the disk will be recombined in a single series of blocks.

30
Q

What 4 things does an automatic backup utility allow the user to specify?

A

Automatic backup utilities allow the user to specify:

  • Where they want to store the backup (the destination)
  • What they want to backup (the sources)
  • How they want to run the backup (full backup or mirror backup)
  • When they want to run the backup (scheduled or manual)
31
Q

What is the difference between a full backup and a mirror backup?

A

A full backup zips the files being backed up, whereas a mirror backup does not zip them and simply copies the files.

32
Q

What is compression software?

A

Compression software is a type of utility program that compresses the size of a file in order to make it easier to up/download and also allows files to take up less room on the hard drive.

33
Q

What is general-purpose software?

A

General-purpose software is a type of application software that can be used for many different purposes e.g. Microsoft Word can be used to write a book, send a letter, make a leaflet, etc.

34
Q

What is special-purpose software?

A

Special-purpose software is a type of application software performs a single specific tasks or set of tasks e.g. fingerprint scanning systems or payroll systems.

35
Q

How does bespoke software compare with off the shelf software?

A
  • Bespoke is more costly and requires expertise to analyse document requirements
  • Bespoke software’s features are customised to user requirements and other features can be added as needs change
  • Bespoke could take a long time to develop, whereas off the shelf is readily available
  • Bespoke may contain errors, whereas off the shelf is thoroughly tested and error free
36
Q

What are the features of an open source software?

A
  • Software is licensed for use, but there is no charge for the license
  • Software must be distributed with the source code so that it can be modified
  • Developers can sell the software they have created
  • Any new software created from open source software must also be open
37
Q

What is closed source/proprietary software?

A

Closed source/proprietary software is software where the licence to use the software is sold, rather than having the source code or the software itself publicly available. It will have restrictions (e.g. how many people can use it at once per licence) the company who wrote/own the software will have a copyright on it and often intellectual property rights.

38
Q

What is an assembler?

A

An assembler is a type of translator which is used to convert mnemonics in low-level assembly language into machine code.

39
Q

What are the advantages of an assembler?

A

Advantages of an assembler:

  • No need for translation software at run-time
  • Code is executed very quickly
  • Code is usually optimised
  • Original source code is kept secret (as processor only needs the machine code to run the program)
40
Q

What are the disadvantages of an assembler?

A

Disadvantages of an assembler:

  • Hard to write code code in assembly language
  • Code needs to be re-assembled when it is changed
  • Designed only for a specific type of processor
41
Q

What is a compiler?

A

A compiler is a type of translator which translates high-level code into object code, and then into machine code.
The whole program is translated to machine code before it is run.

42
Q

What are the advantages of a compiler?

A

Advantages of a compiler:

  • No need for translation software at run time
  • Code is executed quickly
  • Code is usually optimised
  • Original source code is kept secret (as the processor only needs the object and machine code to run the program)
43
Q

What are the disadvantages of a compiler?

A

Disadvantages of a compiler:

  • Program will not run unless there are errors, sometimes making it harder to write the code
  • Full program needs to be re-compiled if changes are made to the code
  • Designed only for a specific type of processor
44
Q

What is an interpreter?

A

An interpreter is a translator which translates high-level code into machine code.
The program is translated line-by-line as the program is running.

45
Q

What are the advantages of an interpreter?

A

Advantages of an interpreter:

  • Easy to write source code as the program will always run, stopping once an error is found
  • Code does not need to be recompiled when it has been changed
46
Q

What are the disadvantages of an interpreter?

A

Disadvantages of an interpreter:

  • Translation software is needed at run-time
  • Speed of execution is slower
  • Code is not optimised
  • Source code is needed to translate the program
47
Q

What is the purpose of bytecode when translating code?

A

The purpose of bytecode is to act as an intermediate version of the code between the source code and the machine code, so that when the code has been translated it can be run on many different platforms.

48
Q

How can bytecode be used, including a compiler and an interpreter, using the example of Java?

A

Steps taken for a Java program to be translated:

  • Entire source code is translated into bytecode using a compiler
  • Bytecode is translated into machine code at run-time using a bytecode interpreter
49
Q

What are the 3 stages of compiling a program?

A

3 stages of compiling a program:

  • Lexical analysis
  • Syntax analysis
  • Code generation and optimisation
50
Q

What occurs during lexical analysis? (list of points)

A

Functions performed in lexical analysis:

  • Superfluous spacing is removed
  • Comments are removed from the program
  • Simple error-checking is performed (though NOT checking for misspelled keywords or undeclared variables)
  • Keywords, constants and identifiers are replaced by ‘tokens’ (unique symbols)
51
Q

What is the symbol table for a compiler?

A

The symbol table for a compiler is a table typically containing an entry for each identifier/keyword in the program.

52
Q

What is typically contained in a compiler’s symbol table?

A

Within each entry will usually be:

  • the identifier (e.g. input or ==)
  • the kind of item (e.g. variable or operator)
  • the type of item (e.g. boolean or real)
  • the run-time address or value (e.g. 3.14 for pi as a constant)
  • a pointer for accessing information (e.g. for values held in an array or parameters of a subroutine)
53
Q

How is the symbol table usually structured and why?

A

The symbol table is usually structured as a hash table in order to try and optimise the speed at which an entry in the table can be accessed.

54
Q

Why is the structure of the symbol table important to lexical analysis?

A

During lexical analysis, lots of time is spent accessing the symbol table. Therefore, it is important that the table is structured in a way that allows for very quick access and modification, so that the speed of the compiling process optimised.

55
Q

What is syntax analysis?

A

Syntax analysis is the process of determining whether the sequence of code forms a valid sequence according to the requirements of the language, which are expressed as a set of rules (e.g. through a syntax diagram).

56
Q

What is parsing in regards to syntax analysis?

A

Parsing is the process of actually applying a language’s set of rules to the program at hand.
Stacks are used to check, for example, that brackets are correctly paired.
The priorities of the arithmetic operators are determined and expressions can be converted into a form from which machine code can be more easily generated.

57
Q

What is meant by checking for semantics during syntax analysis?

A

Checking for semantics means checking for the meaning and order, rather than the grammar, of the program. This may include occasions where a variable is used in a calculation before it has actually be assigned to a value.

58
Q

What happens in the code generation and optimisation stage of the compiling process?

A

In the code generation and optimisation stage, optimisation techniques are used to try and reduce the execution time of the program. This may include spotting redundant instructions and producing object code which achieves the same net effect by different means.

59
Q

What are 2 disadvantages of code optimisation?

A

Disadvantages of code optimisation:

  • Will increase compilation time
  • May sometimes produce unexpected results, since unoptimised programming is sometimes utilised on purpose
60
Q

What is a library program?

A

A library program is a ready-compiled program which can be loaded and run when required.

61
Q

What is the job of a linker?

A

The job of a linker is to appropriately enter machine code addresses of externally compiled subroutines where they are called and/or returning values.

62
Q

What are the advantages of library routines?

A

Advantages of library routines:

  • They’re tested and error-free
  • Saves the programmer lots of time as they don’t have to re-write often simple code that has already been written by someone else