Вы находитесь на странице: 1из 4

Operating Systems Lecture Notes

Lecture 1
Overview and History
What is an operating system? Hard to define precisely, because operating systems arose
historically as people needed to solve problems associated with using computers.
Much of operating system history driven by relative cost factors of hardware and people.
Hardware started out fantastically expensive relative to people and the relative cost has been decreasing
ever since. Relative costs drive the goals of the operating system.
o In the beginning Expensive Hardware, Cheap People !oal maximi"e hardware utili"ation.
o #ow Cheap Hardware, Expensive People !oal ma$e it easy for people to use
computer.
In the early days of computer use, computers were huge machines that are expensive to buy, run
and maintain. %omputer used in single user, interactive mode. &rogrammers interact with the machine at
a very low level ' flic$ console switches, dump cards into card reader, etc. (he interface is basically the
raw hardware.
o &roblem %ode to manipulate external I)* devices. Is very complex, and is a ma+or
source of programming difficulty.
o ,olution -uild a subroutine library .device drivers/ to manage the interaction with the
I)* devices. (he library is loaded into the top of memory and stays there. (his is the first example of
something that would grow into an operating system.
-ecause the machine is so expensive, it is important to $eep it busy.
o &roblem computer idles while programmer sets things up. &oor utili"ation of huge
investment.
o ,olution Hire a speciali"ed person to do setup. 0aster than programmer, but still a lot
slower than the machine.
o ,olution -uild a batch monitor. ,tore +obs on a dis$ .spooling/, have computer read
them in one at a time and execute them. -ig change in computer usage debugging now done offline
from print outs and memory dumps. #o more instant feedbac$.
o &roblem 1t any given time, +ob is actively using either the %&2 or an I)* device, and
the rest of the machine is idle and therefore unutili"ed.
o ,olution 1llow the +ob to overlap computation and I)*. -uffering and interrupt
handling added to subroutine library.
o &roblem one +ob can3t $eep both %&2 and I)* devices busy. .Have compute'bound +obs
that tend to use only the %&2 and I)*'bound +obs that tend to use only the I)* devices./ !et poor
utili"ation either of %&2 or I)* devices.
o ,olution multiprogramming ' several +obs share system. 4ynamically switch from one
+ob to another when the running +ob does I)*. -ig issue protection. 4on3t want one +ob to affect the
results of another. Memory protection and relocation added to hardware, *, must manage new hardware
functionality.
o *, starts to become a significant software system. *, also starts to ta$e up significant
resources on its own.
&hase shift %omputers become much cheaper. &eople costs become significant.
o Issue It becomes important to ma$e computers easier to use and to improve the
productivity of the people. *ne big productivity sin$ having to wait for batch output .but is this really
true?/. ,o, it is important to run interactively. -ut computers are still so expensive that you can3t buy one
for every person. ,olution interactive timesharing.
o &roblem *ld batch schedulers were designed to run a +ob for as long as it was utili"ing
the %&2 effectively .in practice, until it tried to do some I)*/. -ut now, people need reasonable response
time from the computer.
o ,olution &reemptive scheduling.
o &roblem &eople need to have their data and programs around while they use the
computer.
o ,olution 1dd file systems for 5uic$ access to data. %omputer becomes a repository for
data, and people don3t have to use card dec$s or tapes to store their data.
o &roblem (he boss logs in and gets terrible response time because the machine is
overloaded.
o ,olution &rioriti"ed scheduling. (he boss gets more of the machine than the peons. -ut,
%&2 scheduling is +ust an example of resource allocation problems. (he timeshared machine was full of
limited resources .%&2 time, dis$ space, physical memory space, etc./ and it became the responsibility
of the *, to mediate the allocation of the resources. ,o, developed things li$e dis$ and physical memory
5uotas, etc.
*verall, time sharing was a success. However, it was a limited success. In practical terms, every
timeshared computer became overloaded and the response time dropped to annoying or unacceptable
levels. Hard'core hac$ers compensated by wor$ing at night, and we developed a generation of pasty'
loo$ing, unhealthy insomniacs addicted to caffeine.
%omputers become even cheaper. It becomes practical to give one computer to each user. Initial
cost is very important in mar$et. Minimal hardware .no networ$ing or hard dis$, very slow
microprocessors and almost no memory/ shipped with minimal *, .M,'4*,/. &rotection, security less
of an issue. *, resource consumption becomes a big issue .computer only has 6789 of memory/. *,
bac$ to a shared subroutine library.
Hardware becomes cheaper and users more sophisticated. &eople need to share data and
information with other people. %omputers become more information transfer, manipulation and storage
devices rather than machines that perform arithmetic operations. #etwor$ing becomes very important,
and as sharing becomes an important part of the experience so does security. *perating systems become
more sophisticated. ,tart putting bac$ features present in the old time sharing systems .*,):, Windows
#(, even 2nix/.
Rise of networ$. Internet is a huge popular phenomenon and drives new ways of thin$ing about
computing. *perating system is no longer interface to the lower level machine ' people structure
systems to contain layers of middleware. ,o, a ;ava 1&I or something similar may be the primary thing
people need, not a set of system calls. In fact, what the operating system is may become irrelevant as
long as it supports the right set of middleware.
#etwor$ computer. %oncept of a box that gets all of its resources over the networ$. #o local file
system, +ust networ$ interfaces to ac5uire all outside data. ,o have a slimmer version of *,.
In the future, computers will become physically small and portable. *perating systems will
have to deal with issues li$e disconnected operation and mobility. &eople will also start using
information with a psuedo'real time component li$e voice and video. *perating systems will have to
ad+ust to deliver acceptable performance for these new forms of data.
What does a modern operating system do?
o Provides !stractions Hardware has low'level physical resources with complicated,
idiosyncratic interfaces. *, provides abstractions that present clean interfaces. !oal ma$e computer
easier to use. <xamples &rocesses, 2nbounded Memory, 0iles, ,ynchroni"ation and %ommunication
Mechanisms.
o Provides Standard "nter#ace !oal portability. 2nix runs on many very different
computer systems. (o a first approximation can port programs across systems with little effort.
o $ediates %esource &sage !oal allow multiple users to share resources fairly,
efficiently, safely and securely. <xamples
Multiple processes share one processor. .preemptable resource/
Multiple programs share one physical memory .preemptable resource/.
Multiple users and files share one dis$. .non'preemptable resource/
Multiple programs share a given amount of dis$ and networ$ bandwidth
.preemptable resource/.
o Consumes %esources ,olaris ta$es up about =Mbytes physical memory .or about
>788/.
1bstractions often wor$ well ' for example, timesharing, virtual memory and hierarchical and
networ$ed file systems. -ut, may brea$ down if stressed. (imesharing gives poor performance if too
many users run compute'intensive +obs. ?irtual memory brea$s down if wor$ing set is too large
.thrashing/, or if there are too many large processes .machine runs out of swap space/. 1bstractions
often fail for performance reasons.
1bstractions also fail because they prevent programmer from controlling machine at desired
level. <xample database systems often want to control movement of information between dis$ and
physical memory, and the paging system can get in the way. More recently, existing *, schedulers fail
to ade5uately support multimedia and parallel processing needs, causing poor performance.
%oncurrency and asynchrony ma$e operating systems very complicated pieces of software.
*perating systems are fundamentally non'deterministic and event driven. %an be difficult to construct
.hundreds of person'years of effort/ and impossible to completely debug. <xamples of concurrency and
asynchrony
o I)* devices run concurrently with %&2, interrupting %&2 when done.
o *n a multiprocessor multiple user processes execute in parallel.
o Multiple wor$stations execute concurrently and communicate by sending messages over
a networ$. &rotocol processing ta$es place asynchronously.
*perating systems are so large no one person understands whole system. *utlives any of its original
builders.
(he ma+or problem facing computer science today is how to build large, reliable software
systems. *perating systems are one of very few examples of existing large software systems, and by
studying operating systems we may learn lessons applicable to the construction of larger systems.

Вам также может понравиться