Unit 2 Systems Software Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Operating Systems

A

The term ‘operating system’ refers to a collection of programs that work together to provide an ​i​nterface between the user and computer​. Operating systems enable the user to communicate with the computer and perform certain low-level tasks involving the management of computer memory and resources. Therefore they are essential in devices such as laptops, mobile phones and games consoles. Examples of popular desktop operating systems include Windows and macOS while popular mobile phone operating systems include iOS and Android.

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

Operating systems are essential to a computer system as they provide the following features:

A
  • Memory management (​paging, segmentation, virtual memory​)
  • Resource management (​scheduling​)
  • File management (​moving, editing, deleting files and folders​)
  • Input/ Output management (​device drivers​)
  • Interrupt management
  • Utility software (​disk defragmenter, backup, formatting etc.​)
  • Security (​firewall​)
  • User interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Paging

A

Paging is when​ memory is split up into equal-sized sections known as pages​, with programs being made up of a certain number of equally-sized pages. These can then be ​swapped between main memory and the hard disk​ as needed. 4Kb each section

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

Segmentation

A

Segmentation is the ​splitting up of memory into logical sized divisions​, known as
segments, which vary in size. These are representative of the ​structure and logical flow of the program​, with segments being allocated to blocks of code such as conditional statements or loops.

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

Virtual Memory

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 that are ​not currently in use​ 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

Issues with Virtual Memory

A

The key issue with using these three techniques is ​disk thrashing​. This is when the computer ‘freezes’ and occurs as a result of ​pages being swapped too frequently between the hard disk and main memory​. As a result, more time is spent transferring these pages between main memory and the hard disk then is spent actually running the program. 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

Interrupts

A

Interrupts are​ signals generated by software or hardware to indicate to the processor that a process needs attention​. Different types of interrupts have different priorities and how urgent they are must be taken into account by the operating system when allocating processor time. Interrupts are stored ​in order of their priority​ within an abstract data structure called a ​priority queue ​in a special register known as an i​nterrupt register​. It is the job of the operating system to ensure interrupts are serviced fairly by the processor through the Interrupt Service Routine.

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

Interrupt Service Routine

A

The processor checks the contents of 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 responds to the interrupt by ​loading the appropriate interrupt service routine (ISR) into RAM​. A ​flag is set​ to signal the ISR has begun. Once the interrupt has been serviced, the flag is reset. The interrupt queue is checked again for further interrupts of a higher priority to the process that was originally being executed.
If there are more interrupts to be serviced, the process described above is repeated until all priority interrupts have been serviced. If there are no more interrupts or interrupts are of a lower priority to the current process, the contents of the stack are transferred back into the registers in memory. 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

Scheduling algorithms can either be:

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

Round robin

A

Each job is given​ a section of processor time​ - known as a ​time slice​ - within which it is allowed to execute. Once each job in the queue has used its first time slice, the operating system again grants each job an equal slice of processor time. This continues until a job has been completed, at which point it is removed from the queue. Although Round Robin ensures each job is seen to,​ ​longer jobs will take a much longer time for completion​ due to their execution being inefficiently split​ up into multiple cycles. This algorithm also does not take into account job priority

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

First come first served

A

Jobs are processed in chronological order by which they entered the queue. Although this is ​straightforward to implement​, FCFS again does not allocate processor time based on priority.

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

Multilevel feedback queues

A

This makes use of ​multiple queues​, each which is ordered based on a different priority​.
This can be ​difficult to implement ​due to deciding which job to prioritise based on a combination of priorities.

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

Shortest job first

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 type of scheduling is most suited to ​batch systems​, where shorter jobs are given preference to minimise waiting time. However it requires the processor to know or calculate ​how long each job will take​ and this is not always possible. There is also a risk of processor starvation if short jobs continue being added to the job queue.

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

Shortest remaining time

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. Again, there is a risk of processor starvation for longer jobs if short jobs are added to the job queue.

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

Distributed

A

This is a type of operating system which is 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
16
Q

Embedded

A

Built to perform a​ ​small range of specific tasks​, this operating system is catered towards a specific device​. They are limited in their functionality and hard to update although they consume significantly less power​ than other types of OS.

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

Multi-tasking

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.

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

Multi-user

A

Multiple users make use of one computer, typically a supercomputer, within a multi-user system. Therefore a ​scheduling algorithm must be used​ to ensure processor time is shared fairly between jobs. Without a suitable scheduling algorithm, there is a risk of​ processor starvation,​ which is ​when a process is not given adequate processor time​ to execute and complete.

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

Real Time

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.

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

BIOS

A

The ​Basic Input Output System​ is the first program that runs when a computer system is switched on. The Program Counter register points to the location of the BIOS upon each start-up of the computer as the BIOS is responsible for running various key tests before the operating system is loaded into memory

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

Examples of BIOS

A
  • POST (Power-on self test)​ which ensures that all hardware (keyboards, disk drives) are correctly connected and functional
  • Checking the CPU clock, memory and processor is operational
  • Testing for external memory devices connected to the computer
22
Q

Device Drivers

A

Device drivers are computer programs which are provided by the operating system and allow the operating system to ​interact with hardware

23
Q

Virtual Machines

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 to run.

24
Q

Uses of virtual machines include:

A
  • Protection from malware
    Malware will affect the virtual machine rather than the device being used.
  • Running incompatible software
    Programs specific to different operating systems or different versions of an operating system can be run within a VM, saving time and money required to purchase the hardware.
    A common example is of games consoles being implemented on PCs via a virtual machine.
25
Q

Virtual machines def

A

Virtual machines are commonly used to create a​ development environment​ for programmers to test programs on different operating systems. The advantage of this is that it ​saves both the time and money​ of having to purchase multiple devices solely for testing. However, running intermediate code in a virtual machine can also be ​considerably slower ​compared to running low-level code on the device it was designed for.

26
Q

Applications software

A

Applications software is 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

Systems software

A

Systems software is​ low-level software that is responsible for running the computer system
smoothly​, interacting with hardware and generally providing a platform for applications software to run. The user does not directly interact with systems software but it ensures high performance for the user.
Examples: ​library programs, utility programs, operating system, device drivers.

28
Q

Utilities

A

Utilities are a key piece of system software integral to ensuring the ​consistent, high performance​ of the operating system. Each utility program has a ​specific function​ linked to the ​maintenance of the operating system.

29
Q

Compression

A

Operating systems provide utilities that enable files to compressed and decompressed. This is used when compressing large files to be transmitted across the Internet and is commonly used to compress scanned files.

30
Q

Disk defragmentation

A

As the hard disk becomes full, read/write times slow down. This is because files become fragmented as they are stored in different parts of memory. The disk defragmenter utility​ rearranges the contents of the hard drive​ so they can be accessed faster, thus improving performance.

31
Q

Antivirus

A

Antivirus is responsible for ​detecting potential threats​ to the computer, alerting the user and removing these threats.

32
Q

Automatic updating

A

This utility ensures the operating system is kept up to date, with any updates being automatically installed when the computer is restarted. Updates tackle bugs or security flaws so this ensures the system is less vulnerable to malware and hacking threats.

33
Q

Backup

A

The backup utility automatically creates routine copies of specific files selected by the user. How often files are backed up is also specified by the user. This means that in the event of a power failure, malicious attack or other accident, files can be recovered.

34
Q

Open source

A

Open source code can be used by anyone without a license and is ​distributed with the source code​.

35
Q

Closed Source

A

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

36
Q

Adv Open source

A

. Can be modified and improved by anyone
. Technical support from online community
. Can be modified and sold on

37
Q

Dis Open source

A

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

38
Q

Adv Closed Source

A

. Through, regular and well-tested updates
. Company owning software provides expert support and user manuals
. High levels of security as developed professionally.

39
Q

Dis Closed Source

A

. License restricts how many people can use the software at once
. Users cannot modify and improve software themselves

40
Q

Translators

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. There are three types of translator that convert different types of code and work in different ways.

41
Q

Compiler

A

Compilers translate high-level code into machine code ​all at once​, after carrying out a number of checks and reporting back any errors. This ​initial compilation process is longer​ than using an interpreter or an assembler. If changes need to be made, the whole program must be recompiled. Once code has been compiled to produce machine code, it can only be executed on certain devices - compiled code is specific to a particular processor type and operating system​. Code can be run ​without a translator​ being present.

42
Q

Interpreter

A

Interpreters ​translate and execute code line-by-line​. They stop and produce an error if a line contains an error. They may ​initially appear faster​ than compilers as code is instantly executed, but are ​slower than running compiled code​ as ​code must be translated each time it is executed ​with an interpreter.
This feature makes interpreters useful for ​testing ​sections of code and pinpointing errors, as time is not wasted compiling the entire program before it has been fully debugged. Interpreted code​ requires an interpreter in order to run​ on different devices. However, code can be executed on a range of platforms​ as long as the right interpreter is available, thus making interpreted code​ more portable

43
Q

Assembly Code

A

Assembly code is considered to be a low-level language as it is the ​‘next level up’ from machine code​. Assembly code is ​platform specific​, as the instructions used are dependent on the instruction set of the processor​.
Assemblers translate assembly code into machine code.
Each line of assembly code is equivalent to almost one line of machine code​ so code is translated on almost a one-to-one basis.

44
Q

Lexical Analysis

A

In the first stage of compilation, ​whitespace and comments are removed​ from the code. The remaining code is analysed for keywords and names of variables and constants. These are ​replaced with tokens​ and information about the token associated with each keyword or identifier is stored in a ​symbol table​.

45
Q

Syntax Analysis

A

In this stage, ​tokens are analysed against the grammar and rules of the programming language​. Any tokens that break the rules of the programming language are ​flagged up as syntax errors​ and added to a list of errors.
Examples of syntax errors: ​undeclared variable type, incomplete set of brackets.
An ​abstract syntax tree is produced​, which is a representation of the source code in the form of a tree. Further detail about identifiers is also added to the symbol table. Semantic analysis​ is also carried out at the syntax analysis stage, where logic mistakes within the program are detected.

46
Q

Optimisation

A

This stage of compilation searches through the code for areas it could be made more efficient. The aim of optimisation is to​ make the code faster to execute​ although this stage can significantly ​add to the overall time taken for compilation​. Insignificant, ​redundant parts of code are detected and removed​. Repeated sections of code may be grouped and replaced with a more efficient piece of code which produces the same result. There is a danger, however, that excessive optimisation may alter the way in which the program behaves.

47
Q

Linkers

A

This is a piece of software that is responsible for​ linking external modules and libraries included within the code​.

48
Q

There are two types of linker:

A

Static
Modules and libraries are ​added directly​ into the main file. This ​increases the size of the file​. Any updates to modules and libraries externally will not affect the program. This means a specific version of a library can be used.
Dynamic
Addresses of modules and libraries​ are included in the file where they are referenced. When the program is run, the loader retrieves the program at the specified address so it can be executed. The advantage here is that​ files remain small​ and​ external updates feed through to the main file​; there is no need to rewrite the code.

49
Q

Loaders

A

Loaders are programs provided by the operating system. When a file is executed, the l​oader retrieves the library or subroutine from the given memory location

50
Q

Use of Libraries

A

Libraries are ​pre-compiled programs ​which can be incorporated within other programs
using either static or dynamic linking. They are ​ready-to-use and error free​, so ​save time developing and testing modules. Another advantage of libraries is that they ​can be reused within multiple programs.
Libraries are often used to provide a specialised range of functions which would otherwise require a lot of time and effort to develop, so​ save programmers from having to ‘reinvent the wheel’​ and instead make use of others’ expertise. Popular libraries provide mathematical and graphical functions.