0% found this document useful (0 votes)
22 views44 pages

AACHAPTER1

Uploaded by

h240223t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views44 pages

AACHAPTER1

Uploaded by

h240223t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 44

Operating Systems

(OS) Introduction
BEC 1103
Introduction: Operating
Systems Overview

•Definitions
•Views of an operating system
•Desirable qualities of an OS
•Objectives of an Operating system
Cont…
• Windows comes preloaded in most
computers and it is the OS for desktops
and personal computers
• Mobile cellphones have mobile OS for
example google android or apple iOS

• Before downloading any program or


application be aware that it may not be
available for your OS
What are computers?
• Computers are machines that perform tasks
or calculations according to a set of
instructions, or programs.
• The first fully electronic computers,
introduced in the 1940s, were huge
machines that required teams of people to
operate. Compared to those early machines,
today's computers are amazing.
Cont…
• Computers work through an interaction of
hardware and software. Hardware refers to
the parts of a computer that you can see and
touch, including the case and everything
inside it. The most important piece of
hardware is a tiny rectangular chip inside your
computer called the central processing unit
(CPU), or microprocessor. It's the "brain" of
your computer—the part that translates
instructions and performs calculations.
Cont…..
• Hardware items such as your monitor,
keyboard, mouse, printer, and other
components are often called hardware
devices, or devices.
• Software refers to the instructions, or
programs, that tell the hardware what to do. A
word-processing program that you can use to
write letters on your computer is a type of
software.
Cont..
• The operating system (OS) is a software that
manages your computer and the devices
connected to it. Windows is a well-known
operating system.
A computer system
A computer system can be divided into four components
•Hardware – provides basic computing resources CPU,
memory, I/O devices
•Operating system
Controls and coordinates use of hardware among various
applications and users
•Application programs – define the ways in which the
system resources are used to solve the computing problems
of the users
Word processors, web browsers, database systems, video
games
•Users
People, machines, other computers
Cont….
Cont..
Utilities are small programs that provide an
addition to the capabilities of an OS

Examples are windows task manager


You can ensure complete password protection
and keep your systems virus free using
different programs
What exactly is an OS
• An operating system or OS is a software
program that enables the computer
hardware to communicate and operate with
the computer software.
• Without a computer operating system, a
computer and software programs would be
useless.
Cont…
Cont…
• “The one program running at all times on the
computer” is the kernel.
• Everything else is either
– a system program (ships /comes with the
operating system) , or
– an application program (installed by user).
Where the OS fits in
Examples of computer
operating systems
•Microsoft Windows 7 - PC and IBM compatible
operating system. Microsoft Windows is the most
commonly found and used operating system.
•Apple MacOS - Apple computer operating system.
The only Apple computer operating system.
•Ubuntu Linux - A popular variant of Linux used with
PC and IBM compatible computers.
•Google Android - operating system used with
Android compatible phones.
•iOS - Operating system used with the Apple iPhone.
The Operating System's Job
Booting is the process that occurs when you
press the power button to turn your computer on.
During this process, the computer does several
things:
•It runs tests to make sure everything is working
correctly.
•It checks for new hardware.
•It then starts up the operating system.
Once the operating system has started up, it
manages all of the software and hardware on
the computer.
Cont..
• Most of the time, there are many different
programs running at the same time, and they all
need to access your computer's Central
Processing Unit (CPU), memory, and storage.
• The operating system coordinates all of this to
make sure that each program gets what it needs.
Without the OS, the software wouldn't even be
able to talk to the hardware, and the computer
would be useless.
Operating systems can be
classified as follows:
• Multi-user: Allows two or more users to run
programs at the same time. Some operating
systems permit hundreds or even thousands of
concurrent users.
• Multiprocessing : Supports running a program on
more than one CPU.
• Multitasking : Allows more than one program to run
concurrently.
• Multithreading : Allows different parts of a single
program to run concurrently.
• Real time: Responds to input instantly. General-
purpose operating systems, such as DOS and
UNIX, are not real-time.
Views of an OS
• Application View: what services does it
provide?
• System View: what problems does it solve?
• Implementation View: how is it built?
Application View of an OS, What
services does it provide
• The OS provides an execution environment for running
programs.
• The execution environment provides a program with the
processor time and memory space that it needs to run.
• The execution environment provides interfaces through
which a program can use networks, storage, I/O devices,
and other system hardware components.
• Interfaces provide a simplified, abstract view of hardware
to application programs.
• The execution environment isolates running programs
from one another and prevents undesirable interactions
among them.
System View of an OS - what
problems does it solve
• The OS manages the hardware resources of a
computer system.
• Resources include processors, memory, disks and
other storage devices, network interfaces, I/O
devices such as keyboards, mice and monitors, and
so on.
• The operating system allocates resources among
running programs. It controls the sharing of
resources among programs.
• The OS itself also uses resources, which it must
share with application programs.
Implementation View of an OS –
how is it built
• The OS is a concurrent, real-time program.
• Concurrency arises naturally in an OS when
it supports concurrent applications, and
because it must interact directly with the
hardware.
• Hardware interactions also impose timing
constraints.
Operating System Abstractions
• The execution environment provided by the OS
includes a variety of abstract entities that can be
manipulated by a running program.
Examples:
• files and file systems: abstract view of
secondary storage
• address spaces: abstract view of primary
memory
• processes, threads: abstract view of program
execution
• sockets, pipes: abstract view of network or
other message channels
Desirable qualities of an OS
Usability:
•Robustness i.e quality of being strong
•Accept all valid inputs and can handle them.
•Consistency
•Proportionality
•Convenience
•Powerful with high level facilities.
Cont…
Facilities:
• Sufficient for intended use
• Complete
• Appropriate.
Costs:
• Want low cost and efficient services.
• Good algorithms : Make use of space/time
tradeoffs, special hardware.
• Low overhead : Cost of doing nothing should be
low. e.g., idle time at a terminal.
• Low maintenance cost: System should not
require constant attention.
Cont…
Adaptability:
• Tailored to the environment: Support necessary
activities. Do not impose unnecessary restrictions.
What are the things people do most — make them
easy.
• Changeable over time : Adapt as needs and
resources change. e.g., expanding memory and new
devices, or new user population.
• Extendible-Extensible : Adding new facilities and
features.
Objectives of Operating
Systems
• Modern OSs generally have following 3 major goals.
OSs generally accomplish these goals by running
processes in low privilege and providing service
calls that invoke the operating system kernel in high-
privilege state.
1. To hide details of hardware by creating
abstraction
• An abstraction is software that hides lower level
details and provides a set of higher-level functions.
An OS transforms the physical world of devices,
instructions, memory, and time into virtual world that
is the result of abstractions built by the OS.
Cont..

There are several reasons for abstraction.


• First, the code needed to control peripheral
devices is not standardized. OSs provide
subroutines called device drivers that
perform operations on behalf of programs for
example, input/output operations.
Cont…
• Second, the operating system introduces new functions as it
abstracts the hardware. For instance, OS introduces the file
abstraction so that programs do not have to deal with disks.

• Third, the OS transforms the computer hardware into multiple


virtual computers, each belonging to a different program. Each
program that is running is called a process. Each process
views the hardware through the lens of abstraction.

• Fourth, the operating system can enforce security through


abstraction.

2. To allocate resources to processes (Manage resources)


An operating system controls how processes (the active
agents) may access resources (passive entities).
Cont…
3. Provide a pleasant and effective user
interface
The user interacts with the operating systems
through the user interface and is usually
interested in the “look and feel” of the operating
system.
Cont…
• The most important components of the user
interface are the command interpreter (part of
the OS that understands and executes
commands that are entered interactively by
humans), the file system, on-line help, and
application integration.
• The recent trend has been toward increasingly
integrated graphical user interfaces that
encompass the activities of multiple processes on
networks of computers.
KERNEL
• The kernel is the central part of an OS, that directly
controls the computer hardware.
• Usually, the kernel is the first of the user-installed
software on a computer, booting directly after the
BIOS.
• OS kernels are specific to the hardware on which they
are running, thus most Oss are distributed with
different kernel options that are configured when the
system is installed.
Cont..
• Changing major hardware components such as
the motherboard, processor, or memory, often
requires a kernel update. Additionally, often new
kernels are offered that improve system security
or performance.
• The two major types of kernels competing in
today's computer markets are the Windows
kernel and the unix-like kernels.
System calls
• A system call is the programmatic way in which a
computer program requests a service from the
kernel of the operating system it is executed on. A
system call is a way for programs to interact with
the operating system.
• A computer program makes a system call when it
makes a request to the operating system’s kernel.
System call provides the services of the operating
system to the user programs via Application
Program Interface(API).
Cont..
• It provides an interface between a process
and the operating system to allow user-level
processes to request services of the OS.
• System calls are the only entry points into
the kernel system.
• All programs needing resources must use
system calls.
Cont…
Services Provided by System Calls :
•Process creation and management
•Main memory management
•File Access, Directory and File system management
•Device handling(I/O)
•Protection
•Networking, etc.
Types of System Calls : 5 different
categories
• Process control: end, abort, create,
terminate, allocate and free memory.
• File management: create, open, close,
delete, read file etc.
• Device management
• Information maintenance
• Communication
Cont..
Go and look at -History
The 1940's - First Generations
•The earliest electronic digital computers had no operating
systems. Machines of the time were so primitive that
programs were often entered one bit at time on rows of
mechanical switches (plug boards). Programming
languages were unknown (not even assembly languages).
Operating systems were unheard of .
The 1950's - Second Generation
•By the early 1950's, the routine had improved somewhat
with the introduction of punch cards. The General Motors
Research Laboratories implemented the first operating
systems in early 1950's for their IBM 701. The system of the
50's generally ran one job at a time. These were called
single-stream batch processing systems because programs
and data were submitted in groups or batches.
Cont…
The 1960's - Third Generation
•The systems of the 1960's were also batch processing systems,
but they were able to take better advantage of the computer's
resources by running several jobs at once. So operating systems
designers developed the concept of multiprogramming in which
several jobs are in main memory at once; a processor is switched
from job to job as needed to keep several jobs advancing while
keeping the peripheral devices in use.
•For example, on the system with no multiprogramming, when the
current job paused to wait for other I/O operation to complete, the
CPU simply sat idle until the I/O finished. The solution for this
problem that evolved was to partition memory into several pieces,
with a different job in each partition. While one job was waiting for
I/O to complete, another job could be using the CPU.
Cont…
• Another major feature in third-generation operating
system was the technique called spooling
(simultaneous peripheral operations on line). In
spooling, a high-speed device like a disk interposed
between a running program and a low-speed device
involved with the program in input/output. Instead of
writing directly to a printer, for example, outputs are
written to the disk. Programs can run to completion
faster, and other programs can be initiated sooner
when the printer becomes available, the outputs
may be printed.
• Note that spooling technique is much like thread
being spun to a spool so that it may be later be
unwound as needed.
Cont..
• Another feature present in this generation was
time-sharing technique, a variant of
multiprogramming technique, in which each user
has an on-line (i.e., directly connected) terminal.
• Because the user is present and interacting with
the computer, the computer system must respond
quickly to user requests, otherwise user
productivity could suffer. Timesharing systems
were developed to multiprogram large number of
simultaneous interactive users.
Cont..
Fourth Generation
•With the development of LSI (Large Scale Integration)
circuits, chips, operating system entered in the system
entered in the personal computer and the workstation
age. Microprocessor technology evolved to the point
that it become possible to build desktop computers as
powerful as the mainframes of the 1970s. Two
operating systems have dominated the personal
computer scene: MS-DOS, written by Microsoft, Inc.
for the IBM PC and other machines using the Intel
8088 CPU and its successors, and UNIX, which is
dominant on the large personal computers using the
Motorola 6899 CPU family.

You might also like