Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ainsley Smith Tel: 0161 953 5995 Ex 3374 Ainsley_smith@mancat.ac.uk http://asmithatmancat.wordpress.com/ Ainsley_smith@mancat.ac.uk.

Similar presentations


Presentation on theme: "Ainsley Smith Tel: 0161 953 5995 Ex 3374 Ainsley_smith@mancat.ac.uk http://asmithatmancat.wordpress.com/ Ainsley_smith@mancat.ac.uk."— Presentation transcript:

1 Ainsley Smith Tel: 0161 953 5995 Ex 3374 Ainsley_smith@mancat.ac.uk

2 Unit 15 Operating Systems and Systems Software Ainsley Smith

3 Introduction to Operating Systems - last week
Computer software Can be divided into what two main categories:? Application software Application software is generally what we think of when someone speaks of computer programs. System software System software acts as an interface between the hardware of the computer and the application software that users need to run on the computer.

4 Introduction to Operating Systems - last week
The most important type of system software is ? The operating system. There are two main types of operating systems ? ROM based Disc based. Advantages / Disadvantages ?

5 Introduction to Operating Systems - last week

6 Introduction to Operating Systems - last week
The operator would normally have a lot of programs submitted to him and he would put the program in a queue, ready to be processed. So the operator has ended up with a batch of jobs to feed into the computer. The special cards that the operator adds is part of another language that the computer understands called the Job Control Language or JCL for short. This set of programs soon turned into an Operating System.

7 Introduction to Operating Systems
With the OS doing many things that initially was done manually it meant that a lot more could be achieved. Consequently records had to be kept as to who was doing what and when and what with. All this was done, again by the OS, and kept in files, called logs.

8 Introduction to Operating Systems
As technology advanced, then serially processing the jobs soon became a problem. What was needed was a means by which more than one job (program) can be held in memory at a time The OS switching between them.

9 Introduction to Operating Systems
This would then speed up the time a batch could be processed. The only real limitation would be the size of memory. The Multiprogramming Operating System was born. but greatly complicated the OS itself. However the term Multitasking Operating System is the term we use nowadays.

10 Introduction to Operating Systems
At this stage punched cards would have gone, and programs would have been written at terminals. A terminal is a computer connected to the main computer. The terminal would not have any memory to talk of, but would be just a means of communicating with the main computer. Many terminals would be connected to the main frame in a multi-user environment.

11

12

13

14 Windows Terminal Services

15 Introduction to Operating Systems
Multitasking ? Multitasking is the process of letting the operating system perform multiple task at what seems to the user simultaneously. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for that task

16 Introduction to Operating Systems
Multitasking solves the problem by scheduling which task may be the one running at any given time, and when another waiting task gets a turn. Even on computers with more than one CPU (called multiprocessor machines), multitasking allows many more tasks to be run than there are CPUs.

17 Introduction to Operating Systems
To illustrate this, consider two scenarios in a non-multitasking environment. The first involves a highly maths intensive program:

18 Maths intensive program:
CPU Time CPU Active CPU Inactive The CPU is active for a lot of the time and cannot be used for other purposes. The CPU is being used efficiently for this task.

19 Introduction to Operating Systems
Now consider two tasks which have a lot of inactive time (they could be waiting for keyboard input, or a person could be writing a program at a terminal).

20 Two tasks which have a lot of inactive time
B CPU Time CPU Active CPU Inactive The CPU is waiting around for something to happen. The CPU is not being used very efficiently at all.

21 The CPU is inactive 55% of the time
The following diagram shows three jobs (programs) running in Non multitasking Job 1 Job 2 Job 3 CPU Waiting w w w w w CPU Active CPU Printer Active Printer CPU Time The CPU is inactive 55% of the time not very efficient

22 Now consider a multitasking O/S with the three same jobs
CPU Waiting CPU Active Printer Active Job1 Job2 Job3 CPU Activity Printer Activity When Job 1 is waiting for a peripheral the CPU could start Job 2. When this waits for a peripheral the CPU could start Job 3. When Job 3 waits the CPU could then go back to Job 1

23 Now consider a multitasking O/S with these same jobs.
When Job 1 is waiting for a peripheral the CPU could start Job 2. When this waits for a peripheral the CPU could start Job 3. When Job 3 waits the CPU could then go back to Job 1

24 Introduction to Operating Systems
Notice that the CPU is active for the same amount of time, but finishes all three jobs quicker. Also there is no time when the CPU is inactive. This is called Scheduling and very complex routines have been written to perform the make this efficient.

25 Introduction to Operating Systems
Job Priorities Some jobs will be more ‘important’ than others. For example a job with a lot of input would have a high priority. The user would not want to spend a lot of time waiting for the computer. A job with hardly any user input would be classed as low priority. Each job will be given a priority rating . This is used when other jobs are loaded into the system and is called Scheduling

26 Introduction to Operating Systems
Scheduling The Scheduling process can be split into two – the High Level Scheduler and the Low Level Scheduler (or Dispatcher).

27 Introduction to Operating Systems
The High Level Scheduler Remember that currently we are talking about a main frame that is running many different programs, perhaps from different terminals or perhaps a batch of jobs. Not all the programs can be loaded into memory at the same time, so are placed in a queue somewhere (perhaps on tape or disc) ready for use later on.

28 Introduction to Operating Systems
The High Level Scheduler determines which jobs are to be placed in memory and which to remove. This is achieved by looking at the priorities of the tasks. However this all depends upon various other criteria: There is sufficient room for it in memory; All associated input files are on-line; The necessary peripherals are also on-line. If the job cannot fulfil the above then it is not run and left in the queue

29 Load Job No Enough Memory? Yes No Files On Line? Yes No Printer On Line? Yes Process Job

30 Introduction to Operating Systems
The Low Level Scheduler (or Dispatcher) When a program is run machine code instructions will be executed. Each instruction will normally produce a series of tasks to be accomplished. This set of tasks is called a process.

31 Introduction to Operating Systems
When a job has been loaded into memory the dispatcher determines which process is to be sent to the CPU. To achieve this the dispatcher must record the status of each process, selecting from the following possibilities

32 Introduction to Operating Systems
The Dispatcher has a vital role within the OS. It has to switch different processes so that each has a fair share of CPU time, but giving most time to the important ones. It also has to make it appear that the CPU is being used solely by one user, even though there may be quite a few logged on.

33 Introduction to Operating Systems
Over the years several strategies have been developed to achieve the most efficient Dispatcher. All have been tailored to a particular system – a network will have different needs compared to a palm top for instance

34


Download ppt "Ainsley Smith Tel: 0161 953 5995 Ex 3374 Ainsley_smith@mancat.ac.uk http://asmithatmancat.wordpress.com/ Ainsley_smith@mancat.ac.uk."

Similar presentations


Ads by Google