Operating System Theory Questions

Function of an Operating System

Some of the major function of operating system are as follows:

I. Program Execution.
II. Resources Allocation
III. Managing File System.
IV. Error Detection and Security
V. Scheduling, and
VI. Accounting

Classification of an Operating System

Operating system can be classified as:
I. Single user system : Supports one user at a time.
II. Multi-user system : More than user can work on the system.
Components of an Operating System

Structure of an operating system may vary depending on its functionality and the service it provides to the user. These are follows:

I. Memory Management.

II. File Management

III. Process Management

IV. Input/Output system Management.

V. Command Interpreter.

Need for an Operating System

There are many important reasons for studying the operating system.

Some of them are:

I. User interacts with the computer through an operating system in order to accomplish his task as it is his primary interface with a computer.

II. It help the users to understand the inner functions of a computer very closely.

III. Many concepts and techniques available in operating system have general application in other application.

 

The Booting Process

The procedure of loading an operating system into computer’s main memory or RAM, to enable a user to work on the computer, is called Booting .

Booting means to starts up the computer so as to make it able to understand our instructions and follow them step:

I. The disk bootstrap (Load BIOS into memory).

II. Basic input/output software (IO.SYS).

III. The File and Disk manager (MSDOS.SYS).

IV. The Command Processor (command.com)

Directory Handling

Group of files in convenient categories is called directory. These directories, in turn , may contain other directories referred to as sub-directories. This organized file structure is referred to as multi-level or hierarchical directory system. The full name of a file or a directory is called its pathname.

Absolute and Relative Pathnames

The full name of a file or a directory is also called its Pathname

They are of two types:

I. Absolute Pathname : The pathname which mention the paths from the topmost level of the directory structure.

Ex. A:\ACCOUNTS\HISTORY\CASH.ACT

Drive Directory Sub-directory File

II. Relative Pathname : These pathname mention the paths relative the topmost working directory.

Ex  .\TWO.PAS    ..\CL.DAT

Symbol (.) can be used in place of current directory and (..)denotes parent directory .TWO .PAS and CL.DAT being working directory.

 

 

Directory Handling Commands

Some directory handling commands are given below :

DIR Command

Display directory handling commands are given below:

Syntax    : DIR <Drive>[Path]<File Name>/options.

Ex        : C:\> DIR C:\CASH\.TXT

MD        : This commands is used to delete a directory.

Syntax    : MD [drive:] Path

Ex        : MD A :\ACCOUNTS\HISTORY

Rd        : This command is used to delete a directory.

Syntax    : RD [drive:] Path

Ex        : RD A:\ACCOUNTS\HISTORY

CD        : This command is used to move from one directory to other.

Syntax    : CD [Path]

Ex        : CD A:\Accounts\History

CHKDSK Command

This command is used to check disk drives for error.

syntax: CHKDSK [drive:] [path] /F/V

DISKCOPY Command

This command compares the content of two floppies or disks.

syntax: DISKCOPY A: C:

File Handling

File can be created by in two ways – by using Editor or COPY command.

File Handling Commands

File commands are those commands which operates on files. some file handling commands are given below:

COPY Command

It is used to copy file(s) from one directory to another.

syntax: COPY <source location> <destination location>

Ex: C:\> COPY C:\DOS\*.COM C:\ACCOUNTS

TYPE Command

This command is used to display the content of specified file.

Syntax: TYPE [drive:] [path] <file name>

Ex: TYPE C:\ACCOUNT\BOOK.TXT

DEL command

This command is used for deleting the specified file.

syntax: DEL [drive:] [path] <file name>

Ex: DEL C:\ACCOUNT\BOOK.TXT

Disk Handling Commands

some important disk handling command are as follows.

XCOPY command

This command can copy the sub-directory with their files.

Syntax: XCOPY <drive][path] source specification> < [drive][path] target specification>

Ex: C:\>XCOPY C:ACCOUNTS\*.* C:\HISTORY

DISKCOPY command

This command copies the entire structure of a disk to the other disk. so both disks must have same size and capacity.

Syntax: DISKCOPY <source drive> <target drive>

Ex: DISKCOPY A: B:

Batch File

A batch file consists of a sequence of command to perform sequence of operation step by step. a batch file has .BAT extension. AUTOEXEC.BAT is the most important batch file.

Batch Processing Commands

There are some commands which are used specially in BATCH files. These are as given below.

ECHO: This command controls the display of batch file statement on the screen.

Syntax: ECHO ON or ECHO OFF

PAUSE: This command is used to stop the execution of the batch file for sometime.

REM: Remarks are written by using REM command in the batch file.

IF: This command is used to check a condition and to take certain actions as specified.

Syntax: IF EXIST (expression)   <DOS Commands>

IF NOT EXIST  (expression)   <DOS Commands>

IF ERROR LEVEL == n  (expression)   <DOS Commands>

FOR: This command creates a conditional loop, in which a simple command is execute with a series of data set.

GOTO: This command is used to transfer the control of batch file from one label to another.

CHOICE: This command prompts the user for a response and sets the ERROR LEVEL, variable based on the response given.

 

 

Questions and Answer

Q. What is an operating system ? What are its functions?

Ans:- An operating system is a program which acts as an interface between a user and the hardware. its functions are:

(i) Program Execution  (ii) Handling Input/ output Operations.

(iii) Manipulation of file system (iv) Error detection and handling

(v) Resource allocation (vi) Accounting

(v) Information and Resource Protection.

Q. Name the major components of a computer system.

Ans: The major components of a computer system are:

(i) The Hardware (ii) The Operating System. (iii) The Application Programs   (iv) The Humanware (users).

Q. List name of operations performed by an operating systems.

Ans: Multi-programming, Multi-processing, Time sharing, Real time, etc. are performed by an operating system.

Q. What is Booting?

Ans: Loading the operating system in memory is called booting.

Q. Name some of the most popular operating systems.

Ans: UNIX, XENIX, SOLARIS, MS-DOS, Windows 98,2000,XP etc.

Q. What is MS-DOS when it was developed?

Ans: MS-DOS is a Microsoft Disk Operating System. Its was developed for IBM compatible personal computers by Microsoft Corporation of USA.

Q. Name the major components of MS-DOS.

Ans: MS-DOS consist of following four components:

(i) Boot Records which in track 0, sector 1, side 0 of every disk formatted in MS-DOS.

(ii) MS-DOS programs itself (MSDOS.SYS) along with IO.SYS.

(iii) Command processor COMMAND.COM.

(iv) Read only BIOS information module.

Q. Why MS-DOS called Disk Operating System?

Ans: MS-DOS called disk operating system because program files constituting this operating system are stored on a hard disk or on a set of floppy Disk.

Q. Name the types of Dos commands?

Ans: There are two types of DOS commands: Internal Commands and External commands.

Q. What is a directory? Name there types.

Ans: A group of file together constitute directory. they are two types. (I) Root Directory (ii) Sub Directory.

Q. What is a File?

Ans: A file is a collection of related information’s. Files on the disk contains letters, memos, data or contents.

Q. What do you know about file name?

Ans: A file name consist of 1 to 8 characters in length and can be typed in uppercase or lowercase letters. The filename extension consist of a period (.) sign followed by a maximum of three letters.

Q. What are wildcards?

Ans: Wildcards help in selecting several files together specified based on some logic. There are two wildcard characters one is * and other is ?.

Q. Categorize the following as Disk handling, File Handling or Directory handling commands? (i) CHKDSK (II) TYPE (III) COPY (IV) DIR (V) DEL (VI) DISKCOMP (VII) XCOPY (VIII) DISKCOPY

Ans: (i) Disk Handling Commands

(ii) File Handling Commands

(iii) File Handling Commands

(iv) Directory Handling Commands

(v) File Handling Commands

(vi) Disk Handling Commands

(vii) File/Directory Handling Commands

(viii) Disk Handling Commands

Q. What are Executable files?

Ans: The executable files are those which can be executed independently on the system. These files have “.EXE” extension.

Q. Name the extension used for executable files?

Ans: .COM  .EXE .BAT

Q. Why are .COM ,.EXE,. BAT files called executable files?

Ans: To execute .COM, .EXE, .BAT files we do not need any special software. These files can easily be executed by just typing their primary names on the DOS prompt.

Q. What is Batch File?

Ans: A batch file consists of a sequence of command to perform sequence of operation step by step. a batch file has .BAT extension.

Q. What do you mean by Batch processing commands? name their types?

Ans: Batch Processing commands are used to create and edit batch files. Two main batch processing commands are COPYCON and EDIT.

Q. How man you Execute a Batch File?

Ans: Batch File is executed automatically just by entering its name and pressing ENTER key.

Q. How can u execute AUTOEXEC.BAT file?

Ans: AUTOEXEC.BAT file is automatically executed when the operating system is loaded and the computer is booted up.

Q. What is the use of /4 in FORMAT command?

Ans: Switch/4 formats a double sided, double density (2S2D) 5.25″ floppy disk on 1.2 MB disk drive.

Q. What is the use of /w in Dir Command?

Ans; Switch/W displays the directory width wise. it displays 5 file names without any other information in a row.

Q. Give an MS-DOS command which will enable an executable file to be searched in the directory C:\LOTUS, if not found in current directory.
Ans: PATH C:\ LOTUS.

Q. Give the DOS command to display on the screen all files with filename starting from A and extension PAS present in the current directory.
Ans: DIR A*.PAS.

Q. Give the DOS command to make the floppy in drive a bootable.
Ans: Sys A: will make A disk bootable without formatting it and FORMAT A:/S will make A disk bootable after formatting it.

Q. What should be the content of an AUTOEXEC.BAT file which has to display the names of all the C++ files (extension.cpp) and then erase all files with extension .BAT and finally load the C++ compiler (BC)?
Ans: DIR *.CPP
DEL *.BAK
BC
REM TO load Borland C++ computer ,BC is executed.

Q. How does the DOS XCOPY command differ from DOS XCOPY command?
Ans: COPY can only the specified files from one directory only whereas XCOPY /s can copy the files from subdirectories also. COPY can not ask for confirmation before copying files whereas XCOPY/P can ask for confirmation also.

Q. What is the importance of pathnames?
Ans: A pathnames is full name along with the path i.e., the hierarchy to access a particular directory or file name.

Q. Many times the computer goes into hang. Which key combination is used to reboot the system?
Ans: Ctrl+ Alt+ Del

Q. If on the DOS prompt, TRY files is typed and on disk, there are three files TRY.COM, TRY.EXE and TRY.BAT which of the three files will be executed? why?
Ans: TRY. COM will be executed as MS-DOS always searches for firstly .COM files secondly .EXE files and finally .BAT As soon as, a files is found it is executed and search terminates.

Graphical User Interface

Q. What is meant by GUI? Name a popular GUI.
Ans: GUI is an interface that is an interaction rather a graphical interaction between the user and the computer. Window is the most popularly used GUI.

Q. What is a short cut menu? what is its significance?
Ans: A shortcut menu  is a menu that shows the most frequently used commands for a selected item (file, folder or anything else) it is also called context- sensitive menu. The short cut menu  is useful in the sense that all related commands are available at one platform without to go here and there. Open short cut menu by right-clicking at a selected item.

Q. What is the role of Window Explorer in Windows operating system?
Ans: The windows Explorer is a feature of Windows operating system that can be  used to view the contents of a computer and network drives in a hierarchical structure. Instead of opening drives and folders and folders in a separate windows Windows Explorer lets one browse through them in a single window The left side of the windows Explorer contains the list of drives and folders on the computer and the right side displays the contents of selected folder.

Q. What is the significance of Recycle Bin?
Ans: Recycle Bin is the place that holds the deleted files temporarily. If one wants to undelete a file then it may restored from recycle bin. However it items are deleted from the recycle itself then all of its items in it items in it are permanently deleted and cannot by restored later.

Q. What is the difference between copying and moving files and folders?
Ans: When a file or folder is copied then it is duplicated at the target location. That is the file or folder remains at the original location as well as copied at the targets locations. When a file or folder moved then it is removed from the original location and placed at the target location.

Q. Differentiate between Notepad and WordPad?
Ans : The notepad can be used to open files that do not need formatting and are less than 64k. The WordPad is used to open and format small document larger than 64k

Q. What happens when files and folders are deleted in  windows? Is it possible t retrieve deleted objected later? if so how?
Ans: When files and folders are deleted from a hard disk/ windows they are moved into recycle bin. The files or folders removed from the floppy disk or from the DOS prompt are deleted permanently. Yes, the deleted objects in recycle bin can be restored. To do so firstly they can are to be selected and then Restore command is clicked at the File menu of Recycle Bin.

Q. What  is the significance of Task bar?
Ans: The taskbar is a bar that show information about all the open windows. This can also be used to open programs (through start button available on it) and switch between open windows.

Q. When a folders is copied to another place do the subfolders in the folders also get copied?
Ans Yes When a folders is copied to another place all its subfolders along with their contents also get copied.

Q. What purpose does the operating system serve to the computer and the user?
Ans: The operating system narrows the gap between the user and the computer by receiving  and interpreting user’s request and then getting the required work done through the hardware.

Leave a Comment