What's An OS For?: - Purposes
What's An OS For?: - Purposes
• Purposes:
– To allow a computer to be SHARED among
several tasks or jobs safely and efficiently.
• Sequentially in time, or
• In parallel (timesharing, or batch)
– To make the machine easier to program
– To help in porting programs between machines
What is an operating system?
• The operating system: A collection of
programs that manages and controls applications
and other software, and coordinates the various
hardware components to perform tasks requested
by the user.
– Allows use of (partial list!)
• the keyboard
• the mouse
• printing to a printer of your choice
• viewing information on a monitor
• saving or retrieving files
• formatting a disk
• running programs
• controlling any external device attached to the computer
What is an OS?
• Resource Manager of physical (HW) devices ...
• Abstract machine environment. The OS defines a
set of logical resources (objects) and operations on
those objects (an interface on the use of those
objects).
• Allows sharing of resources. Controls interactions
among different users.
• Privileged, protected software - the kernel.
Different kind relationship between OS and user
code (entry via system calls, interrupts).
What is an OS?
• Birthplace of system design principles:
e.g., Separation of Policy and Mechanism.
• Supporting role - to provide services for the
target workload, not an end product itself.
• Not the command interpreter and not a
library of utility functions that can be linked
into user programs.
HW Resources to be Managed
• CPU (computation cycles)
• Primary memory
• Secondary memory devices (disk, tapes)
• Networks - bandwidth for web transactions
• Input devices (keyboard, mouse, camera)
• Output devices (printers, display, speakers)
Working simultaneously. Shared among tasks.
||ism - concurrent demands from all directions.
Examples of Abstractions
• Threads or Processes (Fork)
• Address spaces (Allocate)
• Files (Open, Close, Read, Write)
• Messages (Send, Receive)
What is an operating system?
• BIOS (Basic Input Output System)
– Small unchangeable part of the operating
system in the ROM.
– BIOS:
• A collection of programs that have the capability of
communicating with peripheral devices.
– Keyboards, Disk drives, printers, display/monitors, and
other devices.
• BIOS most important task: Loads the operating
system into RAM and turns control of the computer
over to it.
Booting the Computer
• “Booting up”(Starting) the computer:
– The computer invokes a stripped-down version of the operating
system found in ROM. (Makes the computer recognize the
keyboard, floppy and the hard disk drives.)
– Diagnostics are run on RAM and any cards residing in the
computer.
– The programs in ROM make the computer look for the rest of the
operating system on the floppy disk.
• If it can’t find the floppy disk, it will look for rest of the operating
system on the hard disk.
– The operating system (found on the floppy or hard disk drive) is
loaded into RAM.
– The programs residing in RAM now control the computer.
Booting the Computer
• Cold boot:
– Starting up the computer by turning the power
on.
– Operating system in ROM looks for and loads
the remaining operating system into RAM.
• Warm boot:
– Reloads the operating system into RAM
without disrupting the power to the disk drives
or power supply.
Booting the Computer
• Booting with Multiple Operating Systems
– Common when you need to run programs
recognized by older operating systems.
• Example: MS DOS and Windows
– Common when you need two different
operating systems and have only one machine.
• Example: Macintosh X and Windows
• Comparing:
– Windows 2000
– Macintosh X
– Linux
• Computer Start-up Requirements
– The majority of all operating systems reside on the hard
drive of the computer.
• Operating system must be loaded into RAM.
• Time to boot up:
– Depends on how many features have been added to the operating
system.
– All three boot up in less than one minute.
Main Issues in OS
• Structure • Protection,
• Concurrency and Access control,
Synchronization Security
• Extensibility, • Reliability,
Compatibility Fault Tolerance
• Communication • Persistence, Longevity
• Sharing • Scalability,
• Naming Distribution
• Performance • Accounting - $$