Category: Operating System

Multiple Processor Scheduling

When multiple processors are available, then the scheduling gets more complicated, because now there is more than one CPU which must be kept busy and in effective use at all times. Load sharing revolves around balancing the load between multiple processors. Multi-processor systems may be heterogeneous, ( different kinds of CPUs ), or homogenous, ( […]

Program to implement for loop using in keyword in Linux

PROGRAM TO IMPLEMENT FOR LOOP USING “in” KEYWORD ?फॉर लूप का उपयोग किसी स्टेटमेंट को या फिर ग्रुप ऑफ़ स्टेटमेंट्स को बार बार दोहराने के लिए किया जाता है, जब तक की कंडीशन सही रहती है फॉर लूप में|यह लूप रन होने से पहले कंडीशन को टेस्ट करता है |फॉर लूप स्टेटमेंट्स को कई बार एक्सीक्यूट करता […]

Program to print string in reverse order

Q.एक ऐसा शैल program लिखिए जो कि एक string को reverse order मे print करे।Ans.read -p “Enter string:” stringlen=${#string}for (( i=$len-1; i>=0; i– ))do# “${string:$i:1}”extract single single character from string.reverse=”$reverse${string:$i:1}”doneecho “$reverse”

RGPV Diploma Linnux Unit 2

RGPV Diploma: Linux: Unit 2 Q 1. शैल कमांड को विकल्प तथा उचित उदाहरण के साथ समझाइए ? OR सिंपल कमांड को समझाइए? Ans. सिंपल कमांड मुख्यता निम्नलिखित है:- (i)  date कमांड – इस कमांड द्वारा करंट टाइम को कंप्यूटर स्क्रीन पर देख सकते हैं| यह टाइम कंप्यूटर की घडी पर आधारित होता है | Date […]

Diploma Linux Unit 3

RGPV Diploma: Linux: Unit 3   Q1. Vi एडिटर को समझाइए | OR Vi एडिटर पर संक्षिप्त टिप्पणी लिखिए | OR एडिटर क्या है ? किसी एक को विस्तार से समझाइए | OR एडिटर क्या है ? vi एडिटर को विस्तार पूर्वक समझाइए | OR vi एडिटर के कोई पांच कमांड लिखिए | Ans. Vi […]

Bankers algorithm problems

Prob. Consider the following snapshot of a system- Answer the following questions using the Banker’s algorithm-(i) What is the content of the matrix need? (ii) Is the system in a safe state? (iii) If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately? Ans. Banker’s algorithm: Need Calculation Steps to calculate […]

SRTF shortest remaining time first

Prob. Suppose that the given ahead processes arrive for execution at time indicated- Process Arrival Time Burst Time P1 0.0 8 P2 0.4 4 P3 1.0 1 Calculate average turnaround time, average waiting time and throughput- (i) FCFS  (ii) SRTF  (iii) Non-Preemptive SJF Ans. SRTF: Shortest remaining time first,

Optimal page replacement algorithm

Prob. How many page faults will occur with a reference string 0,1,7,2,3,2,7,1,0,3?There are four frames which are initially empty.Use OPTIMAL Page replacement algorithm Sol. OPTIMAL Page replacement algorithm: 0 1 7 2 3 2 7 1 0 3 Above table is an example of page frame, which is empty initially. And first page is 0.So […]

LRU page replacement algorithms

Prob. How many page faults will occur with a reference string 0,1,7,2,3,2,7,1,0,3?There are four frames which are initially empty.Use LRU Page replacement algorithm Sol. LRU Page replacement algorithm:LRU stands for least recently used.It replaces the page that has been referenced for longest time.In FIFO Page replacement algorithm problem is, it may replace heavily used pages. […]

FIFO page replacement algorithm

Prob. How many page faults will occur with a reference string 0,1,7,2,3,2,7,1,0,3? There are four frames which are initially empty. Use 1. FIFO Page replacement algorithm Sol. FIFO Page replacement algorithm: FIFO stands for First in first out. In FIFO Page replacement algorithm problem is, it may replace heavily used pages. 0 1 7 2 […]

Operating System Scheduler

There are three types of scheduler in Operating system. 1. Long term scheduler (LTS) LTS or Job scheduler, LTS is responsible for creating new processes and bringing them into the system. LTS is responsible to switch the processes to the ready state from new state, that is the reason LTS also known as job scheduler. 2. […]

Process State Diagram

A process passes from number of states during its life, states are as follows-1) New state2) Ready state3) Running state4) Wait state5) Termination state6) Suspend ready state7) Suspend wait state Description of all the states are as follows- New State:First state is known as new state. New state is the state when the process is under creation. […]

How many page faults

Prob. How many page faults will occur with a reference string 0,1,7,2,3,2,7,1,0,3?There are four frames which are initially empty.Use OPTIMAL Page replacement algorithm Sol. OPTIMAL Page replacement algorithm: 0 1 7 2 3 2 7 1 0 3 Above table is an example of page frame, which is empty initially. And first page is 0.So […]

File Systems

A filesystem is the methods and data structures that an operating system uses to keep track of files on a disk or partition, that is, the way the files are organized on the disk. A file is an entry in a directory. The file may have attributes like name, creator, date, type, permissions etc. File Structure:A […]

System Calls in OS

A system call is a mechanism that provides the interface between a process and the operating system. system calls allow the user programs to ask OS to do some stuff on behalf of the user program. For example, read and write of file which requires the I/O from/to the storage device. There are 5 different […]

Operating sytems services

1. Program execution: The operating system Loads program into memory It Handles the program’s execution It Provides a mechanism for process synchronization It Provides a mechanism for process communication 2. I/O operations: OS manages the communication between the user and devices drivers. I/O operations are the read or write operations which are done with the […]

Characteristics and features of an OS

Memory Management: It keeps tracks of primary memory i.e what part of it are in use by whom, what part are not in use etc. Allocates the memory when the process or program request it. Processor Management: Allocate the processor(CPU) to a process. Deallocate processor when processor is no longer required. Device Management Keep tracks […]

Different Types of OS

Some of the most widely used types of Operating system. Simple Batch System Multiprogramming Batch System Multiprocessor System Distributed Operating System Clustered System Realtime Operating System Handheld System 1. Simple Batch System: In this type of system, there is no direct interaction between user and the computer. The user has to submit a job written […]

Introduction to Operating Systems

An operating system is a software which acts as an interface between computer user and the computer hardware.  It gives a person-pleasant surroundings in which a usermay also moreover results easily increase and execute programs. otherwise, hardware knowledge might be elssetial for pc programming. So, it is able to be said that an OS hides […]

Why is operating system a mandatory software?

Why is operating system a mandatory software? There are different hardwares. Many more hardwares are about to come. Its not possible for each hardware to support each type of software. But the possible things is there should be an universal software which should be adopted by each and every hardware. And that universally adopted software […]

Memory management

Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution. The essential requirement of memory management is to provide ways to dynamically allocate portions of memory to programs at their request, and free it for reuse when […]

Concept of Threads

A thread is a single sequential flow of control within a program. A thread is the smallest unit of processing that can be performed in an OS. A thread exists within a process. A single process may contain multiple threads. Types of threads User threads Kernel threads Working of threads Each thread in the process […]

Process concept

Program which is under execution is known as process. Two conditions for process It has to reside in the main memory It should occupy the CPU, means should be using or used by any resource of CPU. Attributes of process: Process ID Process State Program Counter Priority General purpose register List of open files List […]

Directory Structure OS

A directory or storage device can be used in its entirety for a file system. It can also be subdivided. For example, A disk can be partitioned into quarters, and each quarter can hold a file system.  Storage devices can also be collected together into RAID sets that provide protection from the failure of a […]

Contiguous disk space allocation method

In contiguous disk space allocation method, files are assigned to contiguous areas of secondary storage. A user specifies in advance the size of the area needed to hold a file to be created. If the desired amount of contiguous space is not available, the file cannot be created. Two most common strategies are First fit […]

File systems

File Systems:  A filesystem is the methods and data structures that an operating system uses to keep track of files on a disk or partition, that is, the way the files are organized on the disk.  A file is an entry in a directory. The file may have attributes like name, creator, date, type, permissions […]

Types of os

Different Types of OS:  Some of the most widely used types of Operating system. Simple Batch System Multiprogramming Batch System Multiprocessor System Distributed Operating System Clustered System Realtime Operating System Handheld System 1. Simple Batch System:  In this type of system, there is no direct interaction between user and the computer. The user has to […]

Evolution of os

Evolution of OS is divided in 5 phases: Phase 0: (1940-1955):  Computers are exotic experimental equipment.  Program in machine language.  Use plug boards to direct computer.  No overlap between computation, I/O, think time, and response time.  Programs manually loaded via card decks. Phase 1: (1955-1970): User at console: one user at a time  OS becomes […]

Functions of os

Functions of OS 1. Booting Booting is a process of starting the computer operating system starts the computer to work. It checks the computer and makes it ready to work. 2. Memory Management It is also an important function of operating system. The memory cannot be managed without operating system. Different programs and data execute […]

Operating System: A List of Video Lectures RGPV Notes

OPERATING SYSTEMA list of video lectures Critical Section Deadlock conditions Process Scheduler Shortest Job First CPU Scheduling Shortest Job First Non Preemptive Preemptive SJF CPU Scheduling Non-Preemptive SJF CPU Scheduling SJF Preemptive Revision Shortest Remaining Time First CPU Scheduling Round Robin CPU Scheduling Round Robin Revision FCFS Disk Scheduling Shortest Remaining Time First GATE Scan […]

Net 50

CBSE NET JUNE 2015 Paper II Q. A disk drive has 100 cylinders,numbered 0 to 99. Disk request come to the disk driver for cylinders 12,26,24,4,42,8,50 in that order. The driver is currently serving a request at cylinder 24. A seek takes 6msec per cylinder moved. How much seek time is needed for the shortest […]

Net 49

CBSE NET Q. A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103. if the four frames are initially empty. A) 6               B) 7                       C) 5                     D) 8. Ans: (B) Explanation: LRU (Least recently used) algorithm. Here, F shows page faults […]