1.2.1 Flashcards

Systems software

1
Q

What is a driver?

A

A piece of software which allows the OS to interact with a hardware device.

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

How can a driver make it possible for the same printer to work multiple types of hardware.

A

The driver software is hardware/OS dependent. So the routines will vary according to the platform, but the OS does not need to know how they are implemented.

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

Describe what is meant by hardware redundancy.

A

Crucial hardware components are duplicated so that if one component fails, another is automatically brought into operation.

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

State a function the BIOS performs at start up.

A
  • Initialise/check hardware
  • Load OS into RAM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe what is meant by fail-safe.

A

A system or component that comes into operation in the event of a failure which deals with the resulting situation quickly and safely.

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

What are the functions of an operating system?

A
  • Memory management
  • Interrupt service routines
  • Processor scheduling
  • I/O management
  • Backing store management
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an operating system?

A

An operating system is a set of programs that manages the operation of the computer for the user. It acts as a bridge between the user and the computer’s hardware.

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

What is memory management?

A

Memory management is the allocation and management of space within memory for running programs.

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

What is paging?

A

Paging is a technique that splits memory into smaller fixed sizes of 4Kb each. These ‘pages’ aren’t always contiguous and so a page table is used to map the logical addresses to their physical locations in RAM.

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

What is segmentation?

A

Segmentation splits memory into smaller segments of varying length depending on program structure.

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

Define virtual memory.

A

Virtual memory is when secondary storage is used as an extension of memory.

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

Why is virtual memory needed.

A

Memory is not limitless, therefore to allow the system to keep running the OS swaps pages of temporarily inactive jobs to secondary storage.

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

What are some of the downsides to virtual memory?

A
  • Secondary storage is typically slower than RAM.
  • There is an overhead in swapping pages in and out of memory which can impact performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
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
14
Q

What is the purpose of interrupt service routines?

A

At the end of each FDE cycle the CPU checks for interrupts. If a signal is present it suspends the current program by placing its PC and register values onto the system stack, and a interrupt service routine is called to process the interrupt. Different interrupts have different routines.

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

How does a computer appear to be multitasking?

A

Processor scheduling

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

What are the objectives of a processor scheduler?

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

Name the different types of scheduler

A
  • Round robin
  • First come First Served
  • Shortest remaining time
  • Shortest job first
  • Multi-level feedback queues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How does round robin schedule tasks?

A

Processes are despatched on a first in first out (FIFO) basis, with each process in turn being given a time slice (a limited amount of CPU time). If the process does not complete before the time expires, or before a higher priority interrupt occurs, the despatcher gives the CPU to the next process. After each other running processes has either completed or used their time slice the original program will then get another time slice in order try and complete its task.

19
Q

Explain the first come first served scheduler

A

Jobs are processed in the order in which they arrived, with no system of priorities

20
Q

How does shortest remaining time schedule tasks?

A

The process with the smallest estimated completion time is run next. This tends to reduce the number of waiting jobs, and the number of small jobs waiting behind big jobs. Its disadvantage is that it requirees knowledge of how long a job will take.

21
Q

What are multi-level feedback queues?

A

MLFQs is an algorithm used in scheduling to:
- Give preference to short jobs
- Give prefence to I/O bound processes
- Separate processes into categories based on their need for the processor

22
Q

What is shortest job first?

A

This is a scheduling algorithm that processes jobs that have the smallest estimated running time first. It minimises the amount of short programs running but has the drawback of needing time estimations.

23
Q

Explain backing store management.

A

When files and applications are loaded, they are transferred from backing storage into memory. The OS is required to keep a directory of where files are stored so that they can be quickly accessed. Similiarly, it needs to know which areas of storage are free so that new files or applications can be saved.

24
Q

Explain what a distributed operating system is

A

A distributed operating system is a form of parallel processing system which spreads the load over multiple computer. A single job is split up into several tasks and each of these is run on a separate computer, coordinated by the operating system, in such a way that it appears to a user to be a single system.

25
Q

What is a multi-tasking operating system

A

A multi-tasking operating system is typically run on a standalone computer. It runs multiple jobs simultaneously, switching between them using a scheduling algorithm.

26
Q

What is a multi-user, multi-tasking system

A

A MU,MT operating system is a time-sharing system. It allows multiple users to run access a single powerful computer such as a mainframe or supercomputer, with each user getting a slice of processing time for their purpose according to a scheduling algorithm.

27
Q

What is an embedded operating system?

A

Embedded operating systems vary according the hardware they are installed in, although they all typically have these features:
- Minimal user interface [Often consisting of a few buttons or a dial and maybe a small screen]
- They will accept input from sensors, and send output to control devices
- There is a limited amount of RAM so complex memory management systems aren’t needed
- There will not be any permanent data storage devices to be managed

28
Q

Define a real-time operating system

A

Real-time operating systems are specialised embedded systems that are used in time critical operations such as flight-computers and hospital systems. They must have the following features:
- it must respond quickly to any inputs or sensors
- it must be able to deal with many inputs simultaneously
- it must have “failsafe” mechanisms designed to detect and take appropriate action if a hardware component fails
- it must incorporate redunancy - that is, if one component fails, it must automatically switch to backup hardware

29
Q

What is utility software?

A

Utility software is system software designed to optimise the performance of the computer or perform tasks such as backing up files, restoring corrupted files from backup, compressing or decompressing data, encrypting data before transmission, providing a firewall, etc.

30
Q

What is the purpose of a disk defragmenter

A

Its purpose is to reorganise the files on a magnetic hard drive so that files which have been split up across the disk can be recombined in a single series of sequential blocks. This makes read a file quicker.

31
Q

What is applications software?

A

Applications software that performs tasks for end-users. It has two categories:
- General-purpose software which can be used for many different purposes. (e.g. word processor, spreadsheets or graphics packages)
- Special-purpose software that performs a single specific task or set of tasks (e.g. hotel booking systems, fingerprint scanners). SP software can either be bought ‘off-the-shelf’ or be made bespoke for a particular company.

32
Q

What makes software open source?

A

Open source software is governed by the open source initiative that says:
- Software is licensed for use but there is no charge for license. Anyone can use it
- Open source software must be distributed with the source code so anyone can modify it.
- Developers can sell the software they have created
- Any new software created from Open Source software must also be “open”. This means that it must be distributed and sold in a form that other people can read and also edit.

33
Q

What makes software proprietary?

A

Proprietary or closed source software requires you have a license to use it. Some note about the license are:
- There will be restrictions on how the software can be used, for example the license may specify only one concurrent user.
- The company or person who wrote the software will hold the copyright. The users will not have access to the source code and will not be allowed to modify the package and sell it to other people. This would infringe upon the Copyright Designs and Patents Act.

34
Q

What is an assembler?

A

An assembler is a translator that converts assembly code (a low-level language) into object code (machine code, 0s and 1s).

35
Q

What is a compiler?

A

A compiler is a program that translates a high-level language into machine code. The source code written by the programmer is input into the compiler which performs several scans of the code, performing different checks and building uptables of information needed to produce the final object code. Different platforms will require different compilers since the result object code will be hardware specific.

36
Q

What is an interpreter?

A

An interpreter is a diffferent type of programming language translator. Once the programmer has written and saved a program, and instructs the computer to run it, the interpreter looks at each line of the source code, analyses it and, if it contains no syntax errors, translates it into machine code and runs it.

37
Q

What is bytecode?

A

Bytecode is an intermediate language that makes use of both compilers and interpreters. The source code is compiled into bytecode which is then interpreted into object code. The benefits of this are that you achieve platform independence as the Java Virtual Machine (the interpreter) will mask the inherent differences between different computer architectures and operating systems. Allowing you to run code written in a higher level language that may not be compatible with certain hardware on that same hardware if it supports the Java Virtual Machine by converting it to bytecode first.

38
Q

What are the benefits of compilers ?

A

Compiler advantages:
- The object code can be saved on disk and run whenever required without the need to recompile. However, if an error is discovered in the program, the whole program has to be recompiled.
- The object code executes faster than interpreted code
- The object code produced by a compiler can be distributed or executed without having to have the compiler present
- The object code is more secure, as it cannot be read without a great deal of ‘reverse engineering’

39
Q

What are the advantages and disadvantages of interpreters ?

A

Interpreter advantages:
- Platform independence - the source code can be run on any machine which hast the appropriate interpreter available.
- It is useful for program development as there is no need for lengthy recompilation each time an error is discovered.

Interpreter disadvantages:
- The program may run slower than a compiled program, because each statement has to be translated to object code each time it is encountered (e.g. if a loop of 10 statements is performed 20 times, all 10 statements are interpreted 20 times).

40
Q

What are the stages of compilation?

A

The stages of compilation are:
- Lexical analysis
- Syntax analysis
- Code generation & optimisation

41
Q

What happens during lexical analysis?

A

Lexical analysis performs the following functions:
- Superfluous spaces and comments are removed
- Some simple error-checking is performed (such as the use of illegal identifiers, although most work is still done in the next stage of syntax analysis)
- All keywords, constants and identifiers used in the source code are replaced by ‘tokens’ (unique symbols).

42
Q

Why is a symbol used in compliation?

A

The symbol table contains an entry for every keyword and identifier in the program. The tables typically keeps a log of:
- The identifier/keyword
- The kind of item (variable, array, procedure, etc)
- The type of item (integer, real, char, etc)
- The run-time address of the item or its value if it is a constant

43
Q

What occurs in syntax analysis?

A

Syntax analysis checks the code against the rules of the language. The process of systematically applying the rules to each statement to determine if it is valid is called parsing. The semantic analysis also occurs in this stage which check the meaning of the code rather than the grammar of the language.

44
Q

What is the final stage of compliation and what occurs in it?

A

Code generation and optimatisation is the final phase and when the machine code is generated. The phase applies different code optimisation techniques to attempt to reduce the execution time before generating the final machine code.

45
Q

Why are libraries used in programming languages?

A

Libraries are ready-compiled programs, grouped, and ready to be loaded and run when required. These programs usually perform a specific purpose and are already highly tested before being compiled for use and save the programmer time in that they don’t have to “re-invent the wheel” and write the code themselves.

46
Q

What are linkers and loaders used for?

A

Once a program has been compiled, any separately compiled subroutines must be linked into the object code. It is the job of the linker to put the appropriate machine addresses in all th external call and return instructions, so that the modules are linked together correctly.

It is the loader’s job to copy the program and any linked subroutines into main memory to run.