OS
OS
OPERATING SYSTEM
Q. MCQ :-
3) Time require to move R/W head to particular track is called Seek Time.
7) In a Memory Management,Where the part of process image is in main memory and other
part is on disk, is known as Virtual Memory Management.
8) Turning attention of CPU from one process to another is called Context Switching.
9) If the Page Size for 2MB main memory is 2KB.Then, the number of higher order bits of
address bus used to denote page number is 10.
Ans :-
1. Diagram
2. An Operating System is a program which acts as an interface between user of a
computer and the computer hardware.
3. The purpose of an Operating system is to provide an environment in which user can
execute their program.
4. Thus, Primary goal of an Operating System is to make the system convenient to use.
5. A Secondary Goal is to use the computer Hardware in an efficient manner.
6. An Operating System is roughly divided into four parts :
Hardware
Operating System
Application Program
User of a Computer
7. Computer Hardware is at innermost level and User is at Outermost level.User can
interact with Compute hardware through Application Program and Operating
System.
8. Operating System works as a resource allocator.
9. An Operating System can be viewed as a control program.It controls the execution of
user program and prevent it from errors and improper use of computer.
10. Operating System makes a provision of security and confidentiality of information.It
keeps the track of all files and all sectors allocated to them.It also keeps the track of
free sector for new file.
11. Operating System eliminates the duplicate effort in development of routine.
Different OS :-
1. Microsoft Windows
2. UNIX
3. LINUX
4. Android
Ans :-
i) Information Management ( IM )
ii) Process Management (PM )
iii) Memory Management ( MM )
i) Information Management :-
Information management refers to a set of services used for
storing,retrieving,modifying or removing the information. These information in
the terms of Files and Directories.
Some System Calls related to IM :-
i) Create a File
ii) Create a Directory
iii) Open a File
iv) Close a File
v) Read Data from File to Buffer
vi) Write data from Buffer to File
vii) Move the File Pointer
viii) Read and return File Status
ix) Create a link
x) Change the Working Directory.
ii) Process Management ( PM ) :-
In multi-user Operating System, number of process running at a time.But,A
Computer has only one CPU and it execute only one process ( Program )
at a time. In such a case, The Operating system keeps the track of all
process,it schedule all the processes and execute it one after the other. But
while doing so,it gives an impression to the user that he has full control of
the CPU.
Some System Calls related to PM :-
i) Create a Child process identical to parent.
ii) Wait for a process to terminate.
iii) Change the priority of process
iv) Block a process
v) Ready a process
vi) Dispatch a process
vii) Terminate a process
viii) Suspend a process
ix) Resume a process
x) Delay a process
iii) Memory Management ( MM ):-
Memory Management service of Operating System keeps the track of memory
allocated to different process. It also keeps the tracks of all free memory space
and create free list.Before a new program is load into memory,The MM Consult
this free list,and allocate the memory to process and updates free list.
Some System calls related to MM :
i) Allocate achunk of memory to process.
ii) Free Chunk of memory from process.
Ans :-
1. Easy to Use :
Windows 98 is a single user multitasking Operating system.Navigating around
a computer is easier in Windows 98.You can open a file in Single Click.You
can use Multiple monitor with Single CPU.Installation of new hardware is easy
as it use USB system which allow you to plug in new hadware and use it
without restarting the computer.With Windows 98 you can use Web
Camera,Printer and scanner.
2. Faster :
By Using the Maintainance wizard,the computer speed and efficiency can be
improved.Windows 98 uses FAT32 file system to store files more efficiently .
3. More Entertaining :
Windows 98 supports DVD and Digital audio. You can play high quality
movies,Video and audio on computer.You can play Games and also view
television broadcast on computer.
4. True Web Integration :
Ans :-
Ans :-
Ans :-
File System is a method of storing and organizing files and data in proper manner so
that it can be access very easily later.
Ans :-
Ans :-
Creating a File :-
To Create a File ,Operating System first find the sufficient space for the file in
file system.If it is available then space allocated to that file and new entry made in
directory.The Directory made entry of name of file and location of file.
Writing a File :-
To Write a file,a system call is made for specifying both name of file and
information to be written to the file.Operating system search for the given file name
in
Directory.set the pointer to the current end of file and information write in file.The
write pointer must be updated.
Reading a File :-
To Read a data from file,System call is made for specify the name of file
and where the next block of file should be put in memory.File is searched and
read the data.
Rewind a File :-
The directory is searched for the particular file name and reset the
current file position pointer to the beginning of file.
Delete a File :-
To delete a file.The directory is searched for file name.Having found the
directory entry for the file,release all the space for that file and invalidate the entry.
Q.) Explain user is not allowed to directly interact with the hard disk.
Ans :-
Files are arranged on disk on tracks and sectors of the disk and entry for the each allocated
files is kept in First Track (i.e. Track 0 and Sector 0 )
FAT File system contains the address of track for each file.When user program writes
on disk,The file is automatically managed by Operating System.The user programs are not
allowed directly to write to the sector of disk as writing directly will not append the FAT
System,will result in corruption of file system.
Sometimes track belonging to any file may be overwritten.So user is not allowed to
write directly on disk.
i) Dumb Terminal
ii) Intelligent Terminal
i) Dumb Terminal :
Ans :-
A Single user can not keep either CPU or I/O devices busy at all
time.Multirogramming is an attempt to increase CPU utilization .
The number of process running simultaneously sompeting for CPU is called Degree of
Multiprogramming.
Diagram
Context Switching :-
Turning attention of CPU from one process to another process is called Context
Switching.While Context switching,the memory content of old process are store
somewhere,otherwise restarting this process would be impossible.CPU register and
pointers to memory are stored in specific memory area called as Register Save Area and
then CPU executing another process.
After Sometime, the old process is scheduled again and CPU executes it from where
it had left. Time lost in Context switching should be very low.
Ans :-
Process is a Program under execution which competes for CPU time and other resources.
i) Ready
ii) Running
iii) Blocked
Ready :-A process which is not waiting for any external events such as an I/O Operation and
Running :- CPU Can execute only one process at a time. This Process is termed as Running
Process.
Blocked :- When a process is waiting for an External event such as I/O Operation.The
process is said to be in Blocked State.
i) Turnaround time :-
Turnaround time is elapsed time between the time when job or program is
submitted and when it is completed. It should be minimum in process scheduling.
ii. Waiting Time :-It is the time a job spends waiting in a queue to allocate a
resources to it before commencing its execution. The waiting is necessary due to
competition rom other processes.
i) External Priority
ii) Internal Priority
iii) Purchased Priority
i) External Priority :
The External priority is specified by user externally at the time of initiating a
process.Even during execution it can be changed.If user does not specify
priority,then default priority of process is assigned.
ii) Internal Priority :-
The Internal priority is based on calculation of current state of process.Each
user when firing a process , can be forced to specify the expected time of
execution. Then Operating System set the priority of Process which is highest
for shortest job. Internal Priority is always set by Operating System based on
some algorithm.
iii) Purchased Priority :-
In Purchased Priority , each user pays for time used,normally higher priority
process are charged at higher rate to prevent each user from firing his job at
highest priority known as purchase priority.
Ans :- Non-Preemptive :-
A process retain the control of CPU and all allocated resources until it surrenders
control to OS on its own. Even if higher priority process enters the system,running process
can’t give the control to other process.It is not suited for Real-time system.
Preemptive :
Ans :-
Time Sharing :
Ans :-
Ans :-
Diagram
The memory map of Single User Computer consists of Kernel , Command Interpreter ,
Process and free memory.
Ans :-
Partitioning means dividing a main memory into various sections. These sections are
called partitions.Operating System uses Partitioned memory management method to
allow multiprogramming.
i) Fixed Partition
ii) Variable Partition
i) Fixed Partition :-
In Fixed Partition, Partitions could be of different sizes . Once decided the size of
partition at the run time it can not be changed.These Partition can be allocated to
the process by Operating System.
For Example, a memory of 32K divided into 4 regions.
Diagram
As job enters the system, they are put in job queue. The job scheduler take into
account the memory requirement for each job and allocated suitable partition to
each job.When job is allocated space,then it competes for CPU time.When a job
terminates,it releases memory and it is available to another job in job queue.
The Fixed partition suffers from the problem of Internal Fragmentation ( i.e,
Wastange of memory space within partition ). It also limits the degree of
multiprogramming and CPU Utilization.
ii) Variable Partition :-
In Variable Partitions, The Number and size of Partition are variable.They are not
defined at the time of System generation.Variable Partition Overcomes the
problem of Fixed Partition.
At any given time,any partition can be free or allocated to some process. Variable
Partition, The Starting address of Partitions are not fixed.Variable partition suffers
from external fragmentation.
Q.) What is Paging ? Explain using example and diagram of page table of logical
Ans :-
Paging is a Non-Contiguous memory management technique in which Process (
Logical Memory ) is divided into block of the same size called Pages .Similarly, Main
Memory ( Physical Memory ) is also divided into equal sized blocks called Frame. The Size
of the Frame is similar to Page Size so as Page is exactly loaded into Frame and avoid
external fragmentation.Page address is called Logical address and Frame address is called
Physical address.A Data structure called Page Map Table ( PMT ) is used to Keep the track of
the relation between page of process with frame.
The Page size is defined by Hardware. It is typically power of 2. When the program is
executed. Pages of the process is loaded into any available frame.
Diagram
Every address is generated by CPU is divided into two parts : Page Number ( P ) and Offset (
d)
ACCBAABADD
Q.2 )CERVICAL CANCER
ELECTROSTATIC PRECIPITATOR
A MULE
TOBACCO PLANT
Thyroid disorder
Stationary phase
Motlling
Monoc of Plant Maiz
ACCBAABADD
Q.2 )CERVICAL CANCER
ELECTROSTATIC PRECIPITATOR
A MULE
TOBACCO PLANT
Thyroid disorder
Stationary phase
Motlling
Monoc of Plant Maiz
Diagram
Q. ) Difference between Paging and Segmentation :
Paging Segmentation
1.Pages are Physical in nature. 1. Segments are logical division of program.
2. Pages are of Equal and fixed Sizes. 2. Segments are of variable Size.
3. Page Map Table translate from user pages 3. The Segment table has a separate entry for
to memory frame. each segment in physical memory and length
of that segment.
4.In Paging,logical memory is divided into 4.In Segmetation,Main Memory is divided
Physical memory into segments.
Ans :-
Virtual Memory is a technique which allows the execution of process which is more than the
amount of memory installed on the System.In this technique, Process may not be completely
in main memory.Some part of it can be in Disk.
Locality of reference :
Page Fault :
In Many system, When a process is executing with only some pages of process and when an
instruction is encountered which refers to some other page which is outside the memory
then Page fault occurs.When Page Fault occurs , Operating system must bring that required
page into main memory.
Working Set :
At any time, a process has a number of pages in Physical memory. Not all of these actively
referred.
The set of the pages in physical memory actively referred to any moment is called Working
Set.
Page Replacement Policy :-
As the number of Pages get increases, all the page frame may get occupied.At this time, if a
new is to be bought in, the operating System has to overwrite some existing some page in
memory.The Page which is to be replace is chosen by using some Page replacement policy.
The Page which is modified after it is loaded into main memory from disk is called as Dirty
Page
The Operating System maintains one bit for each Physical page frame to denote whether a
page has become dirty or not. This bit is referred as Dirty bit.
Demand Paging :-
Ans :-
Advantages of GUI :-
With GUI , Commands are replaced by graphics and therefore it is not necessary to
remember command and its meaning.
With GUI,it is convenient to use the system.
With GUI, User can run several program simultaneously.
User can communicate and exchange data between programs without transferring or
copying files.
By moving a pointer on ICON of application and click on icon,one can open an
application directly.
GUI applications provide HELP about various features of an Application.If user get
confused at any point, a HELP is readily available to user.
Q.) Explain the following components of GUI.
i) Title Bar :Title Bar is the horizontal ine on the top of an application. It helps to identify the
each windows separately. It displays the name of program.
ii) Menu Bar :- Menu bar consists of different main menus which can be used in program.
The main menus consist of different submenus. A menu can be selected by just Clicking on
it.
iii) Scroll Bar :-Scroll Bar consists of Horizontal as well as Vertical Scroll bar with
slider box and arrow at the end of each box.This allows user to move horizontally
or vertically.
iv) Contro Box : Without using Mouse when we want to change the size of window ,
then contro box is used.Control box can be opened by Pressing ALT key with
Right arrow key.
v) Minimize Button : This Button is used to minimize the program window without
closing it. After clicking Minimize button, the program goes to bottom line and
can resized again.
vi) Maximize / Restore button : The window can be view in full screen by clicking
this square Maximize Button. Now this button is converted into restore
button.When we clickon restore button, Window get restore to its previous size.
vii) Close Button :- When we click on Close Button. Window of that application gets
closed.
viii) Dragging the Window : The Position of window can be changed by dragging it.To
drag a window, Select window by keep pressing the left button of Mouse at any
point on window and move the mouse pointer to new position on screen and now
release left button of mouse.You will find,Window is shifted to new position.
ix) Resizing the Window : Making change in size of window is called resizing the
window.To resize the window,Move the mouse pointer to any side of window and
now Mouse pointer is changed to right left shape arrow. Now press the left button
of mouse and now you can resize the window.
Ans :-
Program Manager :-
Control Panel :-
Secure system will control and access to information that only authorized individual or
process on their behalf will have access to read,write,create or delete.
Q. ) Explain in brief any three ways the secure system can be attacked or
penetrated ?
Ans :-
1. Authentication :-
It means Verification of access to system resources by Guessing or stealing
somebody else’s password and then use it or by using vendor supplied password
which can be used only by system administrator,Finding password by trial and error
method or by writing dummy login program to fool user and use that password later
on.
2. Browsing :-
In some system,there exists a files which access controls which are very permissive.
One can browse through system files.Confidential information could be read or even
modified.
3. Trap Doors :-
Sometimes software developer leave some secret entry point to modify their
program. These entry points are called Trap doors. It can be misused by others.
4. Line Tapping :-
A Special terminal is used to tap communication line and It causes access to
confidential data .
Ans :-
Ans :-
The Computer Virus is a program segment written with a clear intention of infecting
other programmer data or files.
Virus can cause direct harm to system. It can corrupt data and code.
i. Boot Sector Virus : Virus can enter into system memory if the machine is booted
with an infected floppy or hard disk.
ii. Memory resident Virus : It loads upon the execution of an infected
file.Subsequently, whenever non infected file is executed, Virus infect it.
iii. File Specific Virus : Infection occurs when an infected file is executed. The Virus
then loads its Viral code into memory .In addition to infection, Virus can reboot
the system.
iv. General Purpose Virus : General Purpose virus can infect the exe files.
Q.) What are different methods by which virus can infect the others ?
Ans :-
There are different methods by which Virus can infect other programs :
i. Append : The Viral code append itself to the unaffected program and infect it.
ii. Replace : The Viral Code replaces the original executable program completely or
partially.
iii. Insert : The Viral Code is inserted into body of executable file and carry out
some funny actions.
iv. Delete : Viral code directly deletes some code of infected files.
v. Redirect :The normal control of flow of program is changed to execute some other
code.
Q.) Explain the terms Virus Detection , Virus Removal and Virus Prevention ?
Ans :-
Modes of Operation :-
Virus Detection :-
Virus Detection programs checks for integrity of files. The Program maintains the checksum
for each file. A Mismatch in it indicates Virus.Some program reside in memory and
continuously monitor memory and I/O Operation to detect the Virus.
Virus Removal :
Virus Removal Program scans disk for pattern of known Viruses.On detection it removes
them.Data Recovery is impossible .
Virus Prevention :-
Prevention is best measure. Some safeguard measures to be taken to prevent system from
Viruses such as buy official and legal copies of software from reliable
sources.Free,Unreliable software can not be used , Frequent backup and run monitoring
program also helps prevention.