Chapter 7 - Functions of an operating system Flashcards

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

What are some functions of the operating system?

A

» Hardware
» User interface
» Memory management
» File management
» Multitasking
» Scheduling

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

What is a helpful acronym to remember the functions of the operating system?

A

» MUSH FM

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

What is multitasking?

2 marks

A

» When you have more than one program open and running at the same time
» Processor allocates a small amount of time to each process and cycles between them

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

What is user management?

A

» Allows multiple users to log into the same computer
» OS will retain settings for each use

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

What is WIMP?

A

» Windows
» Icon
» Menus
» Pointers

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

What is an operating system?

A

» A collection of programs that work together to provide an interface between the user and the computer
» Manages the computer’s hardware

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

What is the user interface?

A

» The means by which the computer and user interact
» Can be a commmand line interface
» Can be a GUI interface

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

Where is the OS held?

A

» On the hard disk

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

How does is the OS loaded into RAM?

A

» Small program called loader which is in ROM sends instructions to load operating system by copying it from storage into RAM

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

Why is memory management needed?

2 marks

A

» Protects programs from each other, such as being overwritten
» To enable memory to be shared
» To rellocate memory when necessary

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

How does the operating system manage memory management?

A

» Memory is used efficently - program that are being used need to be stored in memory without space being wasted

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

What are the 2 ways in which memory can be split?

A

» Paging
» Segmentation

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

What is paging?

3 marks

A

» Memory is split into equal-sized sections known as pages
» Can be swapped between main memory and the hard disk as needed
» Pages are physical divison that are made to fit sections of memory

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

What is segmentation?

3 marks

A

» Splitting up of memory into logical sized divisions known as segments
» Segments are different sizes
» Segments are complete sections of programs

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

When is virtual memory needed?

A

» When there is insufficient memory space in RAM to store prgorams

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

Which is more expensive, RAM or secondary storage?

A

» RAM

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

How does virtual memory work?

A

» Uses a section of the hard drive to act as RAM
» Sections of program that are not currently in use are temporarily moved into virtual memory through paging.
» Pages are swapped to main memory when required

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

What is disk thrashing?

A

» When the computer slows down
» Due to pages being swapped too frequently between the hard disk and main memory
» As a result more time is spent transferring these pages, then actually running the program

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

What is an interrupt?

A

» Signals generated by software or hardware to indicate to the processor that a process needs attention

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

What is the interrupt Service routine?

A

» Program code that is called when an interrupt is called
» Checks to see the priority of the interrupt

21
Q

What is a priority queue?

A

» Stores the interrupts in order of their priority

22
Q

When does the processor check the contents of the interrupt?

A

» At the end of each FDE cycle

23
Q

What are the steps of the ISR when the priority is higher priority then the process being executed?

A

» Contents of the program counter and other special purpose registers are copied transferred to a stack
» Relevant ISR can be loaded by changing the program counter to the locaiton of the ISR in memory
» When ISR is complete, previous values of the program counter and other registers can be restored by popping the stack

24
Q

What happens when an interrupt is being services a new higher priority interrupt is raised?

A

» The interrupt currently being services is also added to a stack in memory and the new interrupy is serviced

25
Q

What is loaded in when the stack is popped?

A

» Retreive the previous values for the orignal program
» Carry on executing the original program where we left off

26
Q

What is a problem of paging?

A

» It could sperate the instructions inside a lopping condition so they are in different pages - very inefficient

27
Q

What are 3 similarities between paging and segmentation?

A

» Both allow programs to run despite insufficient memory
» Both are stored on a disk
» Pages and segments are transferred in to memory when needed

28
Q

What are 3 differences between paging and segmentation?

A

» Pages are fixed size. Segments are different sizes
» Pages are made to fit sections of memory. Segments are complete sections of memory
» Pages are physical divisions. segments are logical divisions

29
Q

What are 3 example of hardware interrupts?

A

» Power supply failure
» Power/reset button pressed
» Power down command - screen off

30
Q

What are 3 example of user interrupts?

A

» Moving the mouse
» Clicking/ tapping an icon to open a new program
» Keyboard presses

31
Q

What are 3 examples of software interrupts?

A

» illegal instruction encountered
» Arithmetic overflow
» New log-on request

32
Q

What is an example of timer interrupts?

A

» Screen - recording application

33
Q

What is an example of a input/output device interrupt?

A

» Buffer nearly empty

34
Q

What does a scheduler manage?

2 marks

A

» To process as many job as possible in the least amount of time
» Ensure all jobs are processed fairly - to maximise number of processes with fast respons times

35
Q

How does scheduling work?

A

» Process enters the ready queue
» Then enters the running state
» From here it will finish executing completely
» Get blocked, as it requires an input/ouput command

35
Q

How does scheduling work?

A

» Process enters the ready queue
» Then enters the running state
» From here it will finish executing completely
» Get blocked, as it requires an input/ouput command

36
Q

How does scheduling work?

A

» Process enters the ready queue
» Then enters the running state
» From here it will finish executing completely
» Get blocked, as it requires an input/ouput command

37
Q

What is First come first serve scheduling?

3 marks

A

» Processes are executed in the order they arrive
» If a process takes a long time, the others behind it simply have to wait
» The time the different process take to execute is irrelevant

38
Q

What is the short job first?

2 marks

A

» Picks the process that take the shortest amount of time and runs them until they finish
» Scheduler needs to know how long each process will take

39
Q

What is round robin?

3 marks

A

» Each process is allocated a fixed amount of time - known as time slice - or quantum
» If the process is not complete by the end of its time slice, it returns to the back of the ready queue
» Repeats until all users serviced
» Time slices are fractions of a second

40
Q

What is shortest remaining time?

A

» The scheduler estimates how long each process will take
» Picks the one that will take the least amount of time
» It is pre-emptive

41
Q

What is pre-emptive?

A

» This means that if hasnt completed after a certain amount of time, the scheduler checks to see whether any shorter processes have been added, if so it switches to them

42
Q

What is a multi-level feedback queue?

A

» If the computer has more tha none processer or processor core - it can handle more than one process queue at a time
» Different queues have different level of priorities
» Scheduler can move jobs between the different queues as needed

43
Q

What is processor starvation?

A

» When a particular process does not receive enough processor time in order to execute and be completed
» Occurs in shortest job first

44
Q

Explain why the first come first sever method may not be efficient?

2 marks

A

» Once a job starts it prevents another job from being processed
» A job using a slow resource wastes processor time

45
Q

Explain why scheduling is necessary?

4 marks

A

» Process as many jobs as possible
» In the least amount of time
» Ensure all jobs are processed farily
» Efficient use of resources/processer time
» Prevent processes from being starvated

46
Q

Describe how virtual memory is used?

A

» Use of secondary storage as it if was main memory
» Swap pages between memory and secondary storage

47
Q

Explain why interrupts are used in a computer system?

2 marks

A

» To obtain processor time
» For a device that needs to be serviced
» To avoid delays

48
Q

Give one example of an interrupt that allows the job to be resumed after the system has serviced the interrupt?

A

» User interrupt - e.g new long on request