You are on page 1of 24

Faculty of Computer science

Operating System

Lecturer: Mr. Lutfullah


Haqnesar
Operating System Chapter One
Introduction

Description Marks
Class participation & Quiz 10
Assignments & Presentation 10
Mid term exam 30
Final exam 50
Total marks 100
Operating System Chapter One
Operating System Introduction

Chapter One
Introduction to Operating System
Operating System Chapter One
Introduction

Agenda
• Introduction to OS
• Features of OS
• Basic Functions of OS
• Components of OS
• Modes of OS
• User Mode and Kernel Mode
Operating System Chapter One
Introduction
Operating System Chapter One
Introduction

Operating System
• An operating system acts as an interface between the user and the
computer hardware.
• It is a system software that manages computer hardware and
software resources and provides common services for computer
program.
• It is responsible for the execution of all the processes, Resource
Allocation, CPU management, File Management and many other
tasks.
Operating System Chapter One
Introduction
Structure of a Computer System
Operating System Chapter One
Introduction
Operating System Chapter One
Introduction
Features of OS
• Provides user interface

• Process management

• Program Execution

• Memory management

• File management

• Handling I/O operations


Operating System Chapter One
Introduction
Features of OS (continued..)
• They have a management of resources

• Operating System are multi-tasking systems

• Provide connection (between hardware, software and interface)

• Error Detection and handling

• Resource allocation

• Information and Resource Protection


Operating System Chapter One
Introduction
Functions of OS
Operating System Chapter One
Introduction
Functions of OS
Process management:
• Process management helps OS to create and delete processes.
Memory management:
• Memory management module performs the task of allocation and de-
allocation of memory space to programs in need of this resources.
File management:
• It manages all the file-related activities such as organization storage,
retrieval, naming, sharing, and protection of files.
Operating System Chapter One
Introduction
Functions of OS (continued..)
Device Management:
• Device management keeps tracks of all devices.
• This module also responsible for this task is known as the I/O controller.
I/O System Management:
• One of the main objects of any OS is to hide the peculiarities of that hardware devices from the
user.
Secondary-Storage Management:
• Systems have several levels of storage which includes primary storage, secondary storage, and
cache storage.
• Instructions and data must be stored in primary storage or cache so that a running program can
reference it.
Operating System Chapter One
Introduction
Functions of OS (continued..)
Security:
• Security module protects the data and information of a computer system against malware threat
and authorized access.
Networking:
• A distributed system is a group of processors which do not share memory, hardware devices, or a
clock. The processors communicate with one another through the network.
Job accounting:
• Keeping track of time & resource used by various job and users.
Communication management:
• Coordination and assignment of compilers, interpreters, and another software resource of the
various users of the computer systems.
Operating System Chapter One
Introduction
Components of Operating System
• An operating system is a large and complex system that can only be
created by partitioning into small parts.

• These pieces should be a well-defined part of the system, carefully


defining inputs, outputs, and functions.

• Although Windows, Mac, UNIX, Linux, and other OS do not have the
same structure, most operating systems share similar OS system
components, such as file, memory, process, I/O device management.
Operating System Chapter One
Introduction
Components of Operating System
Operating System Chapter One
Introduction
Modes of Operating System
The operating system has two modes of operation to ensure it
works correctly:

1. User Mode

2. Kernel Mode
Operating System Chapter One
Introduction
Modes of Operating System
Operating System Chapter One
Introduction
Modes of Operating System
• Mode bit is required to identify in which particular mode the
current instruction is executing.
• If the mode bit is 1, it operates user mode, and if the mode
bit is 0, it operates in kernel mode.
• At the booting time of the system, it always starts with the
kernel mode.
Operating System Chapter One
Introduction
Modes of Operating System
1. User Mode (Non Privileged Mode):
• When the computer system runs user applications like file creation it
is in the User Mode.
• This mode does not have direct access to the computer's hardware.
• For performing hardware related tasks, like an interrupt occurs, in
these cases, the system must switch to the Kernel Mode.
• If the mode bit of the system's processor is 1, then the system will be
in the User Mode.
Operating System Chapter One
Introduction
Modes of Operating System
2. Kernel Mode (Privileged Mode):
• All the bottom level tasks of the Operating system are performed in the
Kernel Mode.
• Kernel space has direct access to the hardware of the system, so the
kernel-mode handles all the processes which require hardware support.
• The main functionality of the Kernel Mode is to execute privileged
instructions.
• The mode bit for the Kernel Mode is 0.
Operating System Chapter One
Introduction
Example
Operating System Chapter One
Introduction
Terms
Difference
User Mode
between User Mode and Kernel Mode
Kernel Mode
Definition User Mode is a restricted mode, which the Kernel Mode is the privileged mode, which the
application programs are executing and starts. computer enters when accessing hardware
resources.

Modes User Mode is considered as the slave mode or the Kernel mode is the system mode, master
restricted mode. mode or the privileged mode.

Address Space In User mode, a process gets its own address space. In Kernel Mode, processes get a single address
space.
Interruptions In User Mode, if an interrupt occurs, only one process In Kernel Mode, if an interrupt occurs, the
fails. whole operating system might fail.

Restrictions In user mode, there are restrictions to access kernel In kernel mode, both user programs and
programs. Cannot access them directly. kernel programs can access.
Operating System Chapter One
Introduction

You might also like