Download presentation
Presentation is loading. Please wait.
1
Component 2 6G, H, I, J, K
2
Assessment outcomes 6G – Explain the following types of system: batch, single-user (standalone), multi-user (multi-access), multi-tasking, and multi-programming 6H – Explain the need to design systems that are appropriate to the variety of different users at all levels and in different environments 6I – Describe a range of conditions of events which could generate interrupts 6J – Describe interrupt handling and the use of priorities 6K - Describe factors involved in allocating different priorities
3
Batch Processing In the early days of computers, operating systems were very basic. If a person wanted to use a computer for something (a 'job') they would need to load their program into the computer and then load up the computer with the input data. The input data might be held in a coded form on punched cards. When both the program had been loaded up and the punched cards put into the input device, the program would be 'executed'. The program would read the data, process it and then send the output to a printer. When the job had been finished, the next person could use the computer. This changeover wasted a lot of the CPU's time. The CPU is a very fast device. If it has to wait while data is read into it or while data is sent out of it, then it won't be working to its full capacity. This problem is sometimes referred to as a 'speed mismatch' problem. We have seen how buffers help overcome the problem of speed mismatch and we will meet this problem again later.
4
Batch Processing To improve the situation, a new input device was designed that could hold lots of punched cards. Similar jobs were collected together and put into a 'batch'. It was possible to stack all of the input cards together for one batch process, and then also have some other input cards collected together for a different batch process. Of course, if you were going to put lots of jobs together into a batch, and have lots of batches together, then there needed to be a way of managing and coordinating these different processes.
5
Batch Processing The program that could control multiple batches running concurrently was called the Job Control Language (JCL), this would tell the computer: When to start processing the batch. Which program to use with which punched cards. What printer to use for the output or what file to write the output to. Batch processing improved matters because this type of processing ensured that the CPU was being used as efficiently as possible - it wasn't waiting around so much while an operator regularly loaded in programs and data. Although batch processing systems have their roots in systems developed many years ago, they are still much in evidence today.
6
Single User Systems This kind of operating system is designed for one person to use at any one time. It is typically designed to be used in computer systems (such as Microsoft Windows, Mac OS and Linux), tablets and mobile phones (such as Windows Phone, Sailfish OS, Blackberry, Android and Firefox OS). These kinds of operating systems can often be set-up so that different users can use it, each with their own account, but only one user can use it at any one time.
7
Multi-User (Multi-Access)
This is an operating system designed to be used by many people at the same time. It is typically found in networked systems and mainframes, where multiple users on computers or terminals can gain access to a single computer system with one operating system on it. The operating system has to monitor all of the jobs that each user wants, load up into its memory the necessary applications and manage the users accessing the applications. The different users on a multi-user operating system are accessing the same single operating system, as opposed to a set of computers on a network, each with their own operating system. There is a large cost saving for organisations using this kind of system, not least because older computers can still run very effectively on it. However, if the main computer goes down, it can have an impact on many different users and stop them working.
8
Single User vs Multi User
A single-user operating system is a system in which only one user can access the computer system at a time. On the other hand, a multi-user operating system allows more than one user to access a computer system at one time. The server on a network is a multi-user system, each individual device is a single user system. Why?
9
Multi-Tasking These kinds of operating systems are able to 'multi-task'. That simply means that they can have open many applications and can allow the user to use them all at (apparently) the same time. It is 'apparently' because the CPU can only actually work on one application at a time, but it can switch so quickly between multiple applications that the user thinks that they are listening to music, writing an , using their chat program and talking on Skye all at the same time.
10
Multi-Programming A computer that can have open many applications and can allow the user to use them all at (apparently) the same time is also known as a 'multi-programming' system. Multi-programming environments open many different applications in memory and then cycle between them all to run them. Each application gets a small slice of the CPU's time before it is stopped. Then where it is up to is saved and then the next application is started from wherever it finished off last time, and is given a small slice of the CPU's time. All applications are given a slice of CPU time in this cycle and so the CPU is kept as busy as possible.
11
Difference between multi-programming and multi-tasking
There is a subtle difference between multi- programming and multi-tasking although they are often used interchangeably. Multi-tasking is a general term describing the user using and interacting with many applications at apparently the same time. It's all about the user interacting with those programs they are using. In multi-programming, we are not talking about the user interacting with the applications. This is purely the operating system making sure that the CPU is working as hard as possible on all jobs that have to be done by giving each job a slice of CPU time in a 'round-robin' cycle (or in another order determined by a different algorithm).
12
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.
13
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….
14
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.
15
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
16
Interrupt Introduction
The simplest way of following instructions is shown below: What if something went wrong? Would this set of instructions still work?
17
Interrupts An interrupt is messages sent to the processor which stops a job due to a certain circumstance i.e. hardware failure or I/O issues The diagram on the slide previously needs to be modified to take this into account
18
Interrupt flowchart The problem with this diagram is that the original program will not finish if there are multiple interrupts. So how can we get round this?
19
Interrupt modified flowchart
The interrupts are held in a queue. Each interrupt is given a priority which determines where it is in the queue. The more important the job, the higher the priority for it to be resumed first.
20
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
21
More about Scheduling 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!?!?!??
22
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)
23
Interrupt Priority
24
Graded Exercises Complete them.
25
Pre-Reading Homework You should complete the exam questions from this week. These must be self assessed. Pre-Reading: 6L - Explain the reasons for, and possible consequences of, partitioning of main memory 6M - Describe methods of data transfer including the use of buffers to allow for differences in speed of devices 6N - Describe the principles of high level scheduling: processor allocation, allocation of devices and the significance of job priorities 6O - Explain the three basic states of a process: running, ready and blocked 6P - Explain the role of time-slicing, polling and threading You must also complete the Grade D exercises on 6L – P.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.