You are on page 1of 23

Lecture-3

Operating System
Overview :
Windows and Linux

Presented By –
M.M. Rakibul Hasan
Faculty, CSE, IUBAT
Content of this Lecture
 Windows Operating Systems Overview
Introduction to Windows Operating System
Discovering the History of Windows
Architecture of Windows Operating System
Windows Compared to Other Oss
Identifying Windows Interfaces

Linux Operating Systems Overview


Introduction to Linux Operating System
Components of Linux System
Kernel Mode vs. User Mode
Basic Features
Architecture
M.M. Rakibul Hasan CSC-307[Operating Systems] 2
M.M. Rakibul Hasan CSC-307[Operating Systems] 3

Windows Operating
Systems Overview
Introduction
 Windows operating system (OS) has evolved over several decades of
development

 To troubleshoot problems on Windows operating systems, it’s needed to be


familiar with the basic architecture of the OS

 Graphical User Interface (GUI), the Command Prompt, and Windows


PowerShell are the interfaces used by users and administrators of the
Windows operating systems

M.M. Rakibul Hasan CSC-307[Operating Systems] 4


Discovering the History of Windows
Table I. The Windows OS evolution alongside PC hardware evolution

1981-1991 1992-1994 1995-1999 2000-2001 2001-2009 2009-Current


DOS Windows 3.1 Windows 95 Windows 2000 Windows XP Windows 7
• Basic PCs • PCs with • 32-bit • Focus on • Modernizing • Enhanced
with few enhanced computing security and the windows with
graphics peripherals • Increased stability for 95 interface advanced
• Low • Increased memory of enterprise • Memory in graphics cards
memory memory typically more applications excess of 512 • Memory in
measured in typically than 32 MB • Increased MB excess of 1 GB
kilobytes measured in • Heavy use memory to 256 • Beginning • Use of many
• Small drives MB but less of CD-ROM MB or more use of USB storage
with a few than 32 MB drives for • Continued flash storage devices
kilobytes (KB) • Hard drives applications use of CD-ROM and heavy use
or as primary drives of Wi-Fi
Megabytes storage networking
(MB) of
storage
M.M. Rakibul Hasan CSC-307[Operating Systems] 5
Understanding the OS Architecture
 The architecture of an OS defines how it works instead of what it can do
– The features define what it can do, but those features must work on top of an operational
methodology

– This methodology is the architecture

 The current Windows OS architecture is based on the original architecture in the


Windows NT OS first released in 1993
 The Layers in Windows
– The Windows OS is divided into two layers, or modes of operation:
1. Kernel mode is where the operating system kernel and other low-level processes operate
2. User mode is where the applications, such as Microsoft Word or Excel, and environment
subsystems run

M.M. Rakibul Hasan CSC-307[Operating Systems] 6


Understanding the OS Architecture (Cont’)
 Layers in Windows

Figure 1. The basic Windows architecture components


M.M. Rakibul Hasan CSC-307[Operating Systems] 7
Understanding the OS Architecture (Cont’)
• Technically, Kernel mode operations take place in something called ring 0 of complex
instruction set computing (CISC) processors
– Most processors are CISC processors used in computer system today

– The common x86 (32-bit) and x64 (64-bit) nomenclature refers to CISC processors based on
their support for 32-bit and 64-bit computing

• User mode operations take place in the processor’s ring 3 (also known as non-privileged
mode)
• The different rings of operation simply define the level of access granted to the processes
running in that ring
– For example, ring 0 (also known as privileged mode) is like “God mode” in many games (Cheat
code)

– Similarly, ring 0 processes can do anything within the system because only OS functions, device
drivers, and graphics capabilities reside here
M.M. Rakibul Hasan CSC-307[Operating Systems] 8
Understanding the OS Architecture (Cont’)

Figure 2. Design of the windows OS with ring concept


M.M. Rakibul Hasan CSC-307[Operating Systems] 9
Understanding the OS Architecture (Cont’)
 To simplify the way rings work in CISC processors
– ring 3 processes can do only what ring 2 processes allow them to do.

– ring 2 processes can do only what ring 1 processes allow them to do.

– ring 1 processes can do only what ring 0 processes allow them to do.

 Windows uses only ring 0 (privileged mode ) and ring 3 (non-


privileged mode)
– This simplify that ring 3 processes can do only what ring 0 processes allow them to do

M.M. Rakibul Hasan CSC-307[Operating Systems] 10


Understanding the OS Architecture (Cont’)
 Components of User mode:
• System Support Processes manage the system, such as the
session manager, the authentication subsystem, the service
manager, and the logon process
• Windows 32-bit
• Service Processes are those system or application processes that applications
do run as services • Windows 64-bit
applications
• These include system services like the Task Scheduler and the Print
• Windows 3.1 16-bit
Spooler as well as non-system services like SQL Server applications (on 32-bit
editions of Windows 7)
• User Applications are the actual applications that users execute
• MS-DOS 16-bit
• These include applications like Microsoft Excel and Adobe Photoshop applications (on 32-bit
editions of Windows 7)
• Five application types are supported in the Windows OS: • Portable Operating
System Interface (POSIX)
32-bit applications
through the use of the
Subsystem for Unix-
based Applications

M.M. Rakibul Hasan CSC-307[Operating Systems] 11


Understanding the OS Architecture (Cont’)
 Components of User mode (Cont’):
• Environment Subsystems and the subsystem dynamic link libraries
(DLLs) work together to allow different application types to function
on the system
• For example, the Windows 32-bit environment subsystem allows 32-bit
Windows applications to work on a 64-bit edition of Windows 7
• This 32-bit environment subsystem will make calls to subsystem DLLs,
and the subsystem DLLs may also communicate back with the
environment subsystem if communication with the application is
necessary
• Subsystem DLLs translates application function calls into internal
native system service calls
• The subsystem DLLs communicate with the Kernel mode processes on
behalf of the applications and may communicate with the
applications through the environment subsystems as well

M.M. Rakibul Hasan CSC-307[Operating Systems] 12


Understanding the OS Architecture (Cont’)
 Components of Kernel mode:
1. Executive: Contains the base OS services, such as memory management, process and thread
management, security, I/O, and interprocess communication.
2. Kernel: Controls execution of the processor(s). The Kernel manages thread scheduling,
process switching, exception and interrupt handling, and multiprocessor synchronization.
3. Hardware abstraction layer (HAL): Maps between generic hardware commands and
responses and those unique to a specific platform. It isolates the OS from platform-specific
hardware differences. The HAL makes each computer’s system bus, direct memory access
(DMA) controller, interrupt controller, system timers, and memory module look the same to the
Executive and Kernel components.
4. Device drivers: Dynamic libraries that extend the functionality of the Executive. These include
hardware device drivers that translate user I/O function calls into specific hardware
device I/O requests and software components for implementing file systems, network
protocols, and any other system extensions that need to run in kernel mode.
5. Windowing and graphics system: Implements the graphical user interface (GUI) functions,
such as dealing with windows, user interface controls, and drawing.
M.M. Rakibul Hasan CSC-307[Operating Systems] 13
Windows Compared to Other OSs
 The architecture of Windows is very similar to other operating systems, including Linux
and Mac OS X
 But a key difference is in the area of graphics processing
– Windows includes graphics capabilities in the Kernel mode of the operating system, which can
potentially improve graphics performance

– On the other hand, Linux does not include the graphics functions in the kernel, which removes
those functions from the core OS and can potentially improve stability

 The length of development does not automatically result in improved stability


– The MAC OS X OS is now based on BSD Unix

– The flavor of Unix has been around for more than 30 years where Windows has developed since
the official Microsoft announcement in 1983
M.M. Rakibul Hasan CSC-307[Operating Systems] 14
Identifying Windows Interfaces
 The Windows OS has three primary interfaces for working with applications and
performing administrative tasks:
– Most users will spend the majority of their time in the GUI
– But administrators can benefit greatly from the Command Prompt and Windows
PowerShell interfaces

M.M. Rakibul Hasan CSC-307[Operating Systems] 15


Linux Operating
Systems Overview

M.M. Rakibul Hasan CSC-307[Operating Systems] 16


Introduction
 Linux is one of popular version of UNIX OS
It is open source as its source code is freely available
It is free to use
Linux was designed considering UNIX compatibility
Its functionality list is quite similar to that of UNIX

M.M. Rakibul Hasan CSC-307[Operating Systems] 17


Components of Linux System
• Kernel is the core part of Linux that responsible for all major
activities of this OS
• It consists of various modules and it interacts directly with the
underlying hardware
• Kernel provides the required abstraction to hide low level
hardware details to system or application programs

• System Libraries are special functions or programs using


which application programs or system utilities accesses
Kernel's features
Figure 3 Linux OS components • These libraries implement most of the functionalities of the OS
and do not requires kernel module's code access rights

• System Utility − System Utility programs are responsible to do


specialized, individual level tasks

M.M. Rakibul Hasan CSC-307[Operating Systems] 18


Kernel Mode vs. User Mode
 Kernel component code executes in a special privileged mode called kernel
mode with full access to all resources of the computer
– This code represents a single process, executes in single address space and do not require any
context switch and hence is very efficient and fast
– Kernel runs each processes and provides system services to processes, provides protected
access to hardware to processes

 Support code which is not required to run in kernel mode is in System Library
– User programs and other system programs works in User Mode which has no access to system
hardware and kernel code
– User programs/ utilities use System libraries to access Kernel functions to get system's low level
tasks

M.M. Rakibul Hasan CSC-307[Operating Systems] 19


Basic Features
 Portable − Portability means software can works on different types of hardware in same way
 Open Source − Linux source code is freely available and it is community based development project
 Multi-User − Linux is a multiuser system means multiple users can access system resources like
memory/ RAM/ application programs at same time
 Multiprogramming − Linux is a multiprogramming system means multiple applications can run at
same time
 Hierarchical File System − Linux provides a standard file structure in which system files/ user files
are arranged
 Shell − Linux provides a special interpreter program which can be used to execute commands of the
operating system
 Security − Linux provides user security using authentication features like password protection/
controlled access to specific files/ encryption of data

M.M. Rakibul Hasan CSC-307[Operating Systems] 20


Architecture of Linux system
consists of the following layers:
• Hardware layer − Hardware consists of all peripheral
devices (RAM/ HDD/ CPU etc.)

• Kernel − Core component of Operating System (OS)


that interacts directly with hardware and provides
low level services to upper layer components

• Shell − An interface to kernel, hiding complexity of


kernel's functions from users
Figure 4 Architecture of a Linux system
• Utilities − Utility programs that provide the user most
of the functionalities of an OSs

M.M. Rakibul Hasan CSC-307[Operating Systems] 21


Exercise
1. Explain the basic Windows OS architecture components.
2. Explain the Linux OS components.
3. Show the comparison between kernel mode and user mode that
belongs to Linux OS.
4. Explain the architecture of a Linux system.
5. Which one is better: Windows or Linux? Justify your answer.

M.M. Rakibul Hasan CSC-307[Operating Systems] 22


Every end is
a new beginning!!!

You might also like