Operating Systems

Download Report

Transcript Operating Systems

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