Operating Systems
1. What is an operating system? Explain the six types of operating systems.
Ans: An ‘operating system’ (OS) is a collection of system programs that together control the
operation of a computer system. The OS along with hardware, application and other system softwares
and users constitute a computer system. It is the most important part of any computer system. It acts as
an intermediary between a user and the computer hardware. The OS has evolved immensely from its
primitive days to the present digital era. From batch processing systems to the latest embedded systems,
the OS can be classified into six broad categories that are described as follows:
Batch processing OS: This type of OS was one of the first to evolve. It allowed only one program
to run at a time. These kinds of OS can still be found on some mainframe computers running
batches of jobs. It works on a series of programs that are held in a queue. The OS is responsible for
scheduling the jobs according to priority and the resources required. These are good at churning
through large numbers of repetitive jobs on large computers. For example, this OS would be best
suited for a company wishing to automate their payrolls. A list of employees will be entered, their
monthly salaries will be calculated, and corresponding pay slips would be printed. Batch process-
ing is useful for this purpose, since these procedures are to be repeated for every employee and
each month.
Multi-user or time-sharing OS: This system is used in computer networks that allow different
users to access the same data and application programs on the same network. It builds a user data-
base account, which defines the rights that users can have on a particular resource of the system.
Some of the common examples of multi-user OS include Windows XP and Linux.
Multi-programming or multi-tasking OS: In this system, more than one process can be executed
concurrently. The processor is switched rapidly between the processes. Hence, a user can have
more than one process running at a time. For example, a user on his/her computer can have a word
processor and an audio CD player running at the same time. It allows the user to switch between
the running applications and even transfer data between them. That is, a user can copy a picture
from an Internet opened in the browser application and paste it into an image editing application.
Real-time OS (RTOS): This system is designed to respond to an event within a pre-determined
time. This kind of OS is primarily used in process control, telecommunications, and so on. The
OS monitors various inputs that affect the execution of processes, changing the computers model
3
M03_ITL-ESL4791_01_SE_C03.indd 47 12/22/2012 4:53:16 PM
I-48 Computer Fundamentals
of the environment, thus affecting the output, within a guaranteed time period (usually less than
1 second). As this OS responds quickly, it is often used in applications such as flight reservation
system, railway reservation system and military applications. Two common examples of RTOS are
Windows CE and Lynx OS.
Multi-processor OS: This system can incorporate more than one processor dedicated to the run-
ning processes. This technique of using more than one processor is often called ‘parallel process-
ing’. The main advantage of this OS is that it increases the system throughput by getting more work
done in less time.
Embedded OS: It refers to the OS that is self-contained in the device and resident in ROM. Since
embedded systems are usually not the general-purpose systems, they are lighter or less resource
intensive as compared to general-purpose OS. Most of these OSs also offer real-time OS qualities.
Typical systems that use embedded OS are household appliances, car management systems, traffic
control systems, and energy management systems.
2. Give the functions of OS.
Ans: The OS is the main aspect of a device and is very important to its overall function. Without it,
the computer will not be able to work. Thus, the main functions of OS are as follows:
Process management: As a process manager, the OS handles the creation and deletion of
processes, suspension and resumption of processes and scheduling and synchronization
of processes.
Memory management: As a memory manager, the OS handles the allocation and de-allocation
of memory space as required by various programs.
File management: The OS is responsible for creation and deletion of files and directories. It also
takes care of other file-related activities such as organizing, storing, retrieving, naming and pro-
tecting the files.
Device management: OS provides input/output sub-system between process and device driver. It
handles the device caches, buffers and interrupts. It also detects the device failures and notifies the
same to the user.
Security management: The OS protects system resources and information against destruction and
unauthorized use.
User interface: OS provides the interface between the user and the hardware. The user interface is
the layer that actually interacts with the computer operator. The interface consists of a set of com-
mands or menus through which a user communicates with a program.
3. Define the terms uniprogramming and multi-programming.
Ans: ‘Uniprogramming’ means performing only one program at a time. In a uniprogrammed system,
the users can perform only one task at a time. On the other hand, in ‘multi-programming’, multiple
programs can reside in main memory at the same time and these programs can be executed concurrently
thereby requiring the system resources to be shared among them.
4. What is a deadlock? How this situation arises? What are the two schemes which ensure
that deadlock never occurs?
Ans: In a multi-programming environment, several processes may compete for a limited number of
resources. A process requests for the required resource and if it is not available, then the process enters
in the waiting state and remains in that state until it acquires the resource. There might be a situation
M03_ITL-ESL4791_01_SE_C03.indd 48 12/22/2012 4:53:16 PM
Operating Systems I-49
when the process has to wait endlessly because the requested resource may be held by other waiting
processes. This type of situation is known as ‘deadlock’. A deadlock situation arises if the following four
conditions hold simultaneously on the system:
Mutual exclusion: Only one process can use a resource at a time. If another process requests for
the resource, the requesting process has to wait until the requested resource is released.
Hold and wait: In this situation, a process might be holding some resource while waiting for addi-
tional resource, which is currently being held by the other process.
No preemption: Resources cannot be preempted, that is, resources cannot be forcibly removed
from a process. A resource can only be released voluntarily by the holding process, after that pro-
cess has completed its task.
Circular wait: This situation may arise when a set of processes waiting for allocation of resources
held by other processes forms a circular chain in which each process is waiting for the resource
held by its successor process in the chain.
The two schemes that ensure that deadlock never occurs are as follows:
Deadlock prevention: The system should ensure that at least one of the four deadlock-causing
conditions would not hold true, so that deadlock can be prevented.
Deadlock avoidance: Additional information concerning which resources a process will require
and use during its lifetime should be provided to the OS beforehand. For example, in a system with
one CD drive and a printer, process P might request first for the CD drive and later for the printer,
before releasing both resources. On the other hand, process Q might request first for the printer
and the CD drive later. With this knowledge in advance, the OS will never allow allocation of a
resource to a process if it leads to a deadlock thereby avoiding the deadlock.
5. Write in brief on the following terms.
(a) Buffer
(b) CLI
(c) GUI
(a) A ‘buffer’ is a temporary storage area that takes a stream of bits from a device such as keyboard
to a serial communication port. Buffers hold the bits and then release them to the CPU at a con-
venient rate, so that the CPU can act on it. This task is important when a number of processes are
running and taking up the processor’s time. The operating system instructs a buffer to continue
taking the input from the device. In addition, it also instructs the buffer to stop sending data back
to the CPU if the process, using the input, is suspended. When the process, requiring input, is
made active once again, the operating system will command the buffer to send data again. This
process allows a keyboard to deal with external users at a higher speed.
(b) ‘CLI’ (stands for ‘command line interface’) is an interface provided by OS, which facilitates the
user to enter commands via an interactive terminal. This interface was used in early days of com-
puting where commands were only means to initiate programs, applications etc. To use CLI, a user
had to learn many commands for proper operation of the system.
(c) ‘GUI’ (stands for ‘graphical user interface’) is an interface, which provides user with pictures
rather than just characters to interact with the machine. These OSs display icons, buttons, dialog
boxes, etc., on the screen. The user sends instructions by moving a pointer on the screen (generally
mouse) and selecting certain objects by pressing buttons on the mouse while the mouse pointer is
pointing at them.
M03_ITL-ESL4791_01_SE_C03.indd 49 12/22/2012 4:53:16 PM
I-50 Computer Fundamentals
6. List some popular OSs.
Ans: Some examples of popular OSs are UNIX, Linux, MS-DOS, Mac and Microsoft Windows
(Windows 95, Windows 98, Windows 2000, Windows XP and Windows 2007).
7. Write a short note on DOS.
Ans: The ‘Disk Operating System’ (DOS) is a single user operating system released by Microsoft
in the early 1980s. DOS, also known as ‘MS-DOS’, is a CLI that enables users to organize data files,
load and execute (run) program files and control the input and output devices attached to the computer.
Every operation that can be performed with a GUI can also be performed with DOS. The MS-DOS
environment gives the user a quick and direct access to the basic utilities of a computer. All tasks are
accomplished by typing commands at a command prompt (at the cursor location). A ‘prompt’ is defined
as a character or string of characters used in the command line interface to indicate that a computer
is ready to accept commands from users. In DOS, > is used as a prompt, which is preceded by other
information such as current drive and path of the current working directory.
A file is a primary unit of storage in computers. DOS uses a unique filename to describe the content
of a file and keep track of the file, so that one can use it later. In DOS, the name of a file is divided
into two parts: the filename itself and an extension. For example, the filename Stu.doc has two parts,
namely, Stu (filename) and .doc (extension). Some of the different file extensions used by DOS are
.com, .exe, .bat, .txt etc. Moreover, files are organized under different directories. A ‘direc-
tory’ allows users to group files under one category. Every disk has one basic directory called the ‘root’
directory, which is created automatically when the disk is formatted. In addition to files, a directory can
contain other directories also in itself known as ‘subdirectories’. Each subdirectory can hold files and
further subdirectories. Furthermore to access a file, a user may have to traverse through different directo-
ries. Thus, a ‘pathname’ is used to instruct the computer where to look for any particular file. A pathname
is a sequence of directories separated by a backslash (‘’) followed by a filename. For example, the path-
name for a file named STU can be C:StudentDetailsStu.doc. In this pathname, C drive
contains a directory Student in which Details is a subdirectory where the file Stu.doc is stored.
8. Give the syntax of the following DOS commands:
(a) DIR
(b) DISKCOPY
(c) FORMAT
(d) TIME
Ans: The given commands are described as follows:
(a) DIR: It is used to display the list of files or subdirectories present in a directory. The syntax of this
command is:
DIR [Drive:] [Path] [Filename] [/A [[:] Attributes] [/B] [/C] [/D]
[/L] [/N] [/O [[:] Sortorder]] [/P] [/Q] [/S] [/T [[:] Timefield]]
[/W] [/X] [/4]
where,
[Drive:] specifies the drive.
[Path] specifies the pathname.
[Filename] specifies the filename.
M03_ITL-ESL4791_01_SE_C03.indd 50 12/22/2012 4:53:16 PM
Operating Systems I-51
[/A
] displays files with the specified attributes. Different attributes are D (directory), H (hidden
files), S (system files), R (read-only files), A (files ready for archiving), - (prefix meaning not).
[/B] uses bare format with no heading information or summary.
[/C] displays thousand separators in the file size.
[/W] uses the wide list format.
[/D] same as /W, the only difference is files are sorted by column.
[/L] uses lowercase.
[/N] displays a new long list format, where filenames are displayed on the far right.
[/O] lists files in sorted order. The sort order is specified by N (name), E (extension), G (group
directory first), S (size), D (date) or - (prefix to reverse order).
[/P] pauses after each screen full of information.
[/Q] displays the owner of the file.
[/S] displays files in a specified directory and all subdirectory.
[/T] determines which time field is used for sorting. Time field options are C (creation), A (last
access) or W (last written).
[/X] displays short names, inserted before the long name.
[/4] displays years in four digits.
(b) DISKCOPY: It is used to copy the contents of one disk drive to another provided the two disks
are of the same type. The syntax of this command is:
DISKCOPY [drive 1: [drive 2 : ] ] [/V]
where,
[drive 1] specifies the source disk.
[drive 2] specifies the target disk.
[/V] verifies the information once it is copied.
(c) FORMAT: It is used to format a disk. The syntax of this command is:
FORMAT Volume [/FS:filesystem][/V:label][/Q][/X][/A:size]
[/F:size][/T:tracks][/N:sectors]
where,
Volume specifies the drive.
[/FS:filesystem] specifies the file system.
[/V:label] specifies the volume label.
[/Q] performs a quick format.
[/X] forces the volume to dismount first, if necessary.
[/A:size] overrides the default allocation unit size.
[/F:size] specifies the floppy disk size.
[/T:tracks] specifies the number of tracks each side.
[/N:sectors] specifies the number of sectors per track.
(d) TIME: It is used to display or set the system time. The syntax of this command is:
TIME [/T]
where,
[/T] displays only the current time.
M03_ITL-ESL4791_01_SE_C03.indd 51 12/22/2012 4:53:16 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset