Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 13 The Function of Operating Systems

Similar presentations


Presentation on theme: "Chapter 13 The Function of Operating Systems"— Presentation transcript:

1 Chapter 13 The Function of Operating Systems
F453 – Computing Theory Chapter 13 The Function of Operating Systems

2 Features of operating systems
H I S U Hardware resources (Provide and Manage) – such as the management of memory and the jobs passing through it Interface – provide an interface between the user and machine Interface – provide an interface between applications software and the machine. (software and hardware) Security – provide it for the data on the system particularly when there are lots of users. Utility Software– provide this so that maintenance can be done!

3 INTERRUPT HANDLING

4 Interrupt Handling Remember our friend the Processor? (brain of the computer) It normally functions SERIALLY – that is an instruction is collected, acted upon, next instruction… This continues while the processor is operating or the set of instructions is completed.

5 Interrupt Handling That’s all well and good – if things run smoothly, but often you are going to get something causing the processor to stop what it is doing and do something else It is the INTERRUPT that asks for this to happen….

6 Types of Interrupt  Hardware interrupt – (the buffer that is being used to transfer data from primary memory to secondary storage has been emptied and needs to be refilled so that data transfer can continue) Software interrupts (such as the interrupt caused to the flow of a program by a call to an external device) EACH INTERRUPT IS GIVEN A PRIORITY – if two occur you need to know which is more important.

7 Example of most important interrupt
An interruption to power supply! (this is given the highest priority of all!)

8 So what happens when an interrupt occurs – What’s the process?
Fetch Instruction Decode Operation Execute Check for Interrupts If none present move to Fetch If present acknowledge interrupt Carry out interrupt task

9 Interrupt - process Interrupt is stored with all other jobs that the processor has to do (including current running task) Interrupt given a priority, as is the current job, according to importance All jobs are stored – but also stored in order of priority! Processor finishes an instruction – it checks list for stuff to be done As long as job it is doing is at the top of the list –It will continue with next instruction, but if an interrupt has gone to top of list, the processor will STOP the job its doing!

10 It can’t just stop It’s like when you’ve been working all night on an essay. In the morning there’s a fire….you need to rush out of the house. An important interrupt no doubt but… Will you press save? *maybe not!

11 Processor does save when it is interrupted
It can’t waste all the processing its done So it stores the contents of all the special registers so that when it goes back to the job it can load the special register with these contents again and carry on from where it left off. These values are stored in a STACK (we’ll do more on these soon)

12 So special registers emptied
The new job then (the interrupt) can be loaded into the special registers and proccessed until it is completeed.

13 Scheduling, Job Queues and Priorities
Life requires Schedules, Priorities and Queues. Without them, things would not function.

14 Scheduling Take the exampe of a multi operating system….there are a number of jobs that must be in the memory in order of the OS to switch from one job to the other This in turns means the OS must have a set of rules that it can use in order to determine the order in which the jobs should be handled The use of this set of rules is known as job scheduling

15 So what’s scheduling? The use of a set of rules to determine the order that jobs should be handled is called Scheduling

16 What’s scheduling????? Set of rules
These set of rules determine the order in which jobs should be handled. Use of these rules is called job scheduling!

17 More about the rules… The rules used will be largely decided by the importance applied to the different jobs to be carried out This concept of “importance” implies that the jobs can be arranged into some sort of order and the OS can then follow this order of jobs HOW IS THE ORDER OF JOBS DECIDED!?!?!??

18 How do you order jobs in your brain?
Jobs that require physical strength – (interfacing with physical external objects…?) Jobs that require emotional strength (things that require processing and brain powre)

19 Interrupt Priority


Download ppt "Chapter 13 The Function of Operating Systems"

Similar presentations


Ads by Google