Vijay Kumar: IBPS (SO) I.T.O Cer: Operating System Study Notes
Vijay Kumar: IBPS (SO) I.T.O Cer: Operating System Study Notes
Vijay Kumar: IBPS (SO) I.T.O Cer: Operating System Study Notes
Officer:OperatingSystemStudyNotes
Vijay Kumar
Jan 18 Bank & Insurance
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 3/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
4. Real Time System: In this Response Time is already xed. Means time to Display
the Results after Possessing has xed by the Processor or CPU. Real Time System
is used at those Places in which we Requires higher and Timely Response.
Hard Real Time System: In the Hard Real Time System, Time is xed and we
cant Change any Moments of the Time of Processing. Means CPU will
Process the data as we Enters the Data.
Soft Real Time System: In the Soft Real Time System, some Moments can be
Change. Means after giving the Command to the CPU, CPU Performs the
Operation after a Microsecond.
A process is more than the program code. It also includes the current activity as
represented by following:
Process in Memory:
Each process is represented in the as by a Process Control Block (PCB) also called
a task control block.
PCB: A process in an operating system is represented by a data structure known as
a process control block (PCB) or process descriptor.
The PCB contains important information about the specic process including
The current state of the process i.e., whether it is ready, running, waiting, or
whatever.
Unique identication of the process in order to track "which is which"
information.
A pointer to parent process.
Similarly, a pointer to child process (if it exists).
The priority of process (a part of CPU scheduling information).
Pointers to locate memory of processes.
A register save area.
The processor it is running on.
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 5/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
Dispatcher:
It is the module that gives control of the CPU to the process selected by the
short term scheduler.
Functions of Dispatcher: Switching context,Switching to user mode, and
Jumping to the proper location in the user program to restart that program.
Thread:
A thread is a single sequence stream within in a process. Because threads have
some of the properties of processes, they are sometimes called lightweight
processes.An operating system that has thread facility, the basic unit of CPU
utilization is a thread.
Multi threading:
An application typically is implemented as a separate process with several threads
of control.
There are two types of threads.
1. User threads:They are above the kernel and they are managed without kernel
support. User-level threads implement in user-level libraries, rather than via
systems calls, so thread switching does not need to call operating system and
to cause interrupt to the kernel. In fact, the kernel knows nothing about user-
level threads and manages them as if they were single-threaded processes.
2. Kernel threads:Kernel threads are supported and managed directly by the
operating system. Instead of thread table in each process, the kernel has a
thread table that keeps track of all threads in the system.
Advantages of Thread
Inter-Process Communication:
CPU Scheduling:
CPU Scheduling is the process by which an Operating System decides which
programs get to use the CPU. CPU scheduling is the basis of MULTIPROGRAMMED
operating systems. By switching the CPU among processes, the operating system
can make the computer more productive.
CPU Schedulers: Schedulers are special system softwares which handles 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.
CPU Scheduling algorithms:
1. First Come First Serve (FCFS)
5. Multi-Queue Scheduling
Synchronization:
Race Condition
Critical Section/Region
2. The critical section problem is to design a protocol that the processes can
use so that their action will not depend on the order in which their execution is
interleaved (possibly on many processors).
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 9/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
interleaved (possibly on many processors).
Deadlock:
A deadlock situation can arise, if the following four conditions hold simultaneously
in a system.
1. P = {Pl, P2, ... ,Pn}, the set consisting of all the processes in the system.
2. R = {Rl, R2, ... , Rm}, the set consisting of all resource types in the system.
Resource Instance
Process States
Deadlock Prevention
Deadlock prevention is a set of methods for ensuring that atleast one of the
necessary conditions can't hold.
Deadlock Avoidance
This approach to the deadlock problem anticipates deadlock before it actually
occurs.
A deadlock avoidance algorithm dynamically examines the resource allocation
state to ensure that a circular wait condition can never exist. The resource
allocation state is dened by the number of available and allocated resources and
the maximum demands of the processes.
Safe State: A state is safe, if the system can allocate resources to each process
and still avoid a deadlock.
Dynamic Loading:
Dynamic Linking:
Overlays: This techniques allow to keep in memory only those instructions and
data, which are required at given time. The other instruction and data is loaded into
the memory space occupied by the previous ones when they are needed.
Swapping: Consider an environment which supports multiprogramming using say
Round Robin (RR) CPU scheduling algorithm. Then, when one process has nished
executing for one time quantum, it is swapped out of memory to a backing store.
The memory manager then picks up another process from the backing store and
loads it into the memory occupied by the previous process. Then, the scheduler
picks up another process and allocates the CPU to it.
Memory Management Techniques
Memory management is the functionality of an operating system which handles or
manages primary memory. Memory management keeps track of each and every
memory location either it is allocated to some process or it is free.
There are two ways for memory allocation as given below
Single Partition Allocation: The memory is divided into two parts. One to be used
by as and the other one is for user programs. The as code and date is protected
from being modied by user programs using a base register.
Multiple Partition Allocation: The multiple partition allocation may be further
classied as
Fixed Partition Scheme: Memory is divided into a number of xed size partitions.
Then, each partition holds one process. This scheme supports multiprogramming
as a number of processes may be brought into memory and the CPU can be
switched from one process to another.
When a process arrives for execution, it is put into the input queue of the smallest
partition, which is large enough to hold it.
Variable Partition Scheme: A block of available memory is designated as a hole at
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 12/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
Variable Partition Scheme: A block of available memory is designated as a hole at
any time, a set of holes exists, which consists of holes of various sizes scattered
throughout the memory.
When a process arrives and needs memory, this set of holes is searched for a hole
which is large enough to hold the process. If the hole is too large, it is split into two
parts. The unused part is added to the set of holes. All holes which are adjacent to
each other are merged.
There are different ways of implementing allocation of partitions from a list of free
holes, such as:
Compile time: When it is known at compile time where the process will reside,
compile time binding is used to generate the absolute code.
Load time: When it is not known at compile time where the process will
reside in memory, then the compiler generates re-locatable code.
Execution time: If the process can be moved during its execution from one
memory segment to another, then binding must be delayed to be done at run
time
Paging
Segmentation
Logical address is divided into blocks called segment i.e., logical address
space is a collection of segments. Each segment has a name and length.
Logical address consists of two things < segment number, offset>.
Segmentation is a memory-management scheme that supports the following
user view of memory. All the location within a segment are placed in
contiguous location in primary storage.
1. A collection of les
2. A directory structure
File Attributes
Each le is referred to by its name. The le is named for the convenience of the
users and when a le is named, it becomes independent of the user and the
process. Below are le attributes
Name
Type
Location
Size
Protection
Time and date
Disk Scheduling
One of the responsibilities of the OS is to use the hardware eciently. For the disk
drives, meeting this responsibility entails having fast access time and large disk
bandwidth.
Access time has two major components
Seek time is the time for the disk arm to move the heads to the cylinder
containing the desired sector.
The rotational latency is the additional time for the disk to rotate the desired
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 14/20
6/1/2017
The rotational latency IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
is the additional time for the disk to rotate the desired
sector to the disk head. It is not xed, so we can take average value.
Disk bandwidth is the total number of bytes transferred, divided by the total time
between the rst for service and the completion of last transfer.
FCFS Scheduling: This is also known as First In First Out (FIFO) simply queues
processes in the order that they arrive in the ready queue.
The following features which FIFO scheduling have.
Shortest Seek Time First (SSTF) Scheduling: It selects the request with the
minimum seek time from the current head position. SSTF scheduling is a form of
SJF scheduling may cause starvation of some requests. It is not an optimal
algorithm but its improvement over FCFS
SCAN Scheduling: In the SCAN algorithm, the disk arm starts at one end of the disk
and moves toward the other end, servicing requests as it reaches each cylinder
until it gets to the other end of the disk. At the other end, the direction of head
movement is reversed and servicing continues. The head continuously scans back
and forth across the disk. The SCAN algorithm is sometimes called the elevator
algorithm, since the disk arm behaves just like an elevator in a building, rst
servicing all the request going up and then reversing to service requests the other
way.
C-SCAN Scheduling: Circular SCAN is a variant of SCAN, which is designed to
provide a more uniform wait time. Like SCAN, C-SCAN moves the head from one
end of the disk to the other, servicing requests along the way. When the head
reaches the other end, however it immediately returns to the beginning of the disk
without servicing any requests on the return trip. The C-SCAN scheduling algorithm
essentially treats the cylinders as a circular list that wraps around from the nal
cylinder to the rst one.
Thanks.
Gradeup..
Related Posts
dharam Jan 24
Thanks
0 0
Anitha K Feb 2
Guys wat is d expected cutoff for s.o (i.t)
0 0
bharath Feb 18
Can anyone please suggest me coaching centre for SbI/ibps so in Hyderabad. I heard
this app is helping the aspirants, please help me.
0 0
Janani Feb 26
Plz provide ibps so it ocer interview capsule @Vijay Kumar
1 0
Manjunathachari Jp Mar 7
Hi
0 0
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 16/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
Write a comment
Quick Links : Current Affairs | Daily GK Update | Reasoning | SBI PO Test Series | GK Tornado | Monthly GK Updates |
Weekly One Liners | General Awareness | Banking Awareness | Quantitative Aptitude | Reasoning Practice Tests
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 17/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 18/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 19/20
6/1/2017 IBPS(SO)I.T.Officer:OperatingSystemStudyNotes
https://gradeup.co/ibpssoitofficeroperatingsystemstudynotesi306162a2c9c011e58b67a40879942078 20/20