1. What
is operating system? Explain the function of operating system. (HSEB
2068/69/66/65)
Ans: An operating system is a set of programs that controls the entire
operations of computer such as the execution of, handling interrupts, an
application program, handling I/O operation, etc. The operating system provides
an easier and efficient interface between the user and computer hardware. It manages the resources of a computer system
and schedules its operation.
An operating system performs variety of functions as it is an interface
between user and hardware. It has the responsibility of managing various
resources of computer system. An OS usually provides all or more of the
following functions:
a. I/O management.
The OS man ages the
input-Output in a computer system. User and application programmers use device
managers of OS to deal with and input and output device. It coordinates,
controls and assigns the input and output devices to different porgrams being
executed.
b. Command
interpreter:
The command interpreter
reads the commands typed by user through computer terminal, interprets them,
and translates these commands into the form that can be easily understood by
computer hardware. It varies widely from one OS to another. Every OS must
provide command interpreter for its operation.
c. Data management
Data management allows
organizing their data into logical grouping called files. Data management keeps
data in some order such as ascending order for numerical data and in
alphabetical order for text data.
d. Process Management
It is one of the important
functions of OS. Every program running in a computer, whether it is on the
background or foreground, is a process. Generally a single program can be
executed by a CPU. But, in multitasking system time can be shared among more
than one process. The OS takes care of allocating single CPU time to different
process. The OS determines the order in which the processes are executed when
there are more than one processes to exist. Generally the processes are
executed based on first come first serve(FCFS) principle.
e. Device management
The device management
allocates a device to a process. It finds the status of a device, channels and
control units. It initiates the IO operating and finally frees the device when
the process is completed.
f. File management
The file management keeps
tracks of all information on files. The OS helps in creating folders,
sub-folders, and files, moving files organizing files within the hierarchy of
directory or folders.
g. Time sharing
Time sharing management, a
function of OS, involves the CPU to allocate to a number of processes at a
time. The time sharing manages the time of CPU. The time sharing creates the
illusion to each user such that they are sole user of the system because the
speed of the CPU compared to that of the monitor and terminal is so much faster
thereby giving each time slice for each user or process.
h. Security
Security of computer system,
data stored on it and the network security are emerging as critical issues.
Therefore, every OS is supposed to provide security to computer system, data,
user and programmers. The OS can allow and disallow the access from other
system, provide user accounts, pas sword and encryption facility to protect the
system.
i.
Deadlock prevention:
During processing, a
situation can arise in which a resources (hardware or software) shared by two
or more processes cannot continue because the resources required by a process
is held by another. This situation is known as deadlock. Os ensures that the
above condition do not hold, and thus prevents it providing suitable action and
allocation of resources.
j. Interrupt handling
An interrupt is a signals
generated from a device attached to a computer or from a program within the
computer that causes the main program that operates the computer to stop the
normal processing and figure out what to do next. Interrupts are used to demand
attention from CPU. It increases the overall efficiency of a computer system.
k. Virtual management
When there are programs
larger than main memory of the computer system, operating system uses the free
space of secondary memory which is termed as virtual memory. The whole program
is divided into number of parts called pages. Only those pages which are
required at a particular time are kept in main memory. The remaining pages are
stored in secondary memory and that page is called virtual storage.
2. Describe Operating
system based on mode of user
a. Single user
operating system
A single user operating
system allows one user to work at a time. The recourses of th system namely the
CPU time and printing facilities are
idle till the user logs off. These operating systems are used mainly for
computers having only one terminal (stand alone pcs). Ex. PC-DOS, Ms.Dos,
OS/2,etc.
b. Multi user
operating system
A multiuser operating system
allows more than one user access to the computer at a time. Access to the
computer system is normally provided via network, so that users access the
computer remote using a terminal or other computer. Ex. UNIX, BETWARE, MVS,
OS/400, LINUX, etc.
Operating system based on user interface (CUI and
GUI)
Users interact with computer
through interface provided by operating system. Operating systems provides two
types of user interface to interact with the computer system.
a. CUI or CLI
CUI stands for character
user interface or command line interface. This is the textual interface in
which the user gives instructions to the computer by typing commands. The user
have to learn a large set of commands to run the application or to perform the
task. The output is also displayed in character or text form. The user cannot
view any graphics, pointing like mouse and icons facilities are not available.
It is very difficult to under stand and write long command. The Examples: Dos,
unix,etc.
b. GUI
It stands for graphical user
interface. It provides the facility to represents programs, files and options
with graphical images such as icons, menus, dialog box on the screen. A small
image displayed on the screen to represent an object that can be manipulated by
the user is called icon. Since the GUI supplies icons representing certain
tasks, folder, files and executable files, the user determine the type of
files, or command by observing at a glace rater than type the command.
GUI is more effective
elegant for the users. All windows based operating system are GUI.
3. Differentiate between GUI and CUI (CLI)
GUI
|
CUI
|
Symbols,
pictures and pointing commands are use to execute commands.
|
Set of
characters and words are used to execute the commands.
|
No need to
remember the command. A small practice enables you to use the commands.
|
The syntax and
various options are required to be remembered.
|
General menu structure and commands are used for
all the applications.
|
Different
application have their own set of commands.
|
Number of
applications can be opened and executed in different window at the same time.
|
Only one
application can run at a time
|
Minimum use of
keyboard.
|
Maximum use of
keyboard.
|
|
Mouse used only
in some application.
|
Easy to operate
|
Not user
friendly hence difficult to operate.
|
4. What
is an operating system? Explain its types on the basis of processing.
“An operating System (OS)
is an intermediary between users and computer hardware. It provides users an
environment in which a user can execute programs conveniently and efficiently.”
Operating system can be classified
under how it handles these processes category are described below:
1.Batched operating systems
“The operating system is termed as “batch operating” because the
input data (job) are collected into batches or sets of records with similar
needs and each batch is processed as a unit (group). The output is another
batch that can be reused for computation.”
2.Multi-programmed operating systems
“The multiprogramming is interleaved execution of multiple jobs
by the same computer. Multiprogramming does mean that there are a number of
jobs available to the CPU. To overcome the problem of utilization of CPU and
main memory, the multiprogramming was introduced.”
3.Timesharing operating systems
“CPU's (Processor's) time which is shared among multiple users
simultaneously is called as time-sharing. Time sharing or multitasking is a
logical extension of multiprogramming. In Time-sharing many users located at
various places(terminal), can use a particular computer system at the same
time. The CPU executes multiple jobs by switching among them, the switches
occur so frequently that the users can interact with each program while it is running.”
4.Network Operating System
“A network operating system, or NOS, is system software that is
designed primarily to controls the various devices like printers, disk drives
on a computer network and how they communicate with each other.”
5.Distributed operating systems
“Distributed Operating System is a system where distributed
applications are running on multiple computers linked by communication lines,
such as high speed buses or telephone lines. Distributed systems use multiple
central processors to serve multiple real time application and multiple users.”
6.Real-time operating systems
“Real time system is defines as a data processing system in
which each task has a deadline to complete. Real Time Operating System (RTOS)
adheres to this deadline as missing a deadline can cause affects ranging from
undesired to catastrophic. A real-time system has well-defined, fixed time
constraints.”
7.Multi-processor
“Multiprocessor systems also known as parallel systems or
tightly coupled systems have more than one processor in close communication,
sharing the computer bus, the clock, and sometimes memory and peripheral
devices.”
8. Define
Buffer and Spool.
Buffer
It is a temporary memory located in different hardware devices
mainly I/O devices. This memory is used to store data during I/O process. The
process of using buffer for computer operation is known as buffering.
SPOOL
(Simultaneous Peripheral Operation On-line)
It is a free space of secondary memory managed by OS for the
communication with peripheral devices like printer. It is required because of
the difference in the operating speed of the CPU and peripheral devices.
Peripheral devices are slow in their operation. The process of using SPOOL is
known as spooling.
9. What is interrupt? Explain
in short.
Interrupt
It is the events that makes the processor stop executing its
program to perform some requested activity. There are two types of interrupts
they are:
i) Hardware Interrupt: Interrupts generated by hardware devices
such as keyboard, mouse, printer or chips on the system board is called
hardware interrupt. Some examples of hardware interrupt are video card wants
memory access, USB scanner has data, mouse moves, key pressed on keyboard, etc.
ii) Software interrupt: Interrupts signals generated or caused
by the programs or software are called software interrupts. Some examples:
interrupt generated by the ROM BIOS during the start up for the computer, virus
threat notification by the antivirus software, etc.
10. The “WIMP” environment is much more user
friendly, why?
Ans: The WIMP stands for windows,
icons, mouse and pull-down menus. Wimp environment is much more user friendly because
it is almost like graphical user interface in which the end user helpful, easy
to learn and easy to use.
A window is an area on the screen
through which a particular piece of software or a data file may be viewed. The window
may occupy the whole screen or the user can choose to have several windows on
the screen with a different application running in each one. Windows can be moved,
sized, stacked one on top of the other, opened and closed. A windows
environment mimics a desktop on which a worker may have several books or pieces
of papers spread out for reference.
An icon is picture representing an
item such as piece of software, a file, storage medium or command. By pointing
with a mouse at particular icon and clicking the mouse button the user can
select it.
Microsoft windows enable the user
to run several different software packages such as ms.word, ms.excel, MS. Powerpoint simultaneously and to
move data and graphics from one package to another.
11. What is booting?
Explain different types of booting.
Ans: Booting is the process of
transferring the system files IO.SYS, MSDOS.SYS and COMMAND.COM into main
memory from bootable disk like hard disk, CD, DVD, Pen drive, etc.
There are two types of booting
which are explain below:
a. Cold boot :
Cold booting is performed by the switching on the computer. During the cold
booting os reads the RAM space and loads the system files in the RAM from the
disk. This booting includes the POST operation as well.
b. Warm
Booting : When computer is in power on state and if we restart the computer by
pressing CTRL + ALT + DEL keys combination is called warm booting. This process
clears the program loaded into RAM and reloads the system files into the RAM.
During the warm booting POST operation is not performed.
12. What is command? Explain different types of command.
Ans: Any instruction given to the computer through a suitable input
device to perform a specific task is known as command. Following are the two
types of commands:
a. Internal
command
Internal commands
are the part of command.com file. Internal commands are loaded to the memory
during the time of booting. Internal commands are executes from DOS prompt.
Internal commands are commonly used build in commands of MS DOS. Examples: CLS,
VOL, DATE/TIME, COPY CON, REN, DEL, MD, CD, RD, ETC.
b. External
command
These are
also called disk resident commands. These commands are meant for special
purpose. These are found in separate files on hard disk or floppy disk, so that
they don’t typically consume valuable memory space. They are loaded into memory
only when called. Examples: FORMAT, CHKDSK, ATTRIB, DELTREE, LABEL, XCOPY, etc.
Some Internal and External commands, their syntax and uses are:
Command: DIR (directory)
Syntax:
DIR [drive:] [path] [/p] [/w] [/O: Order] [/A: Attributes] [/s]
Use:
This command is used to display a list of files, directories and
sub-directories.
Here,
p
|
Page
by page
|
w
|
Column
wise
|
O
|
Order
|
A
|
Attributes
|
s
|
Sub-directories
|
Command: COPY
Syntax:
COPY [drive:] [path] [drive:] [path]
Use:
This command is used to make duplicate files from one location to another.
Command: DATE
Syntax:
DATE
Use:
This command is used to display and change the date of a computer.
Command: TIME
Syntax:
TIME
Use:
This command is used to change and display the current time of the computer.
Command: CLS
Syntax:
CLS
Use:
This command is used to clear up the screen.
Command: TYPE
Syntax:
TYPE [drive:] [path]
Use:
This command is used to look at a text file’s content which was already made.
Command: DEL (delete)
Syntax:
DEL [drive:] [path]
Use:
This command is used to delete files.
Command : REN (rename)
Syntax:
REN
Use:
This command is used to rename files.
Command: VOL (volume)
Syntax:
VOL [drive:]
Use:
This command is used to display volume level of the disk drive.
Command: MD (make directory)
Syntax:
MD
Use:
This command is used to create a new directory for use.
Command: CD (change
directory)
Syntax:
CD
Use:
This command is used to change or get into the directory.
Command: RD (remove
directory)
Syntax:
RD
Use:
This command is used to remove a directory which must be empty.
Command: TREE
Syntax:
TREE [drive:] [path]
Use:
This command is used to display all the files, sub-directories, and directories
in a tree structure.
Command: EXIT
Syntax:
EXIT
Use:
This command is used to exit or close the DOS or to return to a windows
application.
Command: PROMPT
Syntax:
PROMPT [text or definition]
Use:
This command is used to change MS-DOS prompt style.
Here,
Text Option
|
Meaning
|
$D
|
Current
date
|
$T
|
Current
time
|
$Q
|
Equal
sign
|
$P
|
Current
drive and path
|
$V
|
Ms-DOS
version number
|
$G
|
Greater
than sign
|
$L
|
Less
than sign
|
$P$G
|
Original
prompt
|
$B
|
Pipe
sign (│)
|
$_
|
No
prompt
|
Some External
commands, their syntax, and uses are:
- Command:
UNDELETE (undelete.exe)
Syntax: UNDELETE [drive:] [path]
Use: This command is used to recall deleted files,
directories and sub-directories.
Syntax: SYS [drive1:] [path] drive2
Use: This command is used to transfer system files
from one disk to another.
Syntax: EDIT
Use: This command is used to edit the existing text
files or make a new file if you like.
Syntax: DOS-command /MORE
Use: This command is used to display the output page
by page instead of continuous scrolling or by full-screen text.
Syntax: MOVE [drive:] [path] [drive:] [path]
Use: This command is used to move the files from one
location to another.
- Command:
XCOPY (xcopy.exe)
Syntax: XCOPY [drive:] [path] [/s] [/e] [drive:]
[path]
Use: This command is used to copy the files,
directories and sub-directories from one location to another.
Here,
s = copies directories and sub-directories except
empty ones.
e = copies all directories and sub directories.
- Command:
DOSKEY (doskey.com)
Syntax: DOSKEY [new DOS command = DOS command]
- Command:
CHKDSK (chkdsk.exe)
Syntax: CHKDSK [drive:] [path] [/f] [/v]
Use: This command is used to check the drives for
errors and display status report on any disk.
Here,
f = files error on the disk
v = report
- Command:
FORMAT (format.com)
Syntax: FORMAT [drive:]
Use: This command is used to format disks.
- Command:
DELTREE (deltree.exe)
Syntax: DELTREE [drive:] [path]
Use: This command is used to delete or remove a
directory including all the files and sub-directories.
Syntax: DISKCOMP [drive1:] [drive2:]
Use: This command is used to compare between two
diskettes.
Syntax: DOS Command /?
Use: This command or sign is used to get any type of
help about DOS commands.
- Command:
SCANDISK (scandisk.exe)
Syntax: SCANDISK [drive:]
Use: This command is used to check the status of C
drive disk, fix errors if any and give the details report of disk drive.
- Command:
LABEL (label.exe)
Syntax: LABEL [drive:]
Use: This command is used to display the disk drive
volume label.
Syntax: ATTRIB [+/-] [H/R/S]
Use: This command is used to change the attributes of
files.
Here,
Attributes
|
Meaning
|
+
|
Set
the Attributes
|
-
|
Clear
the Attributes
|
H
|
Hidden
files
|
R
|
Read-only
files
|
S
|
System
files
|