Unit 2: Systems Software Flashcards

1
Q

What is meant by the term ‘operating system’?

A

The term ‘operating system’ refers to a collection of programs that provide an interface between the user and computer. Operating systems enable the user to communicate with the computer and perform tasks involving the management of computer memory and resources.

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

Name 5 features provided by Operating systems.

A
  • File management
  • Utility software
  • Security
  • User interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Paging?

A

Paging is when memory is split up into equal-sized sections known as pages. These can then be swapped between main memory and the hard disk as needed.

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

What is Segmentation?

A

Segmentation is the splitting up of memory into logical sized divisions, known as segments, which vary in size. These represent the structure and logical flow of the program.

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

What is Virtual Memory and when is it used?

A

Virtual memory uses a section of the hard drive to act as RAM when the space in main memory is insufficient to store programs being used. Sections of programs not currently being used are temporarily moved into virtual memory through paging, freeing up memory for other programs in RAM.

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

What is disk thrashing and when does it occur?

A

Disk thrashing is when the computer ‘freezes’ due to pages being swapped too frequently between the hard disk and main memory. This issue becomes progressively worse as virtual memory is filled up.

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

What are Interrupts?

A

Interrupts are signals generated by software or hardware to indicate to the processor that
a process needs attention. Interrupts have different priorities and their urgency is taken into account by the OS when allocating processor time. They are stored in a priority queue in the interrupt register.

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

Explain how an Interrupt Service Routine is used.

A

The processor checks the interrupt register at the end of each Fetch-Decode-Execute cycle. If an interrupt exists that is of a higher priority to the process being executed, the current contents of the special purpose registers in the CPU are temporarily transferred into a stack. The processor then uses an interrupt service routine to process the interrupt. The interrupt queue is then checked for further interrupts of a higher priority to the process that was originally being executed. When all priority interrupts have been serviced, the Fetch-Decode-Execute cycle resumes as before.

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

What is Scheduling and why is it used by the OS?

A

The operating system ensures all sections of programs being run (known as ‘jobs’) receive a fair amount of processing time. This is done through various scheduling algorithms.

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

What is starvation (Scheduling)?

A

Starvation is when a process cannot complete its execution because it is constantly denied processor time.

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

What are the two types of scheduling algorithms?

A
  • Pre-emptive: Jobs are actively made to start and stop by the
    operating system (e.g Shortest Remaining Time, Round Robin)
  • Non pre-emptive: Once a job is started, it is left alone until it is completed. (e.g First Come First Served, Shortest Job First)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe the ‘Round robin’ scheduling algorithm.

A

Each job is given a section of a time slice in which it is allowed to execute. Once each job in the queue has used its first time slice, this process is repeated until the job has been completed, at which point it is removed from the queue. This means that all jobs will eventually be attended to, however longer jobs will take a much longer time for completion as execution is inefficiently split up into multiple cycles; starvation may occur

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

Describe the ‘First come first served scheduling’ algorithm.

A

Jobs are processed in chronological order by which they entered the queue. It is straightforward to implement

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

Describe the ‘multi-level feedback queue’ algorithm.

A

Processes are chosen from different queues based on the priority of each queue and how much processing time each process has already had. If a process uses too much CPU time, it is moved to a lower priority queue and if a process has been idle for a long time, it is moved to a higher priority queue. This helps avoid starvation, however it is difficult to implement.

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

Describe the ‘Shortest job first’ algorithm.

A

The queue storing jobs to be processed is ordered according to the time required for completion, with the longest jobs being serviced at the end. This is suited to batch systems as waiting time is reduced, however it can result in processor starvation and delays; the processor needs to calculate how long each job will take.

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

Describe the ‘Shortest remaining time’ algorithm.

A

The queue storing jobs to be processed is ordered according to the time left for completion, with the jobs with the least time to completion being serviced first. This means throughput is increased as shorter processes can be quickly completed, however as this does not take into account job priority or urgency, starvation may occur if short jobs are continuously added to the queue.

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

What are the 5 types of operating systems?

A
  • Distributed
  • Embedded
  • Multi-tasking
  • Multi-user
  • Real Time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Describe the function and use of a Distributed OS.

A

Run across multiple devices, allowing the load to be spread across multiple computer processors when a task is run.

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

Describe the function and use of an Embedded OS.

A

Built to perform a small range of specific tasks and catered towards a specific device such as a household appliance. They are limited in their functionality and hard to update although they consume significantly less
power than other types of OS.

20
Q

Describe the function and use of a Multi-tasking OS.

A

Multi-tasking operating systems enable the user to carry out tasks seemingly simultaneously. This is done by using time slicing to switch quickly between programs and applications in memory.

21
Q

Describe the function and use of a Multi-user OS.

A

Multiple users make use of one computer. A scheduling algorithm is used to ensure processor time is shared fairly between jobs and prevent processor starvation.

22
Q

Describe the function and use of a Real Time OS.

A

Commonly used in time-critical computer systems, a real time OS is designed to perform a task within a guaranteed time frame. Examples of use include the management of control rods at a nuclear power station or within self-driving cars: any situation where a response within a certain time period is crucial to safety.

23
Q

What is the BIOS and what is it responsible for?

A

The Basic Input Output System is the first program that runs when a computer system is
switched on. The BIOS is responsible for running various key tests before the operating
system is loaded into memory, such as:
- POST (Power-on self test) which ensures that all hardware is correctly connected and functional
- Checking the CPU clock, memory and processor is operational
- Testing for external memory devices connected to the computer

After these checks are completed, the operating system can be loaded into RAM from the
hard disk by the bootstrap/ bootloader.

24
Q

What are Device Drivers?

A

Device drivers are computer programs which are provided by the operating system and allow the operating system to interact with hardware. When a piece of hardware is used, the device driver communicates this request to the operating system which can then produce the relevant output.

25
Q

What is a Virtual Machine?

A

A virtual machine is a theoretical computer in that it is a software implementation of a computer system. It provides an environment with a translator for intermediate code (code that is halfway between machine code and object code) to run; however, running intermediate code in a virtual machine can be considerably slower.

26
Q

What is the purpose of Applications software?

A

Designed to be used by the end-user to perform one specific task. Application software
requires systems software in order to run.
Examples: desktop publishing, word processing, spreadsheets, web browsers.

27
Q

What is the purpose of Systems software ?

A

Low-level software responsible for managing the computer resources and maintaining
consistently high performance.
Examples: library programs, utility programs, operating system, device drivers.

28
Q

Name and describe 4 examples of Utility software.

A
  • Compression: Used to decompress and compress files.
  • Disk defragmentation: As the hard disk becomes full, read/write times slow down. This is because files can no longer be stored contiguously. The disk defragmenter utility rearranges the contents of the hard drive so they can be accessed faster.
  • Antivirus: Detects potential threats to the computer, alerts the user and removes these threats.
  • Backup: Routinely creates copies of files specified by the user; in an unfortunate event files can be recovered.
29
Q

What is meant by ‘Open Source’?

A

Can be used by anyone without a license and is distributed with the source code.

30
Q

What is meant by ‘Closed Source’?

A

Requires the user to hold an appropriate license to use it. Users cannot access the source code as the company owns the copyright license.

31
Q

What are 3 advantages of an Open Source program?

A
  • Can be modified and improved by anyone
  • Technical support from online community
  • Can be modified and sold on
32
Q

What are 3 advantages of a Closed Source program?

A
  • Thorough, regular and well-tested updates
  • Company owning software provides expert support and user manuals
  • High levels of security as developed professionally.
33
Q

What are 2 disadvantages of an Open Source program?

A
  • Support available online may be insufficient or incorrect. No user manuals.
  • Lower security as may not be developed in a controlled environment
34
Q

What are 2 disadvantages of an Closed Source program?

A
  • License restricts how many people can use the software at once
  • Users cannot modify and improve software themselves
35
Q

What is a translator and what are the three types?

A

A translator is a program that converts high-level source code into low-level object code,
which is then ready to be executed by a computer.

The three types are:
- Compiler
- Interpreter
- Assembler

36
Q

Describe the 3 characteristics of a Compiler.

A
  • Translates high-level code into machine code all at once.
  • The initial compilation process is longer than using an interpreter or an assembler.
  • Compiled code is specific to a particular processor type and operating system but can be run without a translator present.
37
Q

Describe the 4 characteristics of an Interpreter.

A
  • Translate and execute code line-by-line. They stop and produce an error if a line contains an error.
  • Initially appear faster than compilers, but are slower than running compiled code as code must be interpreted each time it is executed. Code also requires the correct interpreter in order to run on different devices.
  • Interpreters are useful for testing code, as time is not wasted compiling code with errors.
    -Code is also platform-independent, making interpreted code more portable.
38
Q

Describe the main function of an Assembler.

A

Assemblers translate assembly code into machine code. Each line of assembly code is equivalent to almost one
line of machine code.

39
Q

Name the four Stages of compilation high level code is subjected to (before it is fully compiled).

A
  • Lexical Analysis
  • Syntax Analysis
  • Code Generation
  • Optimisation
40
Q

In compilation, describe the 3 main processes of Lexical Analysis.

A
  • Whitespace and comments are removed from the code.
  • Keywords and names of variables and constants are replaced with tokens.
  • Information about tokens is stored in a symbol table.
41
Q

In compilation, describe the 3 main processes of Syntax Analysis.

A
  • Tokens are analysed against the rules of the programming language; tokens that break the rules are flagged up as syntax errors.
  • An abstract syntax tree is produced, which is a representation of the source code in the form of a tree.
  • Semantic analysis is carried out where logic mistakes within the program are detected.
42
Q

In compilation, describe the main process of Code Generation.

A

The abstract syntax tree is used to produce machine code.

43
Q

In compilation, describe the 3 main processes of Optimisation.

A
  • Searches through the code for areas it could be made more efficient to reduce execution time but is a very time-consuming part of the compilation.
  • Redundant parts of code are removed. Repeated sections of code are replaced with more efficient code.
  • Excessive optimisation may alter the way in which the program behaves.
44
Q

What is a Linker?

A

A piece of software responsible for linking external modules and libraries included within the code.

45
Q

Name and describe the two types of Linkers.

A

Static Linker: Modules and libraries are added directly into the main file. This increases the size of the file.

Dynamic Linker: Addresses of modules and libraries are included in the file. File size does not change and external module/library updates automatically feed through to the main file.

46
Q

What are Loaders?

A

Programs provided by the operating system. When a file with dynamically linked addresses is executed, the loader retrieves the library or module from the specified memory location.

47
Q

Describe how Libraries can be used in programming.

A

Pre-compiled programs which can be incorporated within other programs. They are ready-to-use and error free, so save time developing and testing modules. Libraries can be reused across multiple programs and save programmers from having to ‘reinvent the wheel’ and instead make use of others’ expertise.