Computer Fundamental & Office Automation
Computer Fundamental & Office Automation
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.
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
Job accounting
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.
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.
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.
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.
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.
An Operating System provides services to both the users and to the programs.
Program execution
I/O operations
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.
4|Page
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)
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.
Operating system provides the access to the required I/O device when required.
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.
The operating system gives the permission to the program for operation on file.
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.
The both processes can be on the one computer or on different computer but are
connected through computer network.
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.
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.
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 external I/O devices are protected from invalid access attempts.
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.
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)
6. These are ver, time, del, md, cd, copy con, cls, date, vol, ren, copy etc.
EXTERNAL COMMANDS
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.
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.,
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
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
6. REN
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.
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
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
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.
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.
CPU is often idle, because the speeds of the mechanical I/O devices is slower than CPU.
14 | P a g e
Computer Fundamental & Office Automation
ADITYA KUMAR (ASST. PROFESSOR I.T. DEPT @ UTTAM INSTITUTE OF I.T AND MANAGEMENT, AGRA)
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.
Problem of reliability.
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.
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.
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.
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.