Chapter 1
Chapter 1
Chapter 1
INTRODUCTION
TO
OPERATING SYSTEM
Topics
These programs load and run applications such as word processors and
spreadsheets. Most operating systems support multitasking, or the ability to
run more than one application at a time.
When a user requests a program, the operating system locates the
application and loads it into the primary memory or RAM of the computer.
As more programs are loaded, the operating system must allocate the
computer resources.
4) Support for built-in utility programs
The operating system sits between the programs and the Basic Input
Output System (BIOS).
The BIOS controls the hardware. All programs that need hardware
resources must go through the operating system.
The operating system can either access the hardware through the
BIOS or through the device drivers.
OS STRUCTURE
1. Monolithic
2. Layered
3. Microkernel
4. Networked & Distributed
1) Monolithic
¨ Any module can call any other module without any reservation.
¨ The system is a collection of procedures
¨ Each procedure can call any other procedure
¨ No information hiding
¨ A system call interface (main program, sys calls, utility functions)
¨ Example system : Linux, Windows, CP/M
(Control Program for Microcomputers) & MS-DOS
Cont. Monolithic
Pros
1) Shared kernel space
2) Good performance
Cons
1) No information hiding
2) Inflexible
3) Chaotic
4) Difficult to understand
Monolithic Operating System
¨When a user mode program calls a system service, the processor traps the call and switches
the calling thread to kernel mode.
¨ Completion of system service, switches the thread back to the user mode, by the OS and
allows the caller to continue.
A simple structuring model for a monolithic system
¨ Layer 1 did the memory management. It allocated space for processes in main
memory and on a 512k word drum used for holding parts of processes (pages)for
which there was no room in main memory. The layer 1 software took care of making
sure pages were brought into memory whenever they were needed.
¨ Layer 2 handled communication between each process and the operator console.
Above this layer each process effectively had its own operator console.
¨ Layer 3 took care of managing the I/O devices and buffering the information
streams to and from them.
¨ Layer 4 was where the user programs were found. They did not have to worry
about process, memory, console, or I/O management.
1. Single-processor systems
System that execute the one process at the time and the
next job when process is completed.
A single processor is one which the system has single
CPU. In a single processor system there will never be more
than one running process.
If there are more processes, the rest will have to wait until
the CPU is free.
Cont…
SUN / SOLARIS
MICROSOFT WINDOWS
LINUX
MAC OS
VARIOUS VERSIONS OF WINDOWS OPERATING SYSTEM
WINDOWS 95
WINDOWS 98 WINDOWS 2000 WINDOWS ME
Caching Multiprogramming
CONCEPT
S IN
RELATIO
N TO OS
Time
Spooling
Sharing
Buffering
Multitasking
The ability to execute more than one task at the same time, a task being a
program.
In multitasking, only one CPU is involved, but it switches from one program to
another so quickly that it gives the appearance of executing all of the programs at
the same time.
In preemptive multitasking, the operating system parcels out CPU time slices to
each program.
In cooperative multitasking, each program can control the CPU for as long as it
needs it. If a program is not using the CPU, however, it can allow another program
to use it temporarily.
OS/2, Windows 95, Windows NT, the Amiga operating system and UNIX use
preemptive multitasking
Microsoft Windows 3.x and the MultiFinder (for Macintosh computers) use
Multiprogramming
In this system, multiple jobs are loaded into the central memory, and
each is allotted some CPU-TIME, a tiny fraction of a second during which
it receives the CPU’s attention.
An example of the command line. Each command is typed out after the 'prompt', and then its output
appears below, working its way down the screen. The current command prompt is at the bottom.
2. Voice User Interfaces
An example of a graphical user interface. Programs take the form of images on the screen, and
the files, folders, and applications take the form of icons and symbols. A mouse is used to
navigate the computer.
4. Web Based Form Interface
• Example:
• Student registration form
• Borrowing books form(library) online
Example of Web Based Form Interface
NE W BOOK
Title ISBN
Author Price
Publication
Publisher date
Number of
Edition copies
Classification Loan
status
Date of
Order
purchase
status
OS
Interfaces How it works? Example
Portability
User programs that follow the API’s
definition are portable.
An API can provide a common interface for
different implementations of a service.
For example, the UNIX file system API is
the same for all kinds of devices.
Using an API allows upgrading system
software without changing user programs
RELATIONSHIP BETWEEN
SYSTEM CALLS AND API
The user application use open() system call to request kernel providing service. The system
call table will be searched and find the corresponding system call number. The real
implementation is in kernel space. When execution accomplished, there is a result return to
user mode.
60