3.6.1.4 roles of an operating system Flashcards

1
Q

What is the operating system? 2

A

The most fundamental and important software, which is needed to control the hardware and softwares resources of the computer.

It allows applications to interact with the hardware on a computer

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

What would happen without an OS? Why is it useful?

A

Without an OS, each program would have to be written with lots of code included to run the computer, making them complex to create.

An OS includes the code needed to run the computer, so multiple applications can be written easily to work on common OS systems.

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

What are the 4 mains roles of the OS?

A

Resource management

managing hardware to allocate processors

memory management

I/O management

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

How do OS make the hardware less complex?

A

It provides a virtual machine(a compute resource that runs programs on software rather than a physical computer) , which allows the user to control the computer with ease

It shields the user from the complex details of the hardware and manages it itself

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

How does processor scheduling work?

A

Different scheduling algorithms are used to manage different programs running at once, and how they are allocated to the processor and memory

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

Give examples of scheduling algorithms

A

Round robin - each process in turn has use of the computer processor for a given slice of time
first come first serve -
shortest job next -

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

3 factors in allocating processor time

A

Length of the task
importance of the task
when it was requested relative to other tasks

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

What are interrupts and when are they need?

A

interrupts are signals sent to the computer to request immediate response so that processor time is allocated to urgent tasks

interrupts can be sent when:
Hardware failure occurs(e.g printer ran out of ink)
Hardware has completed task successfully
hardware has data it needs to process
an allotted amount of time has expired and an action needs to be performed

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

How do interrupts work?

A

ISRs (interrupt service routines) are built into the OS. They are like mini programs that are designed to respond to interrupt requests.

When an interrupt is detected, the processor suspends its current tasks and runs the ISR and then once it is done it continues where it left off

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

How does the OS interact with memory?

A

The OS keeps track of where data is stored in main memory(RAM).
It loads data and instructions from the secondary storage, like hard disks, so that it can be processed and executed.

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

3 methods by which OS handles memory

A

It tracks wether memory spaces are free or allocated, so that new data is saved into new spaces and not overwritten on important data. When data is not needed anymore, it is marked as free so it can be overwritten.

The OS determines storage requirements - it finds how much memory spaces each process running will need, and then reserves blocks of memory adresses for each process to use

it controls memory usage by freeing portions of memory between processes to provide access as required.

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

3 allocations techniques used by the memory:

A

Paging
Segmentation
VM(Virtual Memory)

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

Paging

A
  • The computer divides the available memory into sections called frames, which are of fixed length.
  • Data is divided into pages that are of equal size to the frames
  • is stored non contiguously, first available spaces are given to new memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Segmentation

A
  • segmentation is like paging except pages are not of fixed length
  • the OS make a segment map, which keeps record of where each segment is stored and which segments are being used by processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Virtual memory

A
  • the operating system swaps part of a process that are not in use to the free space on the hard disk.
  • it swaps it back to the secondary storage when it is in use
  • it creates extra memory, but is slower because data has to be sent between memory storages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly