0% found this document useful (0 votes)
37 views37 pages

Chapter-II Services & Components of Os

The document discusses the key services and components of an operating system. It describes six main services provided by OS: user interface, program execution, I/O operations, file system manipulation, communication, and error detection. It also explains system calls, OS components like process management, memory management, file management, I/O system management, secondary storage management, and use of OS tools for user management and security policies.

Uploaded by

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

Chapter-II Services & Components of Os

The document discusses the key services and components of an operating system. It describes six main services provided by OS: user interface, program execution, I/O operations, file system manipulation, communication, and error detection. It also explains system calls, OS components like process management, memory management, file management, I/O system management, secondary storage management, and use of OS tools for user management and security policies.

Uploaded by

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

OPERATING SYSTEMS

OSY - 22516

UNIT-II
SERVICES & COMPONENTS OF OS

Mr. Naresh A. Kamble


POINTS TO BE COVERED
• Different Services of OS
• System Calls
• Operating System Components
• Use of Operating System Tools
DIFFERENT SERVICES OF OS
• There are total 6 services provided by OS

1. User Interface

2. Program Execution

3. I/O Operations

4. File System Manipulation

5. Communication

6. Error Detection
DIFFERENT SERVICES OF OS
 USER INTERFACE
 Almost all operating systems have a user interface (UI)

 Varies between Command-Line (CLI), Graphics User


Interface (GUI).

 PROGRAM EXECUTION
 The system must be able to load a program into memory
and to run that program, end execution, either normally
or abnormally (indicating error)
DIFFERENT SERVICES OF OS
 I/O OPERATIONS

 A running program may require I/O, which may involve a file


or an I/O device.

 FILE-SYSTEM MANIPULATION

 The file system is of particular interest. Obviously, programs


need to read and write files and directories, create and
delete them, search them, list file Information, permission
management.
DIFFERENT SERVICES OF OS
 COMMUNICATIONS

 Processes may exchange information, on the same computer

or between computers over a network.

 Communications may be via shared memory or through

message passing (packets moved by the OS)


DIFFERENT SERVICES OF OS
 ERROR DETECTION

 OS needs to be constantly aware of possible errors

 May occur in the CPU and memory hardware, in I/O devices,

in user program

 For each type of error, OS should take the appropriate action

to ensure correct and consistent computing

 Debugging facilities can greatly enhance the user’s and

programmer’s abilities to efficiently use the system


SYSTEM CALLS
• The interface between OS and user programs is defined by
the set of system calls that the operating system offers.

• System call is the call for the operating system to perform


some task on behalf of the user’s program.

• The system calls are functions used in KERNEL itself.


SYSTEM CALLS
• TYPES OF SYSTEM CALLS
1. Process Control

2. File Manipulation

3. Device Manipulation

4. Information Maintenance

5. Communications
SYSTEM CALLS
• PROCESS CONTROL

• Controls the process through following activities

• End • Set process attributes


• Abort • wait for time
• Load • wait event
• Execute • signal event
• Create process • allocate and free memory
• Terminate process
• Get process attributes
SYSTEM CALLS
• FILE MANIPULATION

• Manages the file through following activities

• Create file • Get file attributes


• Delete file • Set file attributes
• Open
• Close
• read
• write
• reposition
SYSTEM CALLS
• DEVICE MANIPULATION

• Manages the device through following activities

• Request device
• Release device
• read
• write
• reposition
• Get device attributes
• Set device attributes
SYSTEM CALLS
• INFORMATION MAINTENANCE

• Manages different information through following activities

• Get time or date


• Set time or date
• Get system data
• Set system data
• Get process file
• Set process file
SYSTEM CALLS
• COMMUNICATION

• Manages different communication through following activities

• Create communication • Attach remote device


channel • Detach remote device
• Delete communication
channel
• Send & Receive message
• Transfer status information
OS COMPONENTS
• PROCESS MANAGEMENT

• A process is a program in execution. It is a unit of work within the system.


Program is a passive entity, process is an active entity.

• Process needs resources to accomplish its task CPU, memory, I/O, files etc.

• Process termination requires reclaim of any reusable resources.

• Single-threaded process has one program counter specifying location of


next instruction to execute.
OS COMPONENTS
• PROCESS MANAGEMENT

• Process executes instructions sequentially, one at a time, until completion.

• Multi-threaded process has one program counter per thread.

• Typically system has many processes, some user, some operating system
running concurrently on one or more CPUs.

• Concurrency by multiplexing the CPUs among the processes / threads


OS COMPONENTS
• PROCESS MANAGEMENT ACTIVITIES

• The operating system is responsible for the following activities


in connection with process management:

• Creating and deleting both user and system processes

• Suspending and resuming processes

• Providing mechanisms for process synchronization

• Providing mechanisms for process communication

• Providing mechanisms deadlock handling


OS COMPONENTS
• MAIN MEMORY MANAGEMENT
• Main Memory refers to a physical memory that is the internal
memory to the computer.

• The word main is used to distinguish it from external mass storage


devices such as disk drives.

• Main memory is also known as RAM.

• The computer is able to change only data that is in main memory.

• Therefore, every program we execute and every file we access must


be copied from a storage device into main memory.
OS COMPONENTS
• MAIN MEMORY MANAGEMENT

• Keeping track of which parts of memory are currently being


used and by whom.

• Deciding which processes (or parts thereof) and data to move


into and out of memory (swapping).

• Allocating and deallocating memory space as needed.


OS COMPONENTS
• FILE MANAGEMENT
• File management is one of the basic and important features of
operating system.

• Operating system is used to manage files of computer system.

• All the files with different extensions are managed by operating


system.
OS COMPONENTS
• FILE MANAGEMENT

• A file is collection of specific information stored in the


memory of computer system.

• File management is defined as the process of


manipulating files in computer system, it management
includes the process of creating, modifying and deleting
the files.
OS COMPONENTS
• FILE MANAGEMENT ACTIVITIES
• It helps to create new files in computer system and placing
them at the specific locations.
• It helps in easily and quickly locating these files in computer
system.
• It makes the process of sharing of the files among different
users very easy and user friendly.
• It helps to stores the files in separate folders known as
directories. These directories help users to search file quickly
or to manage the files according to their types or uses.
• It helps the user to modify the data of files or to modify the
name of the file in the directories.
OS COMPONENTS
• I/O SYSTEM MANAGEMENT

• One of the important jobs of an Operating System is to


manage various I/O devices including mouse, keyboards,
touch pad, disk drives, display adapters, USB devices, Bit-
mapped screen, LED, Analog-to-digital converter, On/off
switch, network connections, audio I/O, printers etc.
OS COMPONENTS
• An I/O system is required to take an application I/O request and send it to
the physical device, then take whatever response comes back from the
device and send it to the application. I/O devices can be divided into two
categories −

• Block devices − A block device is one with which the driver communicates
by sending entire blocks of data. For example, Hard disks, USB cameras,
Disk-On-Key etc.

• Character devices − A character device is one with which the driver


communicates by sending and receiving single characters (bytes, octets).
For example, serial ports, parallel ports, sounds cards etc.
OS COMPONENTS
• SECONDARY STORAGE MANAGEMENT
• OS provides uniform, logical view of information storage
• Abstracts physical properties to logical storage unit – file
• Each medium is controlled by device (i.e., disk drive, tape drive)
• Varying properties include access speed, capacity, data-transfer
rate, access method (sequential or random)
• File-System management
• Files usually organized into directories
• Access control on most systems to determine who can access what
OS COMPONENTS
• SECONDARY STORAGE MANAGEMENT ACTIVITIES

• Creating and deleting files and directories

• Primitives to manipulate files and directories.

• Mapping files onto secondary storage

• Backup files onto stable (non-volatile) storage media


USE OF OPERATING SYSTEM TOOLS
• USER MANAGEMENT

• A user is a person who utilizes a computer or network service.

• A user often has a user account and is identified to the system


by a username (or user name)
USE OF OPERATING SYSTEM TOOLS
• USER ACCOUNTS

• A user's account allows a user to authenticate to a system and


potentially to receive authorization to access resources
provided by or connected to that system.

• Single-user systems do not have a concept of several user


accounts.

• Multi-user systems have such a concept, and require users to


identify themselves before using the system.
USE OF OPERATING SYSTEM TOOLS
• SECURITY POLICY

• Security policies and procedures are associated with


protecting users and the operating systems on their
computers.

• An OS security policy is one that contains information which


outlines the processes of ensuring that the OS maintains a
certain level of integrity, confidentiality, and availability (CIA
TRAID).
USE OF OPERATING SYSTEM TOOLS
• OS security protects systems and data from threats, viruses,
worms, malware, ransomware, backdoor intrusions, and
more.

• Security policies cover all preventative measures and


techniques to ensure the safeguarding of an OS, the network
it connects to, and the data which can be stolen, edited or
deleted.
USE OF OPERATING SYSTEM TOOLS
• ADDRESSING OS SECURITY POLICY

• Ensuring systems are patched or updated regularly

• Installing and updating anti-virus software

• Installing a firewall and ensuring it is configured properly to


monitor all incoming and outgoing traffic

• Implementing user management procedures secure user


accounts and privileges
USE OF OPERATING SYSTEM TOOLS
• DEVICE MANAGEMENT

• An operating system or the OS manages communication with


the devices through their respective drivers.

• The operating system component provides a uniform


interface to access devices of varied physical attributes.
USE OF OPERATING SYSTEM TOOLS
• FOR DEVICE MANAGEMENT IN OPERATING SYSTEM:

• Keep tracks of all devices and the program which is


responsible to perform this is called I/O controller.

• Monitoring the status of each device such as storage drivers,


printers and other peripheral devices.

• Enforcing preset policies and taking a decision which process


gets the device when and for how long.

• Allocates and Deallocates the device in an efficient way.


USE OF OPERATING SYSTEM TOOLS
• TYPES OF DEVICES:
• Dedicated devices
– Such type of devices in the device management in operating
system are dedicated or assigned to only one job at a time until that
job releases them.

• Shared devices
– These devices can be allocated to several processes.

• Virtual Devices
– These devices are the combination of the first two types and they are
dedicated devices which are transformed into shared devices.
USE OF OPERATING SYSTEM TOOLS
• PERFORMANCE MONITOR
• Performance Monitor (known as System
Monitor in Windows) is a system monitoring program which
monitors various activities on a computer such as CPU or
memory usage.
• This type of application may be used to determine the cause
of problems on a local or remote computer by measuring the
performance of hardware, software services, and
applications.
USE OF OPERATING SYSTEM TOOLS
• TASK SCHEDULER

• The process scheduling is the activity of the process manager that handles
the removal of the running process from the CPU and the selection of
another process on the basis of a particular strategy.

• Schedulers are special system software which handle process scheduling


in various ways.

• Their main task is to select the jobs to be submitted into the system and to
decide which process to run.
USE OF OPERATING SYSTEM TOOLS
• Schedulers are of three types −

• Long-Term Scheduler
• It is also called a job scheduler.

• Short-Term Scheduler
• It is also called as CPU scheduler.

• Medium-Term Scheduler
• Medium-term scheduling is a part of swapping.

You might also like