1.2.1 - Operating Systems Flashcards

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

What is the operating system?

A

The operating system is the most fundamental piece of system software. It is the software that manages the computer.

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

What is the purpose of an operating system?

A
  • To act as a platform on which the other software can run.
  • To handle the operations common to different pieces of software running on the same system, like writing and reading to secondary storage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name 4 examples of OS functions that do not relate to memory or storage.

A
  • Processor scheduling, determining the order in which processes will be executed.
  • Handling interrupts, dealing with requests that disrupt the processor.
  • Providing the user interface, how users interact with a computer.
  • Providing security, ensuring resources are protected through permissions and passwords.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name 3 examples of OS functions relating to memory or storage.

A
  • Memory management, recording how memory is divided to efficiently allocate it.
  • Secondary storage management, to track where files and programs are stored and which parts are available.
  • I/O Management, ensuring efficient communications with devices and managing functionality issues.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What can happen without memory management?

A

Each different program will be using its own data. Without memory management, one program could change the data of another, and a maliciously coded program could access or amend the data of another program.

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

What is paging?

A

Paging is splitting programs up into physical units of the same size, stored in page frames. The operating system uses a page table to keep track of where the pages are stored, meaning all the pages of a process don’t have to be stored contiguously.

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

What is segmentation?

A

Segmentation is splitting programs up into segments of different sizes to fit the varying memory requirements of each process. The segments don’t need to be stored continuously across a fixed address space, and can be moved in and out of memory as required.

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

How is processor time allocated to urgent processes?

A

Interrupts are used (a signal sent to the processor to request immediate attention.) When the processor receives this request, it suspends what it is doing and runs the process associated with the interrupt.

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

Why might a processor be interrupted?

A

It could be interrupted because:
A hardware device has signalled it has data to process.
A hardware device has finished a task.
A software process needs a service to be provided or OS function to be performed.
A certain amount of time has expired.
A hardware failure has occurred.

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

What is an ISR and where is it found?

A

An ISR is a mini program designed to respond to an interrupt’s request. It can be built into an operating system or provided via device drivers.

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

What happens if an interrupt is raised at the end of a fde cycle?

A

The contents of the PC and other registers are copied to an area of memory called a stack.
All other lower-priority interrupts are put on hold.
The relevant ISR is loaded by changing the PC to where the ISR starts in memory.
The ISR executes.
The previous values are restored and interrupts re-established.

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

What is the job of a scheduler?

A

A scheduler is a program that manages the amount of time different processes have in the CPU.

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

What is the round robin scheduling algorithm?

A

In round robin scheduling, processor time is divided equally among all tasks.
Each process is given a fixed time period called a time slice, and if it hasn’t finished when the time is up it stops running and the computer switches to the next process.

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

What are the advantages and disadvantages of round robin?

A

Every task is allocated processor time without a long wait.
However, it doesn’t scale well, because as more processes run, the time slice for each gets smaller so more urgent processes are less likely to be completed quickly.

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

What is the first come, first served scheduling algorithm?

A

Processes run from start to finish in the order in which the processor receives their request to run.

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

What are the advantages and disadvantages of first come, first served?

A

This is the simplest method to implement. Also, with this algorithm, once a job starts, it will definitely complete.
However, there can be a long wait before a process can run.

17
Q

What is the shortest job first scheduling algorithm?

A

In shortest job first, processes are queued and the process that needs the shortest total time to complete goes first.

18
Q

What are the advantages and disadvantages of shortest job first?

A

It reduces wait times because shorter processes are removed quickly, meaning the processor can allocate more time to longer jobs.
However, this type of scheduling is susceptible to starvation if shorter jobs keep being added.

19
Q

What is the shortest time first scheduling algorithm?

A

In shortest time remaining scheduling, the processes with the shortest time to completion go first, until a different task is added with a shorter time to completion, which then takes priority.
This is different to the shortest job first algorithm because a long job which is mostly complete might have a very short time remaining, and would therefore be prioritised.

20
Q

What are the advantages and disadvantages of shortest time first?

A

Like shortest job first scheduling, this algorithm also has the effect of delaying longer processes from completing sooner if shorter processes are added in the meantime. The less a process has left to do, the higher priority it becomes.

21
Q

How does the multi-level feedback queue work?

A

Initially, processes are added to a queue with a certain level of priority.
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 higher priority queue.
Processes that depend on input/output devices require a lot of processing time, so they are kept in high priority queues, and processes that are quick to complete are served first

22
Q

What are the advantages and disadvantages of multi-level feedback queue?

A

Starvation is avoided.
All tasks are given processor time, but the more important jobs are dealt with sooner.
The queues become more balanced the more the tasks are processed, ensuring that no single high-priority task dominates the processor’s time.

23
Q

What are distributed operating systems?

A

Separate computers can be joined together through networks to make a more powerful whole, which is difficult because the data and instructions to be processed need to be split between each computer.

A distributed OS coordinates the communication between these nodes, useful when processor intensive tasks need to be completed.

24
Q

What are embedded operating systems?

A

Embedded operating systems are used in computers which serve a specific purpose, providing a reliable platform for specific applications.
They are often used to provide hardware reliability and ensure efficient resource use, though often at the cost of flexibility.

25
Q

What are multitasking operating systems?

A

A multitasking operating system manages the computer’s resources to provide the illusion that it is possible to switch tasks. In reality, as single core computer only runs one application at a time, but the OS can quickly switch to make it appear as though more than one task is running at a time.

26
Q

What are multi-user operating systems?

A

Multi-user operating systems provide the facilities for multiple users to access the same system. They control the consumption of resources so that users can access the same system at the same time, without adversely affecting the other users.

27
Q

What are real-time operating systems?

A

Real time operating systems support applications that need to process data to produce a particular output as quickly as possible.
They are not likely to be as flexible as other operating systems as they need to ensure a consistent response to inputs within a guaranteed time period.

28
Q

What is a device driver?

A

A device driver is a program controlling the operation of a specific device type.
Manufacturers build hardware devices in different ways, and the driver provides an interface allowing the OS and other software to interact with it, without having to deal with the particular hardware implementation.

29
Q

How are device drivers installed?

A

Drivers are installed using software routines that are either built into the OS or downloaded from the internet.
For example, when a specialist keyboard is connected to a computer, the OS will detect the model of the keyboard and download the suitable driver from the manufacturer’s website.
Older systems might need the driver to be installed from physical hardware.

30
Q

Why may a generic device driver not be suited to a device?

A

It may be missing features that the specific device driver would provide.
The operation of it may be inefficient.

31
Q

What is a virtual machine?

A

Due to hardware advances, processing power has reached a point where systems can run as software processes within other software.
A host system might run software allowing other software to behave as if running on a hardware system - called a virtual machine. It can replicate any combination of hardware.

32
Q

How can a virtual machine be used (OS)?

A

It can allow the installation of one operating system within another, like a legacy OS or OS that wouldn’t normally be able to run on the hardware host.
It can emulate different hardware setups so the software runs as if running on a different hardware.

33
Q

How can a virtual machine be used(software)?

A

Some older software might not run on newer systems. A VM could emulate an older system, on which the user could run the older software.

34
Q

How can a virtual machine be used (test system)?

A

VMs are closed and controlled environments. The ‘hardware’ of the VM only exists as a self-contained software process that is isolated from the actual host system. This provides the opportunity to run software that could potentially be damaging, such as malware or early versions of software that need to be analysed.

35
Q

How can a virtual machine be used (servers)?

A

Servers on networks are required to fulfil multiple roles, such as providing access to file stores or storing email accounts for users.
More than one server can run on a virtual machine, which allows for separation of services without the need for multiple pieces of hardware.

36
Q

What is intermediate code?

A

Rather than compiling program code into machine code that can only be run on similar platforms, some languages use vms to act as an intermediary between the system and source code.
At run-time, the original program is translated into intermediate code, which is then passed to a virtual machine. The VM then runs this code and determines how to control the host computer so that it can carry out the relevant instructions.

37
Q

Why is using a VM as an intermediary good?

A

Using a VM as an intermediary between the system and the source code allows the same code to be used on any platform that can run the VM.