1. INTRODUCTION TO OPERATING SYSTEMS
DEFINITION OF OPERATING SYSTEM:
Operating System (OS) is a software that acts as an interface between
computer hardware components and the user.
2. INTRODUCTION TO OPERATING SYSTEMS
ROLE OF AN OPERATING SYSTEM
1. Memory Management
2. Processor Management
3. Device Management
4. File Management
5. Security
6. Control over system performance
7. Job accounting
8. Error detecting aids
9. Coordination between other software and users
3. INTRODUCTION TO OPERATING SYSTEMS
Memory Management
Memory management refers to management of Primary Memory or Main
Memory. Main memory is a large array of words or bytes where each word or
byte has its own address.
Main memory provides a fast storage that can be accessed directly by the CPU.
For a program to be executed, it must in the main memory.
4. INTRODUCTION TO OPERATING SYSTEMS
Processor Management
In multiprogramming environment, the OS decides which process gets the
processor when and for how much time. This function is called process
scheduling.
Device Management
An Operating System manages device communication via their respective drivers. It does
the following activities for device management −
Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.
5. INTRODUCTION TO OPERATING SYSTEMS
File Management
A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directions.
6. INTRODUCTION TO OPERATING SYSTEMS
Security
By means of password and similar other techniques, it prevents unauthorized
access to programs and data.
Control over system performance
Recording delays between request for a service and response from the system.
Job accounting
Keeping track of time and resources used by various jobs and users.
7. INTRODUCTION TO OPERATING SYSTEMS
Error detecting aids
Production of dumps, traces, error messages, and other debugging and error
detecting aids.
Coordination between other softwares and users
Coordination and assignment of compilers, interpreters, assemblers and other
software to the various users of the computer systems.
8. INTRODUCTION TO OPERATING SYSTEMS
TYPES OF OPERATING SYSTEM
The Operating System is responsible for managing various resources of the
system.
1. Batch Operating System
2. Time-Sharing Operating System
3. Distributed Operating System
4. Embedded Operating System
5. Real-time Operating System
9. INTRODUCTION TO OPERATING SYSTEMS
Batch Operating System
In a Batch Operating System, the similar jobs are grouped together into batches with the
help of some operator and these batches are executed one by one.
Time-Sharing Operating System
In a Multi-tasking Operating System, more than one processes are being executed at a
particular time with the help of the time-sharing concept. So, in the time-sharing
environment, we decide a time that is called time quantum and when the process starts its
execution then the execution continues for only that amount of time and after that, other
processes will be given chance for that amount of time only.
10. INTRODUCTION TO OPERATING SYSTEMS
Distributed Operating System
In a Distributed Operating System, we have various systems and all these systems have their
own CPU, main memory, secondary memory, and resources. These systems are connected
to each other using a shared communication network. Here, each system can perform its
task individually.
Embedded Operating System
An Embedded Operating System is designed to perform a specific task for a particular
device which is not a computer.
11. INTRODUCTION TO OPERATING SYSTEMS
Real-time Operating System
The Real-time Operating Systems are used in the situation where we are dealing with some
real-time data. So, as soon as the data comes, the execution of the process should be done
and there should be no dealy i.e. no buffer delays should be there.
12. INTRODUCTION TO OPERATING SYSTEMS
MAJOR OS COMPONENTS
An operating system is a large and complex system that can only be created by partitioning
into small pieces. These pieces should be a well-defined portion of the system, which
carefully defined inputs, outputs, and functions.
13. INTRODUCTION TO OPERATING SYSTEMS
Components:
1. File Management
2. Process Management
3. I/O Device Management
4. Network Management
5. Main Memory management
6. Secondary-Storage Management
7. Security Management
8. Other Important Activities
15. INTRODUCTION TO OPERATING SYSTEMS
File Management
A file is a set of related information which is should define by its creator. It commonly
represents programs, both source and object forms, and data. Data files can be numeric,
alphabetic, or alphanumeric.
Process Management
The process management component is a procedure for managing the many processes that
are running simultaneously on the operating system. Every software application program
has one or more processes associated with them when they are running.
16. INTRODUCTION TO OPERATING SYSTEMS
I/O Device Management
One of the important use of an operating system that helps you to hide the variations of
specific hardware devices from the user.
Network Management
Network management is the process of administering and managing computer networks. It
includes performance management, fault analysis, provisioning of networks, and
maintaining the quality of service.
17. INTRODUCTION TO OPERATING SYSTEMS
Main Memory management
Main Memory is a large array of storage or bytes, which has an address. The memory
management process is conducted by using a sequence of reads or writes of specific
memory addresses.
18. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM OPERATIONS
An operating system is a construct that allows the user application programs
to interact with the system hardware.
The major operations of the operating system are process management,
memory management, device management and file management.
20. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM OPERATIONS
Process Management
The operating system is responsible for managing the processes i.e assigning
the processor to a process at a time. This is known as process scheduling.
The different algorithms used for process scheduling are FCFS (first come first
served), SJF (shortest job first), priority scheduling, round robin scheduling etc.
21. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM OPERATIONS
Memory Management
It deals with memory and the moving of processes from disk to primary
memory for execution and back again.
22. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM OPERATIONS
Device Management
There are many I/O devices handled by the operating system such as
mouse, keyboard, disk drive etc.
There are different device drivers that can be connected to the operating
system to handle a specific device.
The device controller is an interface between the device and the device
driver.
23. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM OPERATIONS
File Management
Files are used to provide a uniform view of data storage by the
operating system. All the files are mapped onto physical devices that
are usually non volatile so data is safe in the case of system failure.
Sequential Access
Direct Access
24. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
An Operating System supplies different kinds of services to both the
users and to the programs as well.
It also provides application programs (that run within an Operating
system) an environment to execute it freely.
It provides users the services run various programs in a convenient
manner.
25. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
An Operating System supplies different kinds of services to both the
users and to the programs as well.
It also provides application programs (that run within an Operating
system) an environment to execute it freely.
It provides users the services run various programs in a convenient
manner.
26. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
common services offered by an almost all operating systems:
User Interface
Program Execution
File system manipulation
Input / Output Operations
Communication
Resource Allocation
Error Detection
Accounting
Security and protection
27. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
User Interface
Usually Operating system comes in three forms or types.
Depending on the interface their types have been further
subdivided. These are:
Command line interface
Batch based interface
Graphical User Interface
28. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
Program Execution
The operating system must have the capability to load a
program into memory and execute that program.
Furthermore, the program must be able to end its
execution, either normally or abnormally / forcefully.
29. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
File System Manipulation
Programs need has to be read and then write them as files and
directories. File handling portion of operating system also allows
users to create and delete files by specific name along with
extension, search for a given file and / or list file information.
Some programs comprise of permissions management for allowing
or denying access to files or directories based on file ownership.
30. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM SERVICES
Input/Output Operations
A program which is currently executing may require I/O, which may
involve file or other I/O device. For efficiency and protection, users
cannot directly govern the I/O devices.
So, the OS provide a means to do I/O Input / Output operation
which means read or write operation with any file.
31. INTRODUCTION TO OPERATING SYSTEMS
SYSTEM CALLS
A system call is a method of interacting with the operating system
via programs. A system call is a request from computer software to
an operating system's kernel.
A system call is a way for a user program to interface with the
operating system.
32. INTRODUCTION TO OPERATING SYSTEMS
Types of System Calls
1. Process Control
2. File Management
3. Device Management
4. Information Maintenance
5. Communication
33. INTRODUCTION TO OPERATING SYSTEMS
Process Control
Process control is the system call that is used to direct the processes. Some
process control examples include creating, load, abort, end, execute, process,
terminate the process, etc.
File Management
File management is a system call that is used to handle the files. Some file
management examples include creating files, delete files, open, close, read,
write, etc.
34. INTRODUCTION TO OPERATING SYSTEMS
Device Management
Device management is a system call that is used to deal with devices. Some
examples of device management include read, device, write, get device
attributes, release device, etc.
Information Maintenance
Information maintenance is a system call that is used to maintain information.
There are some examples of information maintenance, including getting
system data, set time or date, get time or date, set system data, etc.
35. INTRODUCTION TO OPERATING SYSTEMS
Communication
Communication is a system call that is used for communication. There are
some examples of communication, including create, delete communication
connections, send, receive messages, etc.
36. INTRODUCTION TO OPERATING SYSTEMS
SYSTEM PROGRAMS
System programs provide an environment where programs can be developed
and executed. In the simplest sense, system programs also provide a bridge
between the user interface and system calls.
37. INTRODUCTION TO OPERATING SYSTEMS
Types of System Programs
Status Information
Communications
File Manipulation
Program Loading and Execution
File Modification
Application Programs
38. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM STRUCTURE
Simple Structure
Monolithic Approach
Layered Approach
Microkernels
39. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM STRUCTURE
Simple Structure
Operating systems such as MS-DOS and the original UNIX did not have well-
defined structures.
There was no CPU Execution Mode (user and kernel), and so errors in
applications could cause the whole system to crash.
41. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM STRUCTURE
Monolithic Approach
Functionality of the OS is invoked with simple function calls within the kernel,
which is one large program.
Device drivers are loaded into the running kernel and become part of the
kernel.
43. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM STRUCTURE
Layered Approach
This approach breaks up the operating system into different layers.
This allows implementers to change the inner workings, and increases
modularity.
As long as the external interface of the routines don’t change, developers have
more freedom to change the inner workings of the routines.
45. INTRODUCTION TO OPERATING SYSTEMS
OPERATING SYSTEM STRUCTURE
Microkernels
This structures the operating system by removing all nonessential portions of
the kernel and implementing them as system and user level programs.
Generally they provide minimal process and memory management, and a
communications facility.
Communication between components of the OS is provided by message
passing.
47. INTRODUCTION TO OPERATING SYSTEMS
PROCESS
A process is a program at the time of execution. The process is more than the
program code. It includes the program counter, the process stack, and the
content of the process register, etc.
48. INTRODUCTION TO OPERATING SYSTEMS
PROCESS
Process States in OS
1. New: The process is being created.
2. Running: The process is being executed.
3. Waiting: The process is waiting for some event to occur.
4. Ready: The process is waiting to be assigned to a processor.
5. Terminate: The process has finished execution.
49. INTRODUCTION TO OPERATING SYSTEMS
PROCESS SCHEDULING
The process scheduling is the activity of the process manager that
handles the removal of the running process from the CPU.
Process scheduling is an essential part of a Multiprogramming
operating systems. Such operating systems allow more than one
process to be loaded into the executable memory at a time.
50. INTRODUCTION TO OPERATING SYSTEMS
OPERATIONS ON PROCESSES
There are many operations that can be performed on processes.
Some of these are process creation, process preemption, process
blocking, and process termination.
51. INTRODUCTION TO OPERATING SYSTEMS
OPERATIONS ON PROCESSES
Process Creation
Processes need to be created in the system for different operations. This can
be done by the following events.
User request for process creation
System initialization
Execution of a process creation system call by a running process
Batch job initialization
53. INTRODUCTION TO OPERATING SYSTEMS
OPERATIONS ON PROCESSES
Process Preemption
An interrupt mechanism is used in preemption that suspends the process
executing currently and the next process to execute is determined by the
short-term scheduler. Preemption makes sure that all processes get some CPU
time for execution.
54. INTRODUCTION TO OPERATING SYSTEMS
OPERATIONS ON PROCESSES
Process Blocking
The process is blocked if it is waiting for some event to occur. This event may
be I/O as the I/O events are executed in the main memory and don't require
the processor. After the event is complete, the process again goes to the ready
state.
55. INTRODUCTION TO OPERATING SYSTEMS
OPERATIONS ON PROCESSES
Process Termination
After the process has completed the execution of its last instruction, it is
terminated. The resources held by a process are released after it is terminated.
56. INTRODUCTION TO OPERATING SYSTEMS
INTER PROCESS COMMUNICATION
Interprocess communication is the mechanism provided by the operating
system that allows processes to communicate with each other.
This communication could involve a process letting another process know that
some event has occurred or the transferring of data from one process to
another.