You are on page 1of 13

VRO COMMUNITY NOTES

Operating System Notes (Sessional 1)

List any 4 services provided by operating


system.
Program Execution. Several tasks must be completed in order to run a
programme.

Control Input/Output Devices.

Program Creation.

Error Detection and Response.

Accounting.

Security and Protection.

File Management. ...

Communication.

What is process management? State 2 functions


to be performed by OS for Process Management.

VRO COMMUNITY NOTES 1


Process management involves various tasks like creation, scheduling,
termination of processes, and a dead lock. Process is a program that is under
execution, which is an important part of modern-day operating systems. The
OS must allocate resources that enable processes to share and exchange
information. It also protects the resources of each process from other
methods and allows synchronization among processes.

Function
It is the job of OS to manage all the running processes of the system. It
handles operations by performing tasks like process scheduling and such as
resource allocation.

Creation: once a process is created, it’s ready to be landed in the ready


queue i.e loaded onto the main memory, thus, be ready for its execution.

Scheduling: OS chooses a process from those present in the ready


queue and starts its execution, this whole process is called scheduling.

Execution: once the process has been scheduled by the OS, the


processor starts executing it. If during the execution, the process enters a
waiting or blocked state, then it means that the processor is executing
other processes.

What is real time system? Explain its types.


Real-time operating system (RTOS)
 is an operating system intended to serve real time application that process
data as it comes in, mostly without buffer delay. The full form of RTOS is Real
time operating system.

TYPES
Hard Real Time :

In Hard RTOS, the deadline is handled very strictly which means that given
task must start executing on specified scheduled time, and must be
completed within the assigned time duration.

Example: Medical critical care system, Aircraft systems, etc.

Firm Real time:

VRO COMMUNITY NOTES 2


These type of RTOS also need to follow the deadlines. However, missing a
deadline may not have big impact but could cause undesired affects, like a
huge reduction in quality of a product.

Example: Various types of Multimedia applications.

Soft Real Time:


Soft Real time RTOS, accepts some delays by the Operating system. In this
type of RTOS, there is a deadline assigned for a specific job, but a delay for a
small amount of time is acceptable. So, deadlines are handled softly by this
type of RTOS.

Example: Online Transaction system and Livestock price quotation System.

Difference Between Multiprogramming and


Multitasking.

Difference Between GUI and CUI.

VRO COMMUNITY NOTES 3


Explain Batch Processing system.
Batch Processing System : An Batch processing system handles large
amounts of data which processed on a routine schedule. Processing occurs
after the economic event occurs and is recorded. It requires fewer
programming, hardware, and training resources. In this system programs are
scheduled through jobs. It allows sharing of programs and files.

Examples includes Inventory query, website shopping transaction, e-Banking


account withdrawal etc.
Advantages of Batch Processing System :

Manages large repeated work easily.

Repeated jobs are done fast

Batch systems can work offline

Disadvantages of Batch Processing System :

Difficult to debug batch systems

Sometimes costly

Waits for unknown time if error occurs with any job

VRO COMMUNITY NOTES 4


List Types of system call and explain system
call.

List and explain components of operating


system.

VRO COMMUNITY NOTES 5


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.

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.

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.

Secondary-Storage Management
The most important task of a computer system is to execute programs. These
programs, along with the data, helps you to access, which is in the main
memory during execution.

Secondary-Storage Management
The most important task of a computer system is to execute programs. These
programs, along with the data, helps you to access, which is in the main
memory during execution.

Explain the concept of context switching.

VRO COMMUNITY NOTES 6


Context Switching involves storing the context or state of a process so that it
can be reloaded when required and execution can be resumed from the same
point as earlier. This is a feature of a multitasking operating system and
allows a single CPU to be shared by multiple processes.

1. Interrupts

2. Multitasking

3. Kernel/User switch

List and explain any 4 services provided by an


operting system.
Program Execution
Several tasks must be completed in order to run a programme. Both the data
and instructions must be loaded into the main memory. Furthermore, files and
input-output devices should be initialized, as well as other resources that have
to be prepared. These types of jobs are handled by the operating structures.
The user no longer has to be concerned about memory allocation,
multitasking, or anything else.

Control Input/Output Devices


Because there are many different types of I/O devices in a computer system,
each one has its own set of precise instructions for operation. By offering a
unified interface, the operating system hides such information. As a result, it is
simple for a programmer to access such devices.

VRO COMMUNITY NOTES 7


Program Creation
The operating system provides structures and tools, like editors and
debuggers, to aid programmers in the creation, modification, and debugging
of programs.

Security and Protection


The operating device secures a person’s statistics and packages from
unauthorised users and prevents them from being tampered with. The
security feature guards against threats that are broadcast by people who are
not in control of the running device.

Difference between Long term, Short term and


medium term scheduler.

With the neat diagram describe use of process


control block.
The process control block represents a process in the
operating system. A process control block is also known as
a task control block. It’s a repository of information
associated with a specific process.

VRO COMMUNITY NOTES 8


Use of Process Control Block(PCB)
It's the job of the operating system to assign a CPU to a process as the
process doesn't need a CPU all the time. Let's take an example of the
input/output process, they are only used by the CPU when triggered.

The role of the process control block arises as an identification card for each


process. The Operating System doesn't know which process is which, until
Operating System refers through the PCB of every process.
For Example:, there are MS word processes, pdf processes, printing
processes, and many background processes are running currently on the
CPU. How will OS identify and manage each process without knowing the
identity of each process?
So, here PCB comes into play as a data structure to store information about
each process.

Therefore, whenever a user triggers a process (like print command),


a process control block (PCB) is created for that process in the operating
system which is used by the operating system to execute and manage the
processes when the operating system is free.

Define Process. Explain process state in detail


with the help of state diagram.

VRO COMMUNITY NOTES 9


A process is defined as a sequence of instructions are
executed in a predefined order.
 In simple words, any program that is executed is termed as
a process.

New State
This is the first state of the process life cycle. When process creation is taking
place, the process is in a new state.

Ready State
When the process creation gets completed, the process comes into a ready
state. During this state, the process is loaded into the main memory and will
be placed in the queue of processes which are waiting for the CPU
allocation.
When the process is in the creation process is in a new state and when the
process gets created process is in the ready state.

Running State
Whenever the CPU is allocated to the process from the ready queue, the
process state changes to Running.

Block or Wait State


When the process is executing the instructions, the process might require
carrying out a few tasks which might not require CPU. If the process requires
performing Input-Output task or the process needs some resources which are

VRO COMMUNITY NOTES 10


already acquired by other processes, during such conditions process is
brought back into the main memory, and the state is changed to Blocking or
Wait for the state. Process is placed in the queue of processes that are in
waiting or block state in the main memory.

Terminated or Completed
When the entire set of instructions is executed and the process is completed.
The process is changed to terminated or completed state.During this state
the PCB of the process is also deleted.

Explain different types of multithreading models.


There are 3 Multithreading models

1. One to one

2. Many to one

3. Many to many

One to one
The one to one model maps each of the user threads to a kernel thread. This
means that many threads can run in parallel on multiprocessors and other
threads can run when one thread makes a blocking system call.

Many to one
The many to one model maps many of the user threads to a single kernel
thread. This model is quite efficient as the user space manages the thread
management.

VRO COMMUNITY NOTES 11


Many to Many
The many to many model maps many of the user threads to a equal number
or lesser kernel threads. The number of kernel threads depends on the
application or machine.

Explain different types of scheduling queues.

The OS maintains all Process Control Blocks (PCBs) in Process Scheduling


Queues. The OS maintains a separate queue for each of the process states
and PCBs of all processes in the same execution state are placed in the
same queue. When the state of a process is changed, its PCB is unlinked
from its current queue and moved to its new state queue.

The Operating System maintains the following important process scheduling


queues −

Job queue − This queue keeps all the processes in the system.

VRO COMMUNITY NOTES 12


Ready queue − This queue keeps a set of all processes residing in main
memory, ready and waiting to execute. A new process is always put in
this queue.

Device queues − The processes which are blocked due to unavailability


of an I/O device constitute this queue.

Differentiate between process and thread.

VRO COMMUNITY NOTES 13

You might also like