operating systems. overview what is an operating system (os) what is an operating system (os) what...
TRANSCRIPT
Operating Operating SystemsSystems
OverviewOverview
What is an Operating System (OS)What is an Operating System (OS) What Operating Systems do.What Operating Systems do. Operating system issuesOperating system issues Kinds of Operating SystemsKinds of Operating Systems
What is an OS?What is an OS?
““An operating system is a layer of An operating system is a layer of software which takes care of technical software which takes care of technical aspects of a computer's operation. It aspects of a computer's operation. It
shields the user of the machine from the shields the user of the machine from the low-level details of the machine's low-level details of the machine's operationoperation and provides frequently and provides frequently
needed facilities” needed facilities”
Taken fromTaken from
http:// http://www.iu.hio.nowww.iu.hio.no
What is an OS? What is an OS?
An Operating System makes the An Operating System makes the computing power available to users computing power available to users by controlling the hardwareby controlling the hardware
Without an OS, computers would Without an OS, computers would only be able to run one program at a only be able to run one program at a timetime
Programs must run according to the Programs must run according to the rules of the OSrules of the OS
What Operating Systems What Operating Systems do:do:
1.1. ProvideProvide software software for driving the for driving the hardware of the computer hardware of the computer
2.2. Implement a Implement a file systemfile system which which provides a way of organizing files provides a way of organizing files logicallylogically
3.3. Distribute computer resources Distribute computer resources between applicationsbetween applications
1. Software that Runs 1. Software that Runs HardwareHardware
A driver is software that designed to A driver is software that designed to run a piece of hardwarerun a piece of hardware Ex: Printer, fancy keyboard, scannerEx: Printer, fancy keyboard, scanner
New drivers are built into the OS. New drivers are built into the OS. This is why it is often necessary to This is why it is often necessary to restart your computer when a driver restart your computer when a driver is addedis added
2. File System2. File System
The OS must save files in a logical The OS must save files in a logical efficient wayefficient way Hard drive, floppy diskHard drive, floppy disk Through FAT (File Allocation Table)Through FAT (File Allocation Table)
Recall, FAT32 vs FAT16Recall, FAT32 vs FAT16 32 bit addressing means each section of 32 bit addressing means each section of
memory is broken up into 2^32 memory is broken up into 2^32 individual addressing locationsindividual addressing locations
Much faster to find a file!Much faster to find a file!
File Systems: NTFSFile Systems: NTFS
NTFS is the “NT File System” NTFS is the “NT File System” developed by Microsoftdeveloped by Microsoft
Faster and more efficient.Faster and more efficient. XP and Vista would use NTFSXP and Vista would use NTFS
RAMRAM
OS is also responsible for memory OS is also responsible for memory allocation in RAM allocation in RAM
The OS itself stays in RAM while the The OS itself stays in RAM while the computer is oncomputer is on
OS controls what is moved into and OS controls what is moved into and out of RAMout of RAM
Virtual MemoryVirtual Memory
Several programs can’t fit in main Several programs can’t fit in main memory so what happens?memory so what happens?
Virtual memory is parts of active Virtual memory is parts of active programs stored on the hard drive.programs stored on the hard drive. EX: I’ve got Windows XP running, MS Word, EX: I’ve got Windows XP running, MS Word,
3 Explorer Windows one being active3 Explorer Windows one being active Rather then not letting you open more Rather then not letting you open more
programs the OS will run them using programs the OS will run them using Virtual MemoryVirtual Memory
3. Distributing Computer 3. Distributing Computer ResourcesResources
The CPU can only do one thing at a The CPU can only do one thing at a time. Fortunately it can do billions of time. Fortunately it can do billions of things per second…things per second…
The OS is responsible for giving CPU The OS is responsible for giving CPU time to currently running applications.time to currently running applications.
The OS also makes sure two The OS also makes sure two applications don’t try accessing the applications don’t try accessing the same piece of hardware at the same same piece of hardware at the same time.time.
2 OS Issues2 OS Issues
Concurrency control (multi-tasking)Concurrency control (multi-tasking) DeadlockDeadlock
Concurrency ControlConcurrency Control
Several programs running at a timeSeveral programs running at a time Means Sharing CPU timeMeans Sharing CPU time
While a program waits for an I/O While a program waits for an I/O operation another program can use operation another program can use the CPUthe CPU
DeadlockDeadlock Program A wants to copy from disk1 to Program A wants to copy from disk1 to
disk2 and takes control of disk1disk2 and takes control of disk1
Program B wants to copy from disk2 to Program B wants to copy from disk2 to disk1 and takes control of disk2disk1 and takes control of disk2
Program A must wait until program B Program A must wait until program B releases disk2 and program B must wait releases disk2 and program B must wait until program A releases disk1until program A releases disk1
Programs A and B will wait forever!Programs A and B will wait forever!
Deadlock PreventionDeadlock Prevention
OS must have a systematic way of OS must have a systematic way of controlling program execution controlling program execution
This is a very complex problemThis is a very complex problem One simple not very efficient One simple not very efficient
solution is to have programs solution is to have programs “timeout”, in our example program A “timeout”, in our example program A would timeout first and release disk would timeout first and release disk 1 and try again shortly 1 and try again shortly
Kinds of Operating Kinds of Operating SystemsSystems
What’s the best?What’s the best? Windows=Microsoft =monopoly!!!Windows=Microsoft =monopoly!!!
Success due to???Success due to??? Other alternatives:Other alternatives:
Mac- I’ve never met a sad Mac userMac- I’ve never met a sad Mac user Linux/Unix- Small very efficient, maybe Linux/Unix- Small very efficient, maybe
less intuitiveless intuitive
Work on OS AssignmentWork on OS Assignment