Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

Operating System

Misbah
Objective of the Course
• What operating systems are, what they do, and how they
are designed and constructed
• What an operating system does for the user
• To explain the process concept
• To introduce concurrency as the heart of modern operating
systems.
• What is process scheduling, inter-process communication,
process synchronization, and deadlock handling
• The management of main memory during the execution of a
process
• Describe how mass storage, the file system, and I/O are
handled in a modern computer system.
Introduction
• An operating system is a program that manages a
computer’s hardware.
• It also provides a basis for application programs and acts as
an intermediary between the computer user and the
computer hardware.
• Personal computer (PC) operating systems support complex
games, business applications.
• Operating systems for mobile computers provide an
environment in which a user can easily interface with the
computer to execute programs
• Thus, some operating systems are designed to be
convenient, others to be efficient, and others to be
some combination of the two.
Examples of Operating Systems
1. Microsoft Windows:
 (like Windows 10, Windows 8, Windows 7, Windows Vista,
and Windows XP).
2. Ubuntu: Ubuntu is based on a version of the Linux operating
system 
3. Android: Android is a "mobile" operating system maintained by
the Open Handset Alliance.
4. Mac OS X: Mac OS X comes pre-installed on all Apple Macintosh
computers,
5. IOS: IOS is Apple's mobile operating system. It runs on the
company's iPod, iPhone and iPad devices.
Components of a computer system

• Computer system can be divided roughly into


four components:
1. Hardware
2. Operating system
3. Application programs,
4. Users
Components of a computer system
1. Hardware – provides basic computing resources (CPU,
memory, I/O devices).
2. Operating system – controls and coordinates the use of
the hardware among the various application programs
for the various users.
3. Applications programs – define the ways in which the
system resources are used to solve the computing
problems of the users (word processors, spreadsheets,
compilers, and Web browsers, database systems, video
games, business programs).
4. Users (people, machines, other computers).
Components of a computer system.
What Operating Systems Do
• The operating system provides the means for proper use
of these resources in the operation of the computer
system.
• An operating system is similar to a government.
• Like a government, it performs no useful function by
itself.
• It simply provides an environment within which other
programs can do useful work.
• Two viewpoints of the operating system are:
– User View
– System View
What Operating Systems Do
• User view
– The user’s view of the computer varies according to the
interface being used.
– Most computer users sit in front of a PC, consisting of a
monitor, keyboard, mouse, and system unit.
– Such a system is designed for one user
– The goal is to maximize the work (or play) that the user
is performing.
– In this case, the operating system is designed mostly for
ease of use, with some attention paid to performance
and none paid to resource utilization like how various
hardware and software resources are shared.
What Operating Systems Do
• System View
– In this context, we can view an operating system as a
resource allocator.
– A computer system has many resources that may be
required to solve a problem: CPU time, memory space,
file-storage space, I/O devices, and so on.
– The operating system acts as the manager of these
resources.
– Operating system emphasizes the need to control the
various I/O devices and user programs.
– An operating system is a control program. A control
program manages the execution of user programs
Kernel
• The kernel is the central module of an operating system
(OS).
• It is the part of the operating system that loads first, and
it remains in main memory. Because it stays in memory,
it is important for the kernel to be as small as possible
while still providing all the essential services required by
other parts of the operating system and applications.
• The kernel code is usually loaded into a protected area of
memory to prevent it from being overwritten by programs
or other parts of the operating system.
• Typically, the kernel is responsible for memory
management, process and task management, and disk
management.
• The kernel connects the system hardware to the
application software.
• Every operating system has a kernel. For example the
Linux kernel is used numerous operating systems
including Linux, FreeBSD, Android and others.
Computer Startup

• bootstrap program is loaded at power-up or


reboot
– Typically stored in ROM or EPROM, generally
known as firmware
– Initializes all aspects of system
– Loads operating system kernel and starts
execution
Computer-System Organization-1
• A modern general-purpose computer system consists
of one or more CPUs and a number of device
controllers connected through a common bus that
provides access to shared memory.
• Each device controller is in charge of a specific type
of device (for example, disk drives, audio devices, or
video displays).
• To ensure orderly access to the shared memory, a
memory controller synchronizes access to the
memory.
A modern computer system.
Interrupt and system call
• The occurrence of an event is usually signalled
by an interrupt from either the hardware or the
software.
• Hardware may trigger an interrupt at any time
by sending a signal to the CPU, usually by way
of the system bus.
• Software may trigger an interrupt by executing
a special operation called a system call (also
called a monitor call).
Computer-System Organization
• For a computer to start running—for instance, when it is
powered up or rebooted—it needs to have an initial
program to run.
• This initial program, or bootstrap program, tends to be
simple.
• Typically, it is stored within the computer hardware in
read-only memory (ROM) or electrically erasable
programmable read-only memory (EEPROM), known by
the general term firmware.
• The bootstrap program must know how to load the
operating system and how to start executing that system.

You might also like