Presentation is loading. Please wait.

Presentation is loading. Please wait.

IT Systems Operating System EN230-1 Justin Champion C208 – 3273

Similar presentations

Presentation on theme: "IT Systems Operating System EN230-1 Justin Champion C208 – 3273"— Presentation transcript:

1 IT Systems Operating System EN230-1 Justin Champion C208 – 3273

2 IT Systems Contents What is it? Why are they there Functionality which is given by the OS

3 IT Systems Most Computers have this in some form Famous Examples Microsoft Windows Linux Unix Apple Panther Some you pay for some are free A operating system (OS) is large program which controls the hardware and software on a device Computers which have limited functionality do not need a OS

4 IT Systems What does the OS do At the most simplest Controls the use of the hardware Memory Processor Interfaces Controls the software which runs on the machine CPU time allocated Allowing multiple application to run at once, ensuring that they all get a fair share of the available resources Allows a programmer to create software without worrying about the underlying hardware The hardware is abstracted away from the programmer. Instructions sent to a piece of hardware will be converted to the correct format

5 IT Systems Types of OS Single user Multi-Tasking Windows and Linux are examples of this, with multiple things happening at once Printing whilst writing a document Single-user, Single Task Only one user using the device accessing one item at a time. There are not many of these operating system available now Multi user, Multi-Tasking Multiple users carrying out a large number of tasks at once Windows server edition and UNIX is an example of this There are other types of OS Real-Time OS, etc

6 IT Systems Starting the machine The BIOS carries out its interactions BIOS Basic Input Output System (BIOS) Discussed in last weeks lecture The hard disk is accessed looking for a small program This is called the bootstrap This is located on the hard disc at track zero, head zero, sector one In modern motherboards/BIOS the hard disc to boot from can be selected or can be a CD-ROM

7 IT Systems Bootstrap This small program takes responsibility for locating the main operating system It will allocate an area of memory Load a limited number of drivers to control hardware Once located it will start the loading of the OS will begin Control is then handed to the OS

8 IT Systems The OS Then loads the Kernel Microsoft has a kernel as well as Linux It is just that Linux push the term Kernel more Kernel is a piece of software which remains in memory It takes control of Memory Management Task Management Process Management Disc Management Size As the kernel remains in memory it is essential that it is small

9 IT Systems Shell This is the software which interacts with the Kernel Kernel GUI Shell Command Line Shell Hardware

10 IT Systems What the OS does Process Management A process is a small program which needs access to the CPU. A single process may generate several processes Example would be Microsoft Word Each of these processes will need access to the processor and memory

11 IT Systems Multitasking OS on a single CPU This is where more than one task can appear to take place at once Only one thing can be done by a processor at any time To allow the effect of multiprocessing on a single processor Process are swapped in and out of memory The work being stored on the stack This can the be retrieved later The process manager of the OS allocates a number of CPU cycles to the process After this all of the settings and position the process is stored and another process can use the CPU

12 IT Systems Single task OS These are easier to create They in theory will work on a single task until it is complete and then start the next In reality there are certain conditions that the processor must respond to. The processor is informed another process needs the processor by a interrupt. Consider a interrupt as a signal to indicate to the CPU to look at it. It is the same as in a lecture whilst the lecturer is talking if someone stands up. The lecture will stop talking and look at the student waiting for information

13 IT Systems Interrupts Interrupts can be generated by hardware or software A standard PC has 15 hardware and 255 software interrupts A lot of the hardware interrupts are defined and set IRQ NumberDescriptionIRQ NumberDescription 0System Timer8Real-Time Clock 1Keyboard9Open 2Cascade Interrupt10Open 3Second Serial port11Open 4First Serial Port12PS2 mouse 5Sound Card13Floating point unit 6Floppy Disk Controller14Primary IDE hard disc 7Parallel Port15Secondary IDE hard disc

14 IT Systems Interrupt types The processor does not have to respond to all interrupts Some interrupts can be Masked This indicates that the processor can ignore them A keyboard interrupt for example, this can wait until a suitable time Non maskable interrupts indicate that these must be dealt with quickly A Memory error is a example of this

15 IT Systems Multitask operating systems If we have more than one process on a machine hardware must be shared This give the opportunity for more than one process to request a single resource, like the hard disc If process A requires the hard disc and tries to write to a file Process B then gets access to the CPU and requires the hard disc trying to write a file locks the hard disc, but can not get access to it because process A has it Now two processes have both locked the hard disc, neither of them able to do anything This is referred to as Deadlock

16 IT Systems Deadlock The system will appear to have crashed if this occurs The system has not crashed just nothing useful can be done The software itself or the OS needs to deal with this condition Other condition to prevent is Live lock

17 IT Systems Live lock Process A wants to write to the hard disc Process B requests to write to the hard disc Process A releases the hard disc Process B now gain access to the hard disc Process A requests the hard disc Process B releases the hard disc Process A gets the hard disc Process B requests the hard disc Etc, etc, etc. No work is actually done As each device gets the device something else requests it This is referred to as Live lock, where processes are continuously changing but no useful work is actually done

18 IT Systems Methods of dealing with these conditions Semaphore A variable is set which is set to indicate that a resource is being used at a time Once this variable is returned to a state where no one is using it the next device can request access to the device and then set the semaphore to busy again Management of the processes

19 IT Systems Management of the processes Managing the processes prevent problems All resources can be given a number The processes which then request the resource must request them in order All resource request must be done at the beginning of the processes life In this respect if all of the resources can be granted the process can wait

20 IT Systems Management of the processes In the event of a problem Rollback Roll the processes back to a point where this condition did not occur Easier said than done Kill the process Making it restart and request the resources again Pre-emption Forcibly remove a resource from one of the processes

21 IT Systems Multitasking OS Each of the processes is given a limited amount of time with the processors When it is the turn of a new task the current state and data of the process is saved and the new process is loaded into the CPU If the number of CPU cycles which are allocated to each task is too small then most of these are wasted swapping into the processor This is referred to as thrashing, were no real work is done If too many CPU cycles are allocated to each process then the machine will appear to be running slowly as it will have to wait for each process to get a turn at the processor The processor management part of the OS needs to balance these requirements.

22 IT Systems Memory Management Physical memory Is a finite resource Ensures that the current application is in main memory Managing the Virtual Memory As required, some data will be moved out of memory into Virtual memory on the hard disk

23 IT Systems Links Microsoft discussion of the Windows XP Kernel functionality l/default.aspx

24 IT Systems Summary of what we have discussed What A OS is BIOS What the OS does Process Management Dead Locks Live Locks Memory Management

Download ppt "IT Systems Operating System EN230-1 Justin Champion C208 – 3273"

Similar presentations

Ads by Google