You are on page 1of 109

1

PRACTICAL APPROACH TO OPERATING


SYSTEM
2
Basic Operating System Theory
• Understanding Operating System
• Operating System Functions and Components
• Operating System Booting Concepts

TOPIC 1

3
UNDERSTANDING OS

 What is OS?
 OS and computer system

 History of OS

 Types of OS
 Batch
 Time sharing/interactive
 Real-time
 Hybrid
 Embedded

4
OS FUNCTIONS AND COMPONENTS
 UNDERSTANDING OS COMPONENTS
 User command interface
 Processor component
 Memory component
 Network management
 I/O component
 File component
 Inter process communication (IPC)
 CHARACTERISTICS OF MODERN OS
 Microkernel architecture
 Multithreading
 Symmetric multiprocessing (SMP)
 Object-oriented programming language based
5
OS BOOTING CONCEPTS
 Single OS Booting Process
 DOS Booting Sequence
 Windows Booting Sequence
 Linux Booting Sequence
 Multiple OS Booting Process
 Windows Method
 Non-Windows Method

6
UNDERSTANDING OPERATING SYSTEMS

7
COMPUTER SYSTEM STRUCTURE

Computer system can be divided into 4 components


• Hardware – provides basic computing resources
• CPU, memory, I/O devices
• System Software (Operating system as the main component)
• 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, compilers, web browsers, database systems,
video games
• Users
• People, machines, other computers

8
COMPUTER STORAGE AREAS

 Used to store data and programs(software)


 Two types:
 Primary memory / memory: RAM & ROM
 Temporary / volatile
 Secondary
storage area: hard disk, floppy disk,
flash memory, optical disk, magnetic tape
 Permanent / nonvolatile

9
4 COMPONENTS OF A COMPUTER SYSTEM

10
SYSTEM SOFTWARE

Programs that Two types are


control or maintain operating systems
operation of computer and utility programs

Operating system (OS)


(sometimes called the platform)
coordinates all activities
among computer
hardware
resources

11
OPERATING SYSTEMS

12
OPERATING SYSTEMS
What is a cross-platform application?
 Runs identically on multiple operating systems - Operating
system that computer uses is sometimes called the platform

applications

Operating System/ Operating System/ Operating System/ Operating System/


Platform A Platform B Platform C Platform D

13
OPERATING SYSTEM FUNCTIONS
What is booting?
 Process of starting or restarting a computer
 Cold boot Turning on
computer that has been
powered off
 Warm boot Restarting
computer that is
powered on

14
OPERATING SYSTEM FUNCTIONS
What is a user interface?
 Controls how you enter data and instructions and how
information displays on screen
 With a command-line interface, a user types commands or
presses special keys on the keyboard to enter data and
instructions

15
OPERATING SYSTEM FUNCTIONS

What is a graphical user interface


(GUI)?
 User interacts with
menus and visual
images such as buttons
and other graphical
objects to issue
commands

16
INTRODUCTION
 When you turn on your computer, there's a lot going on
inside, and the real man behind the curtain handling the
necessary tasks is the operating system.
 Most desktop or laptop PCs come pre-loaded with
Microsoft Windows.
 Macintosh computers come pre-loaded with Mac OS X.
 Many corporate servers use the Linux or UNIX operating
systems.
 The operating system (OS) is the first thing loaded onto
the computer; without the operating system, a computer
is useless.

17
 More recently, OSs have started to pop up in
smaller computers as well. The computers used
in these little devices have gotten so powerful
that they can now actually run an operating
system and applications.
 The purpose of an OS is to organize and control
hardware and software so that the device it
lives in behaves in a flexible but predictable
way.

18
 Not all computers have operating systems.
 The computer that controls the microwave oven in your
kitchen, for example, doesn't need an operating system.
 It has one set of relatively simple tasks to perform, very
simple input and output methods (a keypad and an LCD
screen), and simple, never-changing hardware to
control.
 For a computer like this, an operating system would be
unnecessary baggage, adding complexity where none is
required.
 Instead, the computer in a microwave oven simply runs
a single hard-wired program all the time.

19
For other devices, an operating
system creates the ability to:
•serve a variety of purposes
•interact with users in more complicated
ways
•keep up with needs that change over
time
20
 All desktop computers have operating systems.
 The most common are the Windows family of operating
systems developed by Microsoft, the Macintosh
operating systems developed by Apple and the UNIX
family of operating systems (which have been developed
by a whole history of individuals, corporations and
collaborators).
 There are hundreds of other operating systems available
for special-purpose applications, including
specializations for mainframes, robotics, manufacturing,
real-time control systems and so on

21
 In any device that has an operating system,
there's usually a way to make changes to how
the device works. One of the reasons operating
systems are made out of portable code rather
than permanent physical circuits is so that they
can be changed or modified without having to
redesign the whole device.

22
 For a desktop computer user, this means you
can add a new security update, system patch,
new application or even an entirely new OS
rather than junk your computer and start again
with a new one when you need to make a
change.
 As long as you understand how an OS works
and how to get at it, in many cases you can
change some of the ways it behaves.

23
STAND-ALONE OPERATING SYSTEMS
What is Windows XP?
 Fast, reliable Windows operating system
 Available in five
editions:
Home Edition,
Professional Edition,
Tablet PC Edition,
Media Center
Edition,
and Professional 64-
bit Edition

24
STAND-ALONE OPERATING SYSTEMS
What is Windows Vista?
 Successor to Windows XP, containing a new
interface and new / enhanced features
 Available in several
editions, grouped
into Home and
Business categories

25
STAND-ALONE OPERATING SYSTEMS

What is Mac OS X?
 Available only for computers manufactured
by Apple
 Macintosh operating
system has been
model for most GUIs

26
STAND-ALONE OPERATING SYSTEMS
What is UNIX?
 Used by power users because of its flexibility
and power
 Most versions
offer GUI
 Available for
computers of all
sizes

27
STAND-ALONE OPERATING SYSTEMS

What is Linux?
 Popular, free,
multitasking UNIX-type
operating system
 Open-source software -
code is available to
public
 Both a stand-alone
and a network Red Hat provides a version of Linux called Red Hat
operating system Enterprise Linux.

28
NETWORK OPERATING SYSTEMS

NetWare
Designed for
client/server
What are networks

examples of Windows Unix and


Server 2003
network Upgrade to Windows
Linux
Multi-purpose
operating 2000 Server
Solaris
operating system

systems?  Version of UNIX


developed by Sun
Microsystems
 Specifically for
e-commerce
applications

29
MOBILE OPERATING SYSTEM
 also referred to as mobile OS, is the Operating
System that operates a smartphone, tablet, PDA,
or other digital mobile device.
 Modern mobile operating systems combine the
features of a personal computer operating system
with other features, including a touchscreen,
cellular, Bluetooth, WiFi, GPS mobile navigation,
camera, video camera, speech recognition, voice
recorder, music player, near field communication
and Infrared Blaster.

30
THE MOST COMMON MOBILE OPERATING SYSTEMS ARE:

 Android
 Android is from Google Inc. It is free and open source. Android's releases
prior to 2.0 (1.0, 1.5, 1.6) were used exclusively on mobile phones.
 Blackberry
 BlackBerry 10 is from BlackBerry. It is closed source and proprietary.
 iOS
 iOS is from Apple Inc. It is closed source and proprietary and built on
open source Darwin core OS. The Apple iPhone, iPod Touch, iPad and
second-generation Apple TV all use an operating system called iOS,
which is derived from Mac OS X.
 Windows Phone
 Windows Phone is from Microsoft. It is closed source and proprietary.

31
OTHER SOFTWARE PLATFORMS
 Firefox OS
 It is from non-profit organization Mozila Foundation. It is open source and uses GPL
(General Public License – free software license).
 Sailfish OS
 It is from Jolla. It is open source and adopts GPL. After Nokia failed in 2011 with the
MeeGo project most of the MeeGo team have left Nokia, and established Jolla as a
company to use MeeGo and MER business opportunities. In 2012 Linux Sailfish OS based
on MeeGo and using MER core distribution has been launched for public use.
 Symbian
 Symbian platform is from Nokia for certain models of their current entry level
smartphones. It is proprietary software.
 Tizen
 Tiizen is hosted by the Linux Foundation and support from the LiMo Foundation, guided by
a Technical Steering Group composed of Intel and Samsung. Tizen is an operating system
for devices including smartphones, tablets, in-vehicle infotainment (IVI) devices, and smart
TVs. It is an open source system that aims to offer a consistent user experience across
devices.
 Ubuntu Touch OS
 It is from Canonical Ltd. It is open source and uses GPL.
32
HISTORICAL SOFTWARE PLATFORMS
 LiMo 4
 LiMo 4 is from the LiMo Foundation. LiMo 4 delivers middleware and application functionality, including a flexible user
interface, extended widget libraries, 3D window effects, advanced multimedia, social networking and location-based
service frameworks, sensor frameworks, multi-tasking and multi-touch capabilities.
 Maemo
 Maemo is from Nokia. It is open source and GPL. Maemo is a platform developed by Nokia for smartphones and Internet
tablets. Maemo is based on Debian GNU/Linux and draws much of its GUI, frameworks and libraries from the GNOME
project.
 Meego
 MeeGo is from non-profit organization The Linux Foundation. It is open source and GPL.
 Palm OS
 Palm OS/Garnet OS was from Access Co. It is closed source and proprietary.
 webOS
 webOS is from LG, although some parts are open source. webOS is a proprietary mobile operating system running on the
Linux kernel, initially developed by Palm, which launched with the Palm Pre.
 Windows Mobile
 Windows Mobile was from Microsoft. It was closed source and proprietary. The Windows CE operating system and
Windows Mobile middleware are widely spread in Asia. The two improved variants of this operating system, Windows
Mobile 6 Professional (for touch screen devices) and Windows Mobile 6 Standard, were unveiled in February 2007. It was
criticized for having a user interface which is not optimized for touch input by fingers; instead, it is more usable with
a stylus.
 However, unlike iOS, it supports both touch screen and physical keyboard configurations. Microsoft phased out the
Windows Mobile OS to focus on Windows Phone.

33
WHAT IS AN OS?

34
WHAT IS AN OPERATING SYSTEM?
 An operating system is a special piece of software that manages the
general operation of a computer system:
 It provides a user interface so that we can interact with the computer
 It manages applications that are running on the computer, starting them
when the user requests, and stopping them when they are no longer
needed
 It manages files, helping us save our work, organize our files, find files
that we have saved and load files
 It manages the computers memory, deciding what should be loaded into
memory and what should be removed
 It looks after computer security, preventing unauthorized access to the
system
 It manages the computer’s input and output hardware such as printers,
etc.

 Without an operating system, a computer is of little use.

35
WHAT IS AN OPERATING SYSTEM?
 An operating system (sometimes abbreviated as "OS") is
the 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
called applications or application programs. The
application programs make use of the operating system
by making requests for services through a defined
application program interface (API). In addition, users
can interact directly with the operating system through a
user interface such as a command language or a
graphical user interface (GUI).

36
EXAMPLES OF OS
 UNIX
 MS-DOS
 MS-Windows
 Windows/NT
 Linux
 Windows 2000
 VMS
 OS/400
 AIX
 Chicago
 OS/2
 MacOS
 VMS
 MVS
 VM
 z/OS

37
 When software developers create applications, they must write
and compile them for a specific operating system. This is
because each OS communicates with the hardware differently
and has a specific application program interface, or API, that
the programmer must use.
 While many popular programs are cross-platform, meaning they
have been developed for multiple OSs, some are only available
for a single operating system. Therefore, when choosing a
computer, it is important to make sure the operating system
supports the programs you want to run

38
CROSS-PLATFORM

 Software that can run on multiple types of


computer systems. For example, the graphics
program Adobe Photoshop and the word
processor Microsoft Word are both available for
the Windows and Macintosh operating systems.
Therefore, Photoshop and Word are considered
to be cross-platform applications.

39
HISTORY OF OPERATING SYSTEMS

40
 Historically operating systems have been tightly
related to the computer architecture, it is good
idea to study the history of operating systems
from the architecture of the computers on
which they run.
 Operating systems have evolved through a
number of distinct phases or generations which
corresponds roughly to the decades.

41
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.

42
43
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.

44
45
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.

46
47
Multiprogramming

 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.
48
SPOOLING

 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.
49
SPOOL - Simultaneous Peripheral Operations On-Line
Another major feature in third-generation OS was the
technique called spooling (simultaneous
peripheral operations on line)
What is spooling?
 Sending print jobs to buffer instead of
directly to printer
 Print jobs line up in queue

50
Note that spooling technique is much
like thread being spun to a spool so
that it may be later be unwound as
needed.

51
TIME-SHARING
 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.
 Time-sharing systems were developed to
multiprogram large number of simultaneous
interactive users.

52
FOURTH GENERATION
 With the development of LSI (Large Scale Integration)
circuits chips, operating 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.

53
54
BRIEF HISTORY OF OPERATING
SYSTEMS DEVELOPMENT
Recent Developments
Second Generation
Distributed computing,
Job scheduling, JCL, faster personal computers, high-
I/O, spooling, batch, files speed communication,
multi-media

1940 1955 1965 1980 1990

First Generation Third Generation

Vacuum tube, single user, Shared processing,


early operating systems multiprogramming, virtual
memory, DBMS

55
SIMPLIFIED OS HISTORY

56
MIGRATION OF OS CONCEPTS & FEATURES

57
Batch
Time sharing/interactive
Real-time
Hybrid
Embedded

OS TYPES

58
BATCH SYSTEMS

59
TIME SHARING/INTERACTIVE

60
REAL-TIME SYSTEMS

 A real-time system is a computer system that


requires not only that the computing results be
“correct” but also that the results be produced
within a specified deadline period
 Results produced after the deadline has passed –
even if correct – may be of no real value
 (some systems – such as a batch-processing
system – may have no timing requirements
whatsoever)

61
REAL-TIME SYSTEM (CONT…)
 Real-time systems executing on traditional
computer hardware are used in a wide range of
applications.
 In addition, many real-time systems are embedded
in “specialized devices”, such as ordinary home
appliances (microwave ovens, dishwashers),
consumer digital devices (cameras, MP3 players)
and communication devices (cellular telephones,
Blackberry handheld devices). They are also
present in larger entities such as automobiles and
airplanes

62
HYBRID SYSTEM

 A combination of batch and interactive system.


It let individual user access the system and get
faster responses but actually accepts and runs
batch programs in background when the
interactive load is light.

63
EMBEDDED SYSTEM
 Is a computing device that is part of a larger system in which
the presence of a computing device is often not obvious to
the user
 Eg: an embedded system for controlling a home dishwasher.
The embedded system may allow various options for
scheduling the operation of the dishwasher – the water
temperature, the type of cleaning (light or heavy), even a
timer indicating when the dishwasher is to start. Most likely,
the user of the dishwasher is unaware that there is in fact a
computer embedded in the appliance
 However, not all embedded systems are real-time. Eg: an
embedded system controlling a home furnace may have no
real-time requirements whatsoever

64
SAFETY-CRITICAL SYSTEMS
 In this kind of real-time system, incorrect
operation (which may be due to a missed
deadline) may result in some sort of
“catastrophe”
 Eg: weapon systems, antilock brake systems,
flight-management systems, health-related
embedded systems
 Here the systems must respond to events by
the specified deadlines

65
TYPES OF REAL-TIME SYSTEMS
 Hard real-time
 Has the most stringent requirements, guaranteeing
that critical real-time tasks be completed within
their deadlines. Safety-critical systems are typically
hard real-time systems
 Soft real-time
 Less restrictive, simply providing that a critical real-
time task will receive priority over other tasks and
that it will retain that priority until it completes
 VxWorks, QNX, RT-Linux
66
UNDERSTANDING OS COMPONENTS

67
OS MODEL

68
USER COMMAND INTERFACE

69
PROCESSOR MANAGER

Processor Manager decides how to allocate


the CPU

Processor Manager has two levels of


responsibility:
•To handle jobs as they enter the system
•Handled by Job Scheduler
•To manage each process within those jobs
•Handled by Process Scheduler

70
MEMORY MANAGER

Memory Manager: In charge of main memory


(RAM)

Responsibility includes:
•Preserves the space in main memory occupied by the
operating system
•Checks the validity of each request for memory space
•Sets up a table to keep track of who is using which section of
memory in a multiuser environment
•Deallocates memory when the time comes to reclaim the
memory

71
DEVICE MANAGER

Device Manager monitors every device,


channel, and control unit

Responsibility includes:
•Chooses the most efficient way to allocate all of the
system’s devices, printers, terminals, disk drives, based
on a scheduling policy
•Makes the allocation; starts its operation
•Deallocates the device

72
FILE MANAGER

File Manager keeps track of every file in the system


including data files, assemblers, compilers, and
application programs

Responsibility includes:
• Enforces restrictions on who has access to which files by using
predetermined access
• Controls what users are allowed to do with files once they access
them
• Allocates the resource by opening the file and deallocates it by
closing the file

73
NETWORK MANAGER

Operating systems with networking capability have a


fifth essential manager called the Network Manager

Network Manager provides a convenient way for


users to share resources while controlling users’
access to them. The resources include:
• Hardware (such as CPUs, memory areas, printers, tape drives,
modems, and disk drives)
• Software (such as compilers, application programs, and data
files)

74
I/O OR DEVICE MANAGER
 The device manager monitors every device, channel and
control unit. Its job is to choose the most efficient way to
allocate all of the system’s devices, printers, ports, disk
drives and so forth based on a scheduling policy chosen
by the system designers.
 The device manager does this by allocating the device,
making it available to the next process or job.
 I/O / device module keeps track of the status of devices
(I/O traffic controller). Each I/O device has a device
handler that resides in a separate process associated
with that device

75
INTERPROCESS COMMUNICATION (IPC)
 A capability supported by some operating systems that
allows one process to communicate with another process.
 The processes can be running on the same computer or on
different computers connected through a network.
 IPC enables one application to control another application,
and for several applications to share the same data without
interfering with one another.
 IPC is required in all multiprocessing systems, but it is not
generally supported by single-process operating systems
such as DOS.
 OS/2 and MS-Windows support an IPC mechanism
called DDE.

76
INTERPROCESS COMMUNICATION (IPC)

 Interprocess communication (IPC) is the


transfer of data among processes.
 For example, a Web browser may request a
Web page from a Web server, which then sends
HTML data.

77
INTERPROCESS COMMUNICATIONS
 Some forms of IPC facilitate the division of labor among
several specialized processes. Other forms of IPC facilitate
the division of labor among computers on a network.
 Typically, applications can use IPC categorized as clients or
servers.
 A client is an application or a process that requests a service
from some other application or process. A server is an
application or a process that responds to a client request.
Many applications act as both a client and a server,
depending on the situation.
 For example, a word processing application might act as a
client in requesting a summary table of manufacturing costs
from a spreadsheet application acting as a server. The
spreadsheet application, in turn, might act as a client in
requesting the latest inventory levels from an automated
inventory control application.
78
CHARACTERISTICS OF MODERN
OPERATING SYSTEMS
79
CHARACTERISTICS OF MODERN OPERATING
SYSTEMS
 Microkernel Architecture
 Multithreading
 Symmetric Multiprocessing (SMP)
 Multiple-processor systems in use today are of two types.
 Asymmetric multiprocessing – each processor is assigned a specific
task. A master processor controls the system; the other processors
either look to the master for instruction or have predefined tasks. It
is a master-slave relationship
 Symmetric multiprocessing (SMP) – each processor performs all
tasks within the OS; all processors are peers; no master-slave
relationship exists between processors; each processor has its own
set of registers, as well as a private – or local – cache; however, all
processors share physical memory
 Object-Oriented Design

80
MICROKERNEL ARCHITECTURE
INTRODUCTION

 Generally speaking, an operating system consists


of two parts: a privileged mode called kernel space
and unprivileged mode called user space.
 The separation is a need rather than an option
otherwise process protection cannot be achieved.
 Depending on which processes run in what space,
we can classify operating systems into three main
architectures:
 Monolithic kernel
 Microkernel and
 Hybrid or modular kernel operating systems.

81
KERNEL
 The kernel is the heart of an operating system.
 The kernel internally contains many components, such as a memory
manager, scheduler, numerous device drivers, a file system, and so
on.
 When an operating system is being written, there are numerous
design philosophies which the designers can adopt.
 At one extreme is the monolithic kernel, in which all of the
components mentioned above, and many others, are all lumped into
a single operating system file.
 At the other extreme is the microkernel, where only the bare
minimum is put into the kernel file, and every thing else is put into
separate programs, which the microkernel loads and runs at boot
time.
 In practice, the design of most operating systems lies somewhere in
between those two extremes, although they generally tend to be
closer to a monolithic kernel than a microkernel. But, like everything
else in life, the microkernel has its true believers.
82
MONOLITHIC KERNEL
 As the name suggest mono means everything put
together in one huge unit that is called the monolithic.
 You can think of a monolithic kernel OS as a single large
static binary file process running entirely in a single
address space. Basic OS services such as process
management, memory management, interrupt handling,
IO communication, file system, device drivers,
networking, etc all run in kernel space.
 Entire services are loaded on boot up and reside in
memory and work is done using system calls.
 Linux, Unix, MS-DOS, and the early Mac OS are typical
examples of monolithic kernel based OS.

83
MICROKERNEL
 The idea behind microkernel OS is to reduce the kernel to only
basic process communication and IO control and let other system
services run in user space just like any other normal processes.
 These services are called servers and kept separate and run in
different address spaces.
 Contrary to monolithic OS where services are directly invoked,
communication in a microkernel is done via message passing
(inter process communication IPC).
 Mac OS and WinNT are two examples on microkernel OS
architecture.
 Only the very important parts like IPC (Inter process
Communication), basic scheduler, basic memory handling, basic
I/O primitives etc., are put into the kernel

84
HYBRID KERNEL

 The hybrid approach is derived from the best of


both micro and monolithic kernel architectures.
 Instead of loading the whole thing into memory,
core modules are loaded dynamically to
memory on demand. One disadvantage is that
a module may destabilize a running kernel.

85
OS ARCHITECTURE

86
OS ARCHITECTURE

 In conclusion, there is no OS architecture that


is better than the other in the general sense.
 Comparing monolithic operating system is like
comparing two different types of transportation
for example a car and a bus where each meets
different needs.

87
MULTITHREADING

 The ability of an OS to execute different parts of


a program, called threads, simultaneously.
 The programmer must carefully design the
program in such a way that all the threads can
run at the same time without interfering with
each other.

88
THREAD
 Thread is a basic unit of CPU utilization; it comprises a
thread ID, a program counter, a register set, and a stack.
 It shares with other threads belonging to the same
process its code section, data section, and other OS
resources, such as open files and signals
 A traditional process has a single thread of control.
 If a process has multiple threads of control, it can
perform more than one task at a time
 Many software packages that run on a modern desktop
PCs are multithreaded. An application typically is
implemented as a separate process with several threads
of control

89
THREAD (CONT…)

 Eg: a word processor may have a thread for


displaying graphics, another thread for
responding to keystrokes from the user, and a
third thread for performing spelling and
grammar checking in the background

90
OBJECT-ORIENTED DESIGN OS
•Kernel - Resides in
memory at all
times, performs
essential tasks, and
protected by
hardware
•Memory resident:
only for few
essential functions,
such as process
scheduling and
memory allocation
•All other functions
such as device
allocation, are not
allowed reside in
main memory at all
time.

91
OS BOOTING CONCEPTS

92
OS BOOTING CONCEPTS
 Single OS Booting Process
 DOS Booting Sequence
 Windows Booting Sequence
 Linux Booting Sequence
 Multiple OS Booting Process
 Windows Method
 Non-Windows Method

93
94
BOOTING AN OPERATING SYSTEM
1. Read boot strap program from ROM
2. Load the core OS into RAM
3. Run a sequence of jobs in batch mode.
- DOS: CONFIG.SYS and AUTOEXEC.BAT.
- Windows: WIN.INI.
- Mac OS: selected extensions.
- UNIX: .login, .profile , .cshrc.
4. Start a graphical user interface (GUI).
5. Waiting for input / interaction with the GUI.

95
AN OUTLINE OF THE BOOT SEQUENCE

96
SINGLE OS BOOTING PROCESS
 Booting is bootstrapping process that starts operating
systems when the user turns on a computer system.
 A boot sequence is a set of operations the computer
performs when it is switched on and load the operating
system into memory.
 Bootstrap loader program - Stored in ROM/EEPROM – BIOS
ROM
 Locate MBR (Master Boot Record) on the hard drive.
 MBR Full bootstrap program is stored in boot disk/system
disk - located in first sector on the disk.
 Initializes all aspects of the system from CPU registers to
device controllers to memory contents.
 Load OS into memory – OS waits for event.

97
DOS BOOTING SEQUENCE
 BIOS locates MBR on the hard drive.
 Boot program loads IO.SYS and MSDOS.SYS into
memory.
 IO.SYS – contains more BIOS software
 MSDOS.SYS - contains software to manage files, run
application software and interface with hardware and
search CONFIG.SYS file
 CONFIG.SYS
 first OS file that user can change.
 Tell DOS how many files it can open at any one time.
 How many file buffers.
 Load device drivers.

98
DOS BOOTING SEQUENCE (CONT…)
 COMMAND.COM consists of 3 parts :
 Code to manage I/O
 Internal DOS Command
 Short program that look for AUTOEXEC.BAT (Automatic
Executed Batch program)
 AUTOEXEC.BAT (Automatic Executed Batch
program)
 Hold a list of DOS commands that are automatic
executed each time DOS loads.
 Loads TSRs (Terminate and Stay Resident programs)
 The boot process is completed

99
WINDOWS BOOTING SEQUENCE

100
WINDOWS BOOTING SEQUENCE (CONT…)
 There are five major sequences that occur during
Windows XP Professional boot process:
1. Pre-boot sequence
 Begins when the power is turned on. The computer
performs self-check routines and locates a boot record.
 POST (Power On Self Test) test memory and subsystems.
Systems run POST for any devices that have a BIOS.
 BIOS read the MBR. MBR takes over means that Windows is
now in control.
 MBR looks for NTLDR at the BOOT SECTOR.

101
WINDOWS BOOTING SEQUENCE (CONT…)

2.Boot sequence
 Hardware configuration is detected and
loaded.
 NTLDR is the boot loader for Windows XP.
 Allow memory addressing.
 Initiate the file system.

 Read the BOOT.INI

 Load the boot menu.

102
WINDOWS BOOTING SEQUENCE (CONT…)
3. Kernel Load Sequence
 Operating Systems components are loaded into
memory.
 Once XP selected from the Boot Menu, NTLDR runs:
 NTDETECT.COM
 BOOT.INI
 NTBOOTDD.SYS
 Load NTOSKRNL.EXE and HAL.DLL => located in
%SystemRoot%System32.
 Read the registry, choose hardware profile and authorize
device driver.

103
WINDOWS BOOTING SEQUENCE (CONT…)
4. Kernel Initiation Sequence
 Windows XP Professional kernel takes control of
the system.
 NTOSKRNL.EXE takes over

5. Log On Sequence
 When the Log On to Windows dialog box is
displayed and users can log on.
 WINLOGON.EXE starts.
 LSASS.EXE starts => display Logon screen.

104
LINUX BOOTING SEQUENCE
1. Boot Loader (Kernel Loader) finds the kernel image on the
disk and loads it into memory.
 Task – load the Linux kernel
 GRUB (Grand Unified Bootloader) and LILO (Linux Loader) are the
most popular Linux boot loader.
 Kernel image is the management of the system’s resources and
the software components like process management, memory
management, device management and system call.
2. The kernel initializes the device and its drivers.
3. The kernel mounts the root file system.
4. The kernel starts a program called init.
 Init is the root/parent of all processes executing on Linux. The
main purpose of init is to start and stop other program in a
particular sequence.

105
LINUX BOOTING SEQUENCE (CONT…)

5. Init sets the rest of the processes in motion.


6. The last processes that init starts as part of
the boot sequence allow user to log in.

106
 Linux Boot Process

107
MULTIPLE OS BOOTING PROCESS
(MULTIPLE WINDOWS, WINDOWS AND LINUX)

 There are two different types of Boot Process in


multiple OS environment.
Non Windows Boot Manager Windows Boot Manager

108
Non Windows Boot Manager Windows Boot Manager

109

You might also like