OPERATING SYSTEM CONCEPTS Unit 1 2023-2024
OPERATING SYSTEM CONCEPTS Unit 1 2023-2024
This type of operating system does not interact with the computer directly
There is an operator which takes similar jobs having the same
requirement and group them into batches
It is the responsibility of the operator to sort jobs with similar needs
Each user prepares his job on an off-line device like punch cards and
submits it to the computer operator
To speed up processing, jobs with similar needs are batched together and
run as a group
The programmers leave their programs with the operator and the operator
then sorts the programs with similar requirements into batches
Advantages
Processors of the batch systems know how long the job would be
when it is in queue
Multiple users can share the batch systems
The idle time for the batch system is very less
It is easy to manage large work repeatedly in batch systems
Disadvantages
Lack of interaction between the user and the job
It is very difficult to know the time required for any job to complete
CPU is often idle, because the speed of the mechanical I/O devices is
slower than the CPU
Difficult to provide the desired priority
The computer operators should be well known with batch systems
Batch systems are hard to debug
It is sometimes costly
The other jobs will have to wait for an unknown time if any job fails
2. Multiprogramming systems
The different open source operating system available in the market are:
1. COSMOS
This is an open source operating system written in programming
language C#
Full form of COSMOS is C# Open Source Managed Operating
System
2. FreeDOS
This was a free operating system developed for systems
compatible with IBM PC computers
FreeDOS provides a complete environment to run softwares and
other embedded systems
It can booted from a floppy disk or USB flash drive as required
3. Genode
Genode is free as well as open source
It contains a microkernel layer and different user components
It is one of the few open source operating systems not derived
from a licensed operating system such as Unix
Genode can be used as an operating system for computers,
tablets etc. as required
4. Ghost OS
This is a free, open source operating system developed for PCs
It started as a research project and developed to contain various
advanced features like graphical user interface, C library etc.
The Ghost operating system features multiprocessing and
multitasking and is based on the Ghost Kernel
5. ITS
The incompatible time-sharing system was developed by the MIT
Artificial Intelligence Library
It is principally a time sharing system
There is a remote login facility which allowed guest users to
informally try out the operating system and its features using
ARPANET
6. GNU /Linux
It is developed by Linus Torvalds in Finland in 1991 as the first
full operating system developed by GNU
Many different distributions of Linux have evolved from Linus's
original, including RedHat, SUSE, Fedora, Debian, Slackware,
and Ubuntu
7. BSD UNIX
UNIX was originally developed at AT&T Bell labs, and the
source code made available to computer science students at
many universities, including the University of California at
Berkeley, UCB
UCB students developed UNIX further, and released their
product as BSD UNIX in both binary and source-code format
8. Solaris
Solaris is the UNIX operating system for computers from Sun
Microsystems
Solaris was originally based on BSD UNIX
Parts of Solaris are now open-source
It is possible to change the open-source components of Solaris
Advantages of using open source software include our ability to:
1 View source code
2 Change and redistribute source code
3 Buy from different vendors and adopt new platforms
4Avoid proprietary information formats
5 Allow integration between products
6 Reduce software licensing cost and effort
7 Develop and deploy effectively internationally
Process Management
1. Process concept- meaning of process
A program in execution is called process
A process is the unit of work in a system
A process (or job) is the fundamental unit of work in an
operating system
A process is the basic unit of execution in an operating system
max
stack
!
t
heap
data
0 text
4. It is also minimal in the time 4. It is absent in the time 4.It is a part of the time sharing
sharing system sharing system system
5. It selects those processes 5. It selects processes from 5. It can re-introduce the process
which are ready to execute pool and loads them into into memory and execution can
be continued
memory for execution
7.Context-switch/ Context-switching
When CPU switches to another process, the system must save the state of
the old process and load the saved state for the new process. This task is
known as a context-switch/ context-switching
When current executing process P0 interrupted, the OS saves the sate into
PCB0 of P0 and load the PCBl of process Pl and P0 process will be idle and
Pl will be executing.
After Pl execution is completed, the OS will save state into PCBl and
reload state from PCB0 and P1 process will be idle whereas P0 will be
executing
Switching the CPU to another process requires performing a state save of
the current process and a state restore of a different process. This task is
known as a Context-switch /context-switching
Interrupts cause the OS to change a CPU from its current task and to run
a kernel routine
When an interrupt occurs, the system needs to save the current context of
the process running on the CPU so that it can restore that context when its
processing is done, essentially suspending the process and then resuming it
The context is represented in the PCB of the process, it includes the value
of the CPU registers, the process state and memory-management
information
When a context switch occurs, the kernel saves the context of the old
process in its PCB and loads the saved context of the new process scheduled
to run
Context-switch time is pure overhead, because the system does no useful
work while switching
Context-switch times are highly dependent on hardware support
8.Operations on Processes
Operations on Processes are:
1 Process creation
2 Process termination
1 Process creation
A process may create several new processes, via create() system call,
during the course of execution
The creating process is called a parent process, and the new processes are
called the children of that process
Each of these new processes may in tum create other processes, forming a
tree of processes
Each process is given an integer identifier, termed as process identifier, or
PID
The parent PID (PPID) is also stored for each process
When a process creates a sub process, that sub process may be able to
obtain its resources directly from the operating system, or it may be
constrained to a subset of the resources of the parent process
The parent may have to partition its resources among its children, or it
may be able to share some resources (such as memory or files) among
several of its children
When a process is created, it obtains, in addition to the various physical
and logical resources, initialization data (or input) that may be passed along
from the parent process to the child process
When a process creates a new process, two possibilities exist in terms of
execution:
1. The parent continues to execute concurrently with its children.
2. The parent waits until some or all of its children have terminated
There are also two possibilities in terms of the address space of the new
process:
1 The child process is a duplicate of the parent process (it has the same
program and data as the parent)
2 The child process has a new program loaded into it
2 Process termination
A process terminates when it finishes executing its final statement and
asks the operating system to delete it by using the exit ( ) system call
At that point, the process may return a status value (an integer) to its
parent process via the wait( ) system call
All the resources of the process-including physical and virtual memory,
open files, and I/O buffers-are deallocated by the operating system
Termination occurs under additional circumstances
A process can cause the termination of another process via an appropriate
system call abort( )
Usually, only the parent of the process that is to be terminated can invoke
such a system call
A parent may terminate the execution of one of its children for a variety
of reasons:
1. The child has exceeded its usage of some of the resources that it has been
allocated
2. The task assigned to the child is no longer required
3. The parent is exiting, and the operating system does not allow a child to
continue if its parent terminates
The parent may wait for its children to terminate before proceeding, or
the parent and children may execute concurrently
9.Interprocess communication (IPC)