Fundamentals of Operating Systems - DBBM

Download Report

Transcript Fundamentals of Operating Systems - DBBM

Fundamental of
Operating Systems
Chuong Huynh
May 21, 2001
National Center for
Biotechnology Information,
National Library of Medicine,
National Institute of Health
http://www.dbbm.fiocruz.br/class/
Computer Terminology
• Hardware – the part of the system you can hit with a
hammer (I.e. the physical aspect of computers,
telecommunications, and other information technology
devices) [includescables, connectors, power supply,
peripheral devices)
• Software – Program instructions that you can only curse
at (I.e. the various kinds of programs used to operate
computers and related devices
• Middleware – programs that mediate between application
and system software or between two different application
software
• Firmware (microcode) – programming that is loaded in a
More on Unix utilities
special area of microprocessor or read-only memory on a
one time or infrequenet basis so that it is seems to be
part of the OS.
• Utility – small useful programs with limited capability
sometimes comes with the operating system but can be
used independent of the OS.
Computer Terminology - Hardware
• Motherboard?
– Motherboard is the main controller board inside the
commputer that everything else is attaches to
• Microprocessor – computer “brain” also called
central processing unit
• Memory (RAM) chips – provide the working
memory for your software (data not persistent)
Computer Terminology - Hardware
• ROM (read only memory) – ROM chips
control your computer, e.g. the Basic
Input/Output System (BIOS). Contain
instructions that tells microprocesor how
to deal with input and output.
• Hard disk and floppy disk drives – more
permanent storage of data (
• Expansion cards and slots ( add
additional features via PCI and ISA slots)
Computer Terminology - Bus
• Information travels within your PC on thin metal
conductors called bus. The CPU uses the bus
to shuttle information between parts of your PC.
The faster the bus he faster the PC can work.
• Types of bus in a PC:
– Address bus: identifiies which memory location will be
used next
– Control bus: carries signals from the control unit
makes sure the bus traffic goes smoothly
– Data bus: transfer data to and from microprocessor
and memory.
• dcar
Computer terminology – Power supply
• Power supply: start hard drive; provide safe
stable current to the motherboard
• Electrical problems:
– Voltage spikes: short duration surges in the power
line. (a billionth of a second) (common)
– Power surges: longer version of the spike (last
milliseconds)
– Brownouts (power sag): occurs when voltage occurs
when line voltage falls below required by computers
and other equipment
– Blackout: complete interruption of powe
• UPS (Uninteruptable Power Supply) and surge
protectors which protects again voltage spikes
Software + Hardware Working Together
• User input information from an input device (like a
keyboard), electrical impulses are generated. The
microprocessor (CPU) translates and temporarily
stores these impulses in its electronic memory
(RAM).
• Software also stored temporarily in RAM, translates
these impulses appropriately according to the task
or command you’ve entered.
• Information is sent by the CPU to the monitor
(output) so you can see the progress.
• Change document stored in temporary memory.
• Finished editing the document, save it permanently
to a magnetic disk (hard drive or floppy drive).
• When you want to work on the document you load
document into RAM from disk.
Do we need an operating system?
• Does a microwave oven have an operating
system? NO, not all computers have operating
systems. The more complex ones do.
How Operating Systems Work – short ver
• An operating system (OS) is a program that
after being initially loaded into the computer by
a boot program manages all the other programs
in a computer. The other programs are the
“applications”. The application program uses
the OS by making requests for services through
a defined application program interface (API).
• User interact with the OS via a user interface,
e.g. a command line or a graphical user
interface (GUI)
Operating System Does …
• It manages the hardware and software
resources of the computer system. These
resources include things such as the processor,
memory, disk space, etc.
• It provides a stable, consistent way for
applications to deal with the hardware without
having to know all the details of the hardware
Operating Systems Also Does
• In a multitasking operating system where multiple
programs can be running at the same time, the operating
system determines which applications should run in what
order and how much time should be allowed for each
application before giving another application a turn.
• It manages the sharing of internal memory among
multiple applications.
• It handles input and output to and from attached
hardware devices, such as hard disks, printers, and dialup ports.
• It sends messages to each application or interactive user
(or to a system operator) about the status of operation
and any errors that may have occurred.
• It can offload the management of what are called batch
jobs (for example, printing) so that the initiating
application is freed from this work.
• On computers that can provide parallel processing, an
operating system can manage how to divide the program
so that it runs on more than one processor at a time.
How OS Works – Detail Version (1)
• Power on  run instructions in ROM 
examine system hardware for proper
functionality
• Power on Self Test (POST) checks the CPU,
memory, and the BIOS for errors and stores the
result in a special memory location
• POST successful  software loaded in ROM
(firmware) begin to activate computer disk
drives
• The computer activates the hard drives and
finds the first piece of the OS, the bootstrap
loader which loads the OS into memory, sets up
small driver programs (interface with hardware
subsystems on computer).
• OS has control of the computer now.
How OS Works – Detailed Version (2)
• Processor management (process or
thread)
• Memory management
• Device management
• Storage management
• Application management
• User interface
Core of all operating Systems, but some OS
Have additional functionality e.g via built-in utilities
Processor Management
• OS schedule work done by the processor as
either a process or a thread.
• A process is software that performs some action
and can be controlled by a user, by other
applications or by the operating system.
• In multitasking system: OS arrange execution of
applications so you believe several things are
happening at once.
Memory and Storage Management
OS needs to
accomplish
• Each process must have enough memory to
execute and it can neither run into the memory
space of another process nor be run into by
another process (memory boundaries for types
of software and for individual applications
• Next the different types of memory in the
system must be used properly so that each
process can run effectively.:
Device Management
• The path between OS and all hardware not on
the motherboard goes through a special
program called a driver
• Driver acts as a translator between electrical
signals of the hardware sub systems and high
level programming languages of OS and
application programs.
Application Interface
• Application Programming Interfaces (API’s) let
application programmers use functions of the
computer and OS without having to directly
keep track of all details in the CPU’s operation.
– simplify matters.
• User interface provides a consistent way for a
user to interact with a computer, e.g. a graphical
user interfacek
• Unix user interface is via a shell allow it easier
to use and manipulate the operating system
(bash, Korn shell, C Shell) and graphical user
interface like Konqueror, gnome,
Unix SUKH
SHELL
Utility
Kernel
Hardware
Operating Systems For Bioinformatics
• Apple Macintosh: ease of use, popular to
educators; Disadvantage: Traditionally, NO
COMMAND LINE INTERFACE; Mac OS X (but
currently really not many software available)
MacVector
Single User MultiTasking• Microsoft Windows: most common desktop
environment; software available
• IBM OS/2 Warp:
• BeOS: too new no established software
• SGI IRIX:
MultiUser
• Sun Solaris:
MultiUser
• Linux (various flavors):
• BSD (Berkeley
What are the
Single User MultiTasking
choices? alot –>
http://www2.tunes.org/Review/OSes.html