Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Computer Fundamental & Office Automation

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 17

Computer Fundamental & Office Automation

ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

UNIT-3
Operating System and Services in O.S.
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.

In technical terms, It is a software which manages hardware. An operating System controls the
allocation of resources and services such as memory, processors, devices and information.

Definition
An operating system is a program that acts as an interface between the user and the computer
hardware and controls the execution of all kinds of programs.

Following are some of important functions of an operating System.

 Memory Management

 Processor Management

 Device Management

 File Management

1|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

 Security

 Control over system performance

 Job accounting

 Error detecting aids

 Coordination between other software and users

Memory Management
Memory management refers to management of Primary Memory or Main Memory. Main
memory is a large array of words or bytes where each word or byte has its own address.

Main memory provides a fast storage that can be access directly by the CPU. So for a program
to be executed, it must in the main memory. Operating System does the following activities for
memory management.

 Keeps tracks of primary memory i.e. what part of it are in use by whom, what part are not
in use.

 In multiprogramming, OS decides which process will get memory when and how much.

 Allocates the memory when the process requests it to do so.

 De-allocates the memory when the process no longer needs it or has been terminated.

Processor Management
In multiprogramming environment, OS decides which process gets the processor when and how
much time. This function is called process scheduling. Operating System does the following
activities for processor management.

 Keeps tracks of processor and status of process. Program responsible for this task is
known as traffic controller.

 Allocates the processor(CPU) to a process.

 De-allocates processor when processor is no longer required.

2|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

Device Management
OS manages device communication via their respective drivers. Operating System does the
following activities for device management.

 Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.

 Decides which process gets the device when and for how much time.

 Allocates the device in the efficient way.

 De-allocates devices.

File Management
A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directions. Operating System does the following
activities for file management.

 Keeps track of information, location, uses, status etc. The collective facilities are often
known as file system.

 Decides who gets the resources.

 Allocates the resources.

 De-allocates the resources.

Other Important Activities


Following are some of the important activities that Operating System does.

 Security -- By means of password and similar other techniques, preventing unauthorized


access to programs and data.

 Control over system performance -- Recording delays between request for a service and
response from the system.

 Job accounting -- Keeping track of time and resources used by various jobs and users.

3|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

 Error detecting aids -- Production of dumps, traces, error messages and other debugging
and error detecting aids.

 Coordination between other softwares and users -- Coordination and assignment of


compilers, interpreters, assemblers and other software to the various users of the
computer systems.

An Operating System provides services to both the users and to the programs.

 It provides programs, an environment to execute.

 It provides users, services to execute the programs in a convenient manner.

Following are few common services provided by operating systems.

 Program execution

 I/O operations

 File System manipulation

 Communication

 Error Detection

 Resource Allocation

 Protection

Program execution
Operating system handles many kinds of activities from user programs to system programs like
printer spooler, name servers, file server etc. Each of these activities is encapsulated as a
process.

A process includes the complete execution context (code to execute, data to manipulate,
registers, OS resources in use). Following are the major activities of an operating system with
respect to program management.

 Loads a program into memory.

4|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

 Executes the program.

 Handles program's execution.

 Provides a mechanism for process synchronization.

 Provides a mechanism for process communication.

 Provides a mechanism for deadlock handling.

I/O Operation
I/O subsystem comprised of I/O devices and their corresponding driver software. Drivers hides
the peculiarities of specific hardware devices from the user as the device driver knows the
peculiarities of the specific device.

Operating System manages the communication between user and device drivers. Following are
the major activities of an operating system with respect to I/O Operation.

 I/O operation means read or write operation with any file or any specific I/O device.

 Program may require any I/O device while running.

 Operating system provides the access to the required I/O device when required.

File system manipulation


A file represents a collection of related information. Computer can store files on the disk
(secondary storage), for long term storage purpose. Few examples of storage media are
magnetic tape, magnetic disk and optical disk drives like CD, DVD. Each of these media has its
own properties like speed, capacity, data transfer rate and data access methods.

A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directions. Following are the major activities of an
operating system with respect to file management.

 Program needs to read a file or write a file.

 The operating system gives the permission to the program for operation on file.

 Permission varies from read-only, read-write, denied and so on.


5|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

 Operating System provides an interface to the user to create/delete files.

 Operating System provides an interface to the user to create/delete directories.

 Operating System provides an interface to create the backup of file system.

Communication
In case of distributed systems which are a collection of processors that do not share memory,
peripheral devices, or a clock, operating system manages communications between processes.
Multiple processes with one another through communication lines in the network.

OS handles routing and connection strategies, and the problems of contention and security.
Following are the major activities of an operating system with respect to communication.

 Two processes often require data to be transferred between them.

 The both processes can be on the one computer or on different computer but are
connected through computer network.

 Communication may be implemented by two methods either by Shared Memory or by


Message Passing.

Error handling
Error can occur anytime and anywhere. Error may occur in CPU, in I/O devices or in the
memory hardware. Following are the major activities of an operating system with respect to
error handling.

 OS constantly remains aware of possible errors.

 OS takes the appropriate action to ensure correct and consistent computing.

Resource Management
In case of multi-user or multi-tasking environment, resources such as main memory, CPU
cycles and files storage are to be allocated to each user or job. Following are the major activities
of an operating system with respect to resource management.

 OS manages all kind of resources using schedulers.

 CPU scheduling algorithms are used for better utilization of CPU.


6|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

Protection
Considering a computer system having multiple users the concurrent execution of multiple
processes, then the various processes must be protected from each another's activities.

Protection refers to mechanism or a way to control the access of programs, processes, or users
to the resources defined by a computer systems. Following are the major activities of an
operating system with respect to protection.

 OS ensures that all access to system resources is controlled.

 OS ensures that external I/O devices are protected from invalid access attempts.

 OS provides authentication feature for each user by means of a password.

MS-DOS
MS-DOS (acronym for Microsoft Disk Operating System) is an operating system for x86-
based personal computers mostly developed by Microsoft. It was the most commonly used
member of the DOS family of operating systems, and was the main operating system for IBM
PC compatible personal computers during the 1980s to the mid-1990s, when it was gradually
superseded by operating systems offering a graphical user interface (GUI), in various
generations of the graphical Microsoft Windows operating system by Microsoft Corporation.
MS-DOS resulted from a request in 1981 by IBM for an operating system to use in its IBM
PC range of personal computers. Microsoft quickly bought the rights to 86-DOS from Seattle
Computer Products, and began work on modifying it to meet IBM's specification. IBM licensed
and released it in August 1981 as PC DOS 1.0 for use in their PCs. Although MS-DOS and
PC DOS were initially developed in parallel by Microsoft and IBM, in subsequent years the two
products went their separate ways.

Internal And External Commands


INTERNAL COMMANDS

1. These are those commands which are contained in command.com files of MS-DOS.

2. These are those functions that are built into the command interpreter.

3. There is no need of any external file in computer to read internal MS-DOS command.

7|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

4. These commands can be used as long as DOS is running on the system.

5. Internal commands do not vary from system to system.

6. These are ver, time, del, md, cd, copy con, cls, date, vol, ren, copy etc.

EXTERNAL COMMANDS

1. These are those commands which are not in-built in MS-DOS.

2. External commands are those which are not included in the interpreter.

3. There is a need of an internal file in the computer to read external MS-DOS command.

4. External command may vary from system to system. This means any two computers with
same version of MS-DOS may have same internal commands, but may have different
external commands.

5. These are tree, xcopy, diskcopy, more, print etc.

DOS Commands are divided into 2 types:

1. Internal Commands

These are for performing basic operations on files and directories and they do not need any
external file support.

2. External Commands

These external commands are for performing advanced tasks and they do need some external
file support as they are not stored in COMMAND.COM
There are also Batch commands or Batch files which are text files that contain a list of internal
and/or external commands which are executed in sequence when the batch file is executed.
AUTOEXEC.BAT gets executed automatically on booting.

8|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

In MS-DOS, keyboard shortcuts involving handy ones like Functional keys, arrows, pipe
character (” | “), asterisk (*), ?, [] and ESC are of great help for recalling to searching to clearing
command line etc., 

Most Commonly Used Internal DOS Commands


1. DATE

This command is used to display the system current date setting and prompt you to enter a
new date. The syntax is: DATE  [/T | date]

2. TIME

This command is used to displays or set the system time. 


The syntax is: TIME   [/T | time]

3. COPY CON

It is used to create a file in the existing directory. Here CON is a DOS reserved word which
stands for console. 
Syntax is: COPY  CON filename after that press Enter and start typing your text and after
you’re done typing your text, to save and exit hit F6 key.

4. TYPE

9|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

This command is used to display the contents of a text file or files. The syntax is: TYPE  
[drive:][path]filename
Now, lets try to display the contents of the file named filename we’ve created earlier using
COPY CON command.

5. CLS

It is used to clear the screen. Syntax is CLS

6. REN

This command is used to change/modify the name of a file or files. 


Syntax is: REN   [drive:] [path] filename1   filename2.

7. DIR

This command displays a list of files and subdirectories in a directory. Syntax is: DIR  
[drive:]  [path]  [filename] [/A[[:]attributes]]  [/B]  [/C]  [/D]  [/L]  
[/N]  [/O[[:]sortorder]]  [/P]  [/Q] [/S]  [/T[[:]timefield]]  [/W]  [/X]  [/4]

8. MD, CD and RD

1. MD (or MKDIR) command stand for make directory and it is used to create a directory.
Syntax is MD   [drive:]path

10 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

2. CD (or CHDIR) stands for create or change directory and it allows to display the name of
or change the current directory or rather we can say come out of a directory. Syntax
is CD   [/D]   [drive:][path]
→ Typing CD drive: displays the current directory in the specified drive. This CD (or
CHDIR) command does not treat spaces as delimiters due to which it allows to CD into a
subdirectory name that contains a space without surrounding the name with quotes. 
For example: 
CHDIR program filesmozilla firefox 
is the same as: 
CHDIR “program filesmozilla firefox”
→ If you type CD without any parameters it displays current drive and
directory. CD..specifies that you want to change to the higher directory in the current path.
Whereas, using CD you can directly change to parent/root directory from any location in
the current drive.
→Using /D switch changes current drive in addition to current directory for a drive.

3. RD (or RMDIR) command removes or deletes a directory. There are two


conditions to remove any directory – (1) Directory to be removed should be empty. and (2)
We should be outside the directory we are commanding to delete. 
Syntax is RD   [/S]   [/Q]   [drive:]path 
Here, using the switch /S removes a directory tree meaning it removes all directories and
files in the specified directory in addition to the directory itself. And using /Q is the quiet
mode that doesn’t asks for ok approval to remove a directory tree.

Most Commonly Used External DOS Commands


1. EDIT

This command is used to modify or change the data of a file.


Syntax is EDIT  [/B]  [/H]  [/R]  [/S]  [filename(s)]

11 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

Using switch /B you can force the edit in monochrome mode. /H displays the maximum
number of lines possible for your system hardware. Whereas using /R and /S one can load
files in read-only mode and force the use of short filenames respectively. [filename(s)] is
used to specify file(s) to go edit. You can use wildcards (* and ?) to specify multiple files.

2. XCOPY

This command is used to copy files and directory trees from one disk to another disk. 
Syntax is XCOPY   source   [destination]   [/A | /M]   [/D[:date]]   [/P]   [/S [/E]]   [/V]  
[/W]   [/C]   [/I]   [/Q]   [/F]   [/L]   [/G]   [/H]   [/R]   [/T]   [/U]  [/K]   [/N]  [/O]   [/X]  
[/Y]   [/-Y]   [/Z]  [/EXCLUDE:file1[+file2][+file3]…]

3. LABEL

It is used to create, change, or delete the volume label of a disk.


Syntax is LABEL    [drive:]  [label]
LABEL  [/MP]   [volume]   [label]
Here, [drive:] is for secifying the drive letter of a drive to be labelled and [label] specifies the
label of the volume disk. [/MP] is used to specify that the volume should be created as a
mount point and [volume] is used to specify volume name, usually mentioned after drive
letter followed by colon and then giving volume name required.

4. DISKCOPY

This command copies the contents of one floppy from the source drive to a formatted or un-
formatted floppy disk in the destination drive. This command copies the data from particular
position on the source disk to exactly the same position on the destination disk.
SyntaxDiskcopy  A:  B:
copies contents of A: to B: drive. This command can be used with /V switch which verifies
that the disk is copied correctly.

5. CHKDSK

12 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

This command is used to check a disk and display a status report with properties of disk like
serial number, volume label, memory and other properties along with errors on the disk if
any. 
Syntax is CHKDSK   [volume path]   [/F]   [/V]   [/R]   [/X]   [/I]   [/C]   [/L[:size]]
[volume path] is where you specify the drive letter followed by a colon and volume name to
be checked. using /F switch allows you to fix errors on the disk. /V display full path
and/orcleanup message if any. /R is used in tandem with /F and used to locate bad sectors and
recover readable information. If you wanted to perform a less vigorous check of index entries
on the disk then the right option is to use /I or /C rather then /R as they skip checking of
cycles on the volume and helps in reducing the amount of time required to run chkdsk. Using
/X forces the volume to dismount first before checking is performed. /L:size is all about
specifying the log file size in kilobytes.

6. TREE

This command is very useful to view the list of directories and subdirectories present on the
disk in graphical form. If you wanted to include files also with directories and subdirectories,
then you’ll have to give the command line as tree/f which presents the tree view of all the
content on your disk. Here is the syntax for this command with allowed switches: 
TREE   [drive:path]  [/F]  [/A]
In case you wanted use ASCII instead of extended characters, then go ahead include /A in the
command line.

7. DELTREE

This command is used to remove a directory along with its contents. 


Syntax is deltree [drive:path] 
here, [drive:path] specifies the directory name to be deleted. All the subdirectories and files
in this directory will be deleted without prompt and there’s not getting back. So, keep caution
while using this command.

13 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

Batch file
A file that contains a sequence, or batch, of commands. Batch files are useful for storing sets of
commands that are always executed together because you can simply enter the name of the batch
file instead of entering each command individually.
In DOS systems, batch files end with a.BAT extension. For example, the following DOS batch
file prints the date and time and sets the prompt to GO>:
date
time
prompt [GO>]
Whenever you boot a DOS -based computer, the system automatically executes the batch file
named AUTOEXEC.BAT, if it exists.
Many operating systems use the terms command file or shell script  in place of batch file.

Types of Operating System

Operating systems are there from the very first computer generation. Operating systems keep
evolving over the period of time. Following are few of the important types of operating system
which are most commonly used.

Batch operating system


The users of batch operating system do not interact with the computer directly. Each user
prepares his job on an off-line device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together and run as a group. Thus,
the programmers left their programs with the operator. The operator then sorts programs into
batches with similar requirements.

The problems with Batch Systems are following.

 Lack of interaction between the user and job.

 CPU is often idle, because the speeds of the mechanical I/O devices is slower than CPU.

 Difficult to provide the desired priority.

14 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

Time-sharing operating systems


Time sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Time-sharing or multitasking is a logical extension
of multiprogramming. Processor's time which is shared among multiple users simultaneously is
termed as time-sharing. The main difference between Multiprogrammed Batch Systems and
Time-Sharing Systems is that in case of Multiprogrammed batch systems, objective is to
maximize processor use, whereas in Time-Sharing Systems objective is to minimize response
time.

Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receives an immediate response. For example, in a transaction
processing, processor execute each user program in a short burst or quantum of computation.
That is if n users are present, each user can get time quantum. When the user submits the
command, the response time is in few seconds at most.

Operating system uses CPU scheduling and multiprogramming to provide each user with a small
portion of a time. Computer systems that were designed primarily as batch systems have been
modified to time-sharing systems.

Advantages of Timesharing operating systems are following

 Provide advantage of quick response.

 Avoids duplication of software.

 Reduces CPU idle time.

Disadvantages of Timesharing operating systems are following.

 Problem of reliability.

 Question of security and integrity of user programs and data.

 Problem of data communication.

Distributed operating System

15 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

Distributed systems use multiple central processors to serve multiple real time application and
multiple users. Data processing jobs are distributed among the processors accordingly to which
one can perform each job most efficiently.

The processors communicate with one another through various communication lines (such as
high-speed buses or telephone lines). These are referred as loosely coupled systems or
distributed systems. Processors in a distributed system may vary in size and function. These
processors are referred as sites, nodes, computers and so on.

The advantages of distributed systems are following.

 With resource sharing facility user at one site may be able to use the resources available at
another.

 Speedup the exchange of data with one another via electronic mail.

 If one site fails in a distributed system, the remaining sites can potentially continue
operating.

 Better service to the customers.

 Reduction of the load on the host computer.

 Reduction of delays in data processing.

Network operating System


Network Operating System runs on a server and and provides server the capability to manage
data, users, groups, security, applications, and other networking functions. The primary purpose
of the network operating system is to allow shared file and printer access among multiple
computers in a network, typically a local area network (LAN), a private network or to other
networks. Examples of network operating systems are Microsoft Windows Server 2003,
Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.

The advantages of network operating systems are following.

 Centralized servers are highly stable.

 Security is server managed.

16 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)

 Upgrades to new technologies and hardwares can be easily integrated into the system.

 Remote access to servers is possible from different locations and types of systems.

The disadvantages of network operating systems are following.

 High cost of buying and running a server.

 Dependency on a central location for most operations.

 Regular maintenance and updates are required.

Real Time operating System


Real time system is defines as a data processing system in which the time interval required to
process and respond to inputs is so small that it controls the environment. Real time processing
is always on line whereas on line system need not be real time. The time taken by the system to
respond to an input and display of required updated information is termed as response time. So
in this method response time is very less as compared to the online processing.

Real-time systems are used when there are rigid time requirements on the operation of a
processor or the flow of data and real-time systems can be used as a control device in a dedicated
application. Real-time operating system has well-defined, fixed time constraints otherwise
system will fail. For example Scientific experiments, medical imaging systems, industrial control
systems, weapon systems, robots, and home-appliances controllers, Air traffic control system
etc.

There are two types of real-time operating systems.

Hard real-time systems


Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems
secondary storage is limited or missing with data stored in ROM. In these systems virtual
memory is almost never found.

Soft real-time systems


Soft real time systems are less restrictive. Critical real-time task gets priority over other tasks
and retains the priority until it completes. Soft real-time systems have limited utility than hard
real-time systems. For example, Multimedia, virtual reality, Advanced Scientific Projects like
undersea exploration and planetary rovers etc.
17 | P a g e

You might also like