Operting System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

OPERATING SYSTEM

[2021,2019,2018,2017,2016,2015,2014]

- Bca expert
1] explain operating system components in details. [8m] [2021,2018,2017,2016]

Operating System
 Operating system is a software that communicates with the hardware and allows other programs to run
 Os that provides basic functionality for the device.

Components of Operating System

1. Process Management
2. File Management
3. Network Management
4. Main Memory Management
5. Secondary Storage Management
6. I/O Device Management
7. Security Management
8. Command Interpreter System

 Operating system components help you get the correct computing by detecting
CPU and memory hardware errors.

- Bca expert
1) Process Management
 The process management component is a procedure for
managing many processes running simultaneously on the
operating system.
 Every running software application program has one or more
processes associated with them.
 For example, when you use a search engine like Chrome,
there is a process running for that browser program.
 Process management keeps processes running efficiently. It
also uses memory allocated to them and shutting them down
when needed.
 The execution of a process must be sequential so, at least
one instruction should be executed on behalf of the process.

Functions of process management

Here are the following functions of process management


in the operating system, such as:
 Process creation and deletion.
 Suspension and resumption.
 Synchronization process
 Communication process
- Bca expert
2) File Management

 A file is a set of related information defined by its creator. It commonly represents programs (both source and
object forms) and data.
 Data files can be alphabetic, numeric, or alphanumeric.

Function of file management

 File and directory creation and deletion.


 For manipulating files and directories.
 Mapping files onto secondary storage.
 Backup files on stable storage media.

3) Network Management

 Network management is the process of administering and managing computer networks.


 It includes performance management, provisioning of networks, fault analysis, and maintaining the quality of
service.
Functions of Network management
 Distributed systems help you to various computing resources in size and function.
 They may involve minicomputers, microprocessors, and many general-purpose computer systems.
 A distributed system also offers the user access to the various resources the network shares.
It helps to access shared resources that help computation to speed up or offers data availability and
reliability. - Bca expert
4) 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.
 It should be mapped to absolute addresses
and loaded inside the memory to execute a
program.
 The selection of a memory management
method depends on several factors.

Functions of Memory management

An Operating System performs the following functions for Memory Management in the operating system:
 It helps you to keep track of primary memory.
 Determine what part of it are in use by whom, what part is not in use.
 In a multiprogramming system, the OS decides which process will get memory and how much.
 Allocates the memory when a process requests.
 It also de-allocates the memory when a process no longer requires or has been terminated.

- Bca expert
5) Secondary-Storage Management

 The most important task of a computer system is to execute programs.


 These programs help you to access the data from the main memory during execution.
 This memory of the computer is very small to store all data and programs permanently.
 The computer system offers secondary storage to back up the main memory.

Functions of Secondary storage management

Here are some major functions of secondary storage management in the operating system:
• Storage allocation
• Free space management
• Disk scheduling

- Bca expert
6) I/O Device Management

 One of the important use of an operating system that helps to hide the variations of
specific hardware devices from the user.

Functions of I/O management

The I/O management system offers the following functions, such as:
 It offers a buffer caching system
 It provides general device driver code
 It provides drivers for particular hardware devices.
 I/O helps you to know the individualities of a specific device.

- Bca expert
7) Security Management

• The various processes in an operating system need to be secured from other


activities. Therefore, various mechanisms can ensure those processes that want to
operate files, memory CPU, and other hardware resources should have proper
authorization from the operating system.
• Security refers to a mechanism for controlling the access of programs, processes, or
users to the resources defined by computer controls to be imposed, together with
some means of enforcement.

8) Command Interpreter System

• One of the most important components of an operating system is its command interpreter.
• The command interpreter is the primary interface between the user and the rest of the system.
• Many commands are given to the operating system by
control statements.
• A program that reads and interprets control statements is
automatically executed when a new job is started in a
batch system or a user logs in to a time-shared system.
This program is variously called.
 The control card interpreter,
 The command-line interpreter,
 The shell (in UNIX), and so on. - Bca expert
2] explain multiprogramming and multitasking . [8m] [2021,2018,2015]

Multiprogramming Operating System

• A multiprogramming operating system may run many programs on a single processor


computer.
• If one program must wait for an input/output transfer in a multiprogramming operating
system, the other programs are ready to use the CPU.
• As a result, various jobs may share CPU time.
• However, the execution of their jobs is not defined to be at the same time period.

Types of the Multiprogramming Operating System


There are mainly two types of multiprogramming operating systems. These are as follows:
• Multitasking Operating System
• Multiuser Operating System

Multitasking Operating System


• A multitasking operating system enables the execution of two or more programs at the
same time.
• The operating system accomplishes this by shifting each program into and out of memory
one at a time.
• When a program is switched out of memory, it is temporarily saved on disk until it is
required again. - Bca expert
Advantages and Disadvantages of Multiprogramming Operating System

Advantages

1) It provides less response time.


2) It may help to run various jobs in a single application simultaneously.
3) It helps to optimize the total job throughput of the computer.
4) Various users may use the multiprogramming system at once.
5) Short-time jobs are done quickly in comparison to long-time jobs.
6) It may help to improve turnaround time for short-time tasks.
7) It helps in improving CPU utilization and never gets idle.
8) The resources are utilized smartly

Disadvantages

1) It is highly complicated and sophisticated.


2) The CPU scheduling is required.
3) Memory management is needed in the operating system because all types of tasks are
stored in the main memory.
4) The harder task is to handle all processes and tasks.
5) If it has a large number of jobs, then long-term jobs will require a long wait.

- Bca expert
3] what is process ? Explain the different states that a process taken while execution . [8m]
[2021,2019,2017,2016,2014]

process

A process is basically a program in execution. The execution of a process must


progress in a sequential fashion.

Process States

New
Terminated

Interrupt

Ready Running

Scheduler dispatch I\O event


I\O event
completion wait
Waiting

- Bca expert
1. New
• A program which is going to be picked up by the OS into the main memory is called a
new process.
2. Ready
• Whenever a process is created, it directly enters in the ready state, in which, it waits
for the CPU to be assigned.
• The OS picks the new processes from the secondary memory and put all of them in
the main memory.
• The processes which are ready for the execution and reside in the main memory are
called ready state processes.
• There can be many processes present in the ready state.
3. Running
• One of the processes from the ready state will be chosen by the OS depending upon the
scheduling algorithm.
• Hence, if we have only one CPU in our system, the number of running processes for a
particular time will always be one.
• If we have n processors in the system then we can have n processes running simultaneously.
4. Block or wait
• From the Running state, a process can make the transition to the block or wait state
depending upon the scheduling algorithm or the intrinsic behavior of the process.
• When a process waits for a certain resource to be assigned or for the input from the
user then the OS move this process to the block or wait state and assigns the CPU to
the other processes.
- Bca expert
5. Completion or termination
• When a process finishes its execution, it comes in the termination state.
• All the context of the process (Process Control Block) will also be deleted the process
will be terminated by the Operating system.

New : The process is being created.


Running : The instruction are being executed.
Waiting : The process is waiting for some event to occur.
Ready : The process is waiting to be assigned to a processor.
Terminated : The process has finished execution.

4] explain PCB . [8m] [2021,2019,2018,2017,2016,2015,2014]

Process Control Block

 Process Control Block is a data structure that contains information of the process related to it.
 he process control block is also known as a task control block, entry of the process table, etc.
 It is very important for process management as the data structuring for processes is done in terms of the PCB.
 It also defines the current state of the operating system.
- Bca expert
Structure of the Process Control Block

Process State
This specifies the process state i.e. new, ready, running, waiting or
terminated.
Process Number
This shows the number of the particular process.
Program Counter
This contains the address of the next instruction that needs to be
executed in the process.
Registers
This specifies the registers that are used by the process. They may
include accumulators, index registers, stack pointers, general
purpose registers etc.
List of Open Files
These are the different files that are associated with the process
CPU Scheduling Information
The process priority, pointers to scheduling queues etc. is the CPU
scheduling information that is contained in the PCB. This may also
include any other scheduling parameters.

- Bca expert
Memory Management Information
The memory management information includes the page tables or the segment tables
depending on the memory system used. It also contains the value of the base registers,
limit registers etc.
I/O Status Information
This information includes the list of I/O devices used by the process, the list of files etc.
Accounting information
The time limits, account numbers, amount of CPU used, process numbers etc. are all a
part of the PCB accounting information.
Location of the Process Control Block
The process control block is kept in a memory area that is protected from the normal user
access. This is done because it contains important process information. Some of the
operating systems place the PCB at the beginning of the kernel stack for the process as it
is a safe location.

5].Define operating system . Explain services provided by operating system [8m] [2019, 2018,2017
Operating System 2016,2015,2014]

• An Operating System (OS) is an interface between a computer user and computer


hardware.
• An operating system is a software which performs all the basic tasks like file
management, memory management, process management, handling input and output,
and controlling peripheral devices such as disk drives and printers. - Bca expert
services provided by operating system
 Program execution
 Control Input/output devices
 Program creation
 Error Detection and Response
 Accounting
 Security and Protection
 File Management
 Communication
 Program execution
• To execute a program, several tasks need to be performed. Both the instructions and data must
be loaded into the main memory.
• In addition, input-output devices and files should be initialized, and other resources must be
prepared.
• The Operating structures handle these kinds of tasks.
• The user now no longer should fear the reminiscence allocation or multitasking or anything.

 Control Input/output devices


• As there are numerous types of I/O devices within the computer system, and each I/O device
calls for its own precise set of instructions for the operation.
• The Operating System hides that info with the aid of presenting a uniform interface.
• Thus, it is convenient for programmers to access such devices easily.
- Bca expert
 Program Creation
• The Operating system offers the structures and tools, including editors and debuggers,
to help the programmer create, modify, and debugging programs.

 Error Detection and Response


• An Error in a device may also cause malfunctioning of the entire device.
• These include hardware and software errors such as device failure, memory error, division
by zero, attempts to access forbidden memory locations, etc.
• To avoid error, the operating system monitors the system for detecting errors and takes
suitable action with at least impact on running applications.
 Accounting
• An Operating device collects utilization records for numerous assets and tracks the overall
performance parameters and responsive time to enhance overall performance.
• These personal records are beneficial for additional upgrades and tuning the device to
enhance overall performance.
 Security and Protection
• Operating device affords safety to the statistics and packages of a person and protects any
interference from unauthorized users.
• The safety feature counters threats, which are published via way of individuals out of doors the
manage of the running device.

- Bca expert
6].explain any two operating system structure [2019,2018]

• There are many operating systems that have a rather simple structure.
• These started as small systems and rapidly expanded much further than their scope.
• A common example of this is MS-DOS. It was designed simply for a niche amount for people.
• There was no indication that it would become so popular.
• An image to illustrate the structure of MS-DOS is as follows −

• It is better that operating systems have a modular structure, unlike MS-DOS.


• That would lead to greater control over the computer system and its various applications.
• The modular structure would also allow the programmers to hide information as required and
implement internal routines as they see fit without changing the outer specifications.
- Bca expert
Layered Structure
• One way to achieve modularity in the operating system is the layered approach.
• In this, the bottom layer is the hardware and the topmost layer is the user interface.
• An image demonstrating the layered approach is as follows −

• As seen from the image, each upper layer is built on the bottom layer.
• All the layers hide some structures, operations etc from their upper layers.
• One problem with the layered structure is that each layer needs to be carefully defined.
• This is necessary because the upper layers can only use the functionalities of the layers

- Bca expert
Thank you for watching
- Bca expert

You might also like