1.2.1 Operating Systems Flashcards Preview

Alevel Computer Science OCR > 1.2.1 Operating Systems > Flashcards

Flashcards in 1.2.1 Operating Systems Deck (32)
Loading flashcards...
1
Q

What is an operating system?

A

A program/set of programs that manages the operations of the computer for the user. It acts as a bridge between the user and the computers hardware.

2
Q

How is the operating system loaded?

A

The operating system is held in permanent storage, eg. on a hard disk. The loader is held in ROM. When a computer is switched on, the loader sends instructions to load the operating system by copying it from storage to RAM.

3
Q

What are the functions of an operating system?

A
Memory management.
Interrupt service routines.
Processor scheduling.
Backing store management.
Management of all input and output.
4
Q

Why is memory management needed?

A

It allows several processes to be run at the same time. It also allows memory to be reallocated and shared when necessary. It protects the data and processes from each other, providing security.

5
Q

What is paging?

A

Memory is split into equal fixed sized sections called pages. Programs are allocated a number of pages depending on their size. Some programs may therefore have access memory that they do not require.

6
Q

What is segmentation?

A

A logical devision of memory space into various sized blocks called segments. As the segments are based on the program size it is less likely to cause excess memory.

7
Q

What are the advantages of paging?

A

Reduces internal fragmentation.
Simple to implement.
Swapping is easy due to the fixed page sizes.

8
Q

What are the disadvantages of paging?

A

There is internal fragmentation.

It requires extra memory space which is bad for systems with small RAM.

9
Q

What are the advantages of segmentation?

A

There is no internal fragmentation.

It may save memory if the segments are small.

10
Q

What are the disadvantages of segmentation?

A

There is external fragmentation.
It can have costly management algorithms.
It needs to find big enough free memory space areas.
Segments of unequal size are not suited for swapping.

11
Q

What is virtual memory?

A

Virtual memory is an area of a computer systems secondary memory storage that acts as if it exists as part of the systems RAM or primary memory.

12
Q

Why is virtual memory needed?

A

Memory is not limitless. When there is not enough RAM, an area of the hard drive is assigned as virtual memory. A computer can then multitask using more/bigger programs than normally possible.

13
Q

What are the advantages of virtual memory?

A

It is helpful in fitting larger programs into smaller programs.
Allows you to run more than 1 application at once.

14
Q

What are the disadvantages of virtual memory?

A

Applications may run slower.
Reduces system stability.
Not the same performance as RAM.
Offers less hard drive space.

15
Q

What is an interrupt?

A

A signal sent to the CPU, generated by a source such as an I/O device or a system software routine, which causes a break in the execution of the current routine.

16
Q

What are four types of interrupts?

A

I/O interrupts.
Timer interrupts.
Hardware interrputs.
Program interrupts.

17
Q

What is an I/O interrupt?

A

Generated by I/O devices to signal a job is complete or an error has occured.

18
Q

What is a timer interrupt?

A

Generated by an internal clock to signal the processor should attend to a time-critical activity.

19
Q

What is a hardware error?

A

Eg. A power failure.

The computer must attempt to shut down as safely as possible.

20
Q

What is a program interrupt?

A

Generated due to an error in a program, such as a violation of memory usage.

21
Q

What happens when an interrupt is called?

A

The CPU suspends execution of the running program/process and disables all interrupts of a lower priority. If the current task has the higher priority then it will continue running. However, if the interrupt has higher priority, the ISR begins.

22
Q

What happens when the interrupt service routine is called?

A

The contents of the CPU register are copied to a stack and then the interrupt is run to completion. The interrupts flag in the interrupt queue is then reset and the system checks for any further priority interrupts before restoring the contents of the registers from the stack.

23
Q

What is processor scheduling?

A

The operating system is responsible for allocating processor time to each application. Whilst on application is using the the CPU for processing, the OS can queue up the next process required by another application to make efficient use of the processor.

24
Q

What is the operating system scheduler responsible for?

A

Making sure that processor time is used as efficiently as possible.

25
Q

What does processor scheduling allow?

A

The appearance of carrying out several tasks at once by carrying out smaller parts of multiple larger tasks in turn.

26
Q

What is FCFS secheduling algorithm?

A

First Come First Serve. Jobs are processed in the order in which they arrive, there is no system of priorities.

27
Q

What is SJF scheduling algorithm?

A

Shortest Job First. The process with the smallest estimated running time is run next.

28
Q

What is RR scheduling algorithm?

A

Each job is given a maximum. Amount of processor time. After this time it will return to the queue. Once the job is finished, it leaves the queue.

29
Q

What is SRT scheduling algorithm?

A

The queue is sorted on the amount of expected time to completion left.

30
Q

What are Multi Level Feedback Queues?

A

A number of different queues are used, each with a differing priority.

31
Q

What are the advantages of FCFS?

A

There is no complex logic.
It is simple and easy to implement.
Every process will eventually get a chance to run.

32
Q

What are the disadvantages of FCFS?

A

The is no option for pre-emption of a process, it must must executed until the end once started.
If this is a long task, the processes in the back of the queue therefore must wait for a long time.