Operating System cont… - St. Xavier's College - Calcutta

feastcanadianSoftware and s/w Development

Dec 14, 2013 (3 years and 6 months ago)

69 views

ST. XAVIER'S COLLEGE, BCOM MORNING

1

SYSTEM SOFTWARE

ST. XAVIER'S COLLEGE, BCOM MORNING

2

Programming Language Translator

1.
Assembler


This translation program translates an assembly language program into an


equivalent machine language program. It is called ‘assembler’ because it

also assembles the machine language program in the main memory of the


computer and makes it ready for execution. Since the assembler translates

each assembly language instruction into an equivalent machine language


instruction, there is one
-
to
-
one correspondence between the source


program of the assembly language instruction and equivalent object program


of machine language instruction.

ST. XAVIER'S COLLEGE, BCOM MORNING

3

2. Compiler


It is a translator program that translates a high level language program (like
C or FORTAN) into its equivalent machine level language program. It is
called ‘compiler’ because it compiles each high level language instruction
into a set of machine language instructions. For this reason, there is one
-
to
-
many correspondence. Here, the syntax errors are detected only after the
compilation.

Programming Language Translator
cont…

ST. XAVIER'S COLLEGE, BCOM MORNING

4

3. Interpreter


This translation program takes one statement of a high level language
program, translates into machine language instructions and
immediately executes the resulting machine language instruction. In
case of an interpreter, syntax error in a program statement is detected
as soon as the program statement is interpreted.

Programming Language Translator
cont…

ST. XAVIER'S COLLEGE, BCOM MORNING

5

Operating System

What is an operating system?

Operating system is an integrated set of programs that controls all the
hardware resources and provides an interface between the user and the
computer. The name ‘operating system’ is given because it is a collection of
system programs controlling the operation of a computer.


The operating system helps the end user by (i) controlling and managing
hardware devices; (ii) running software applications; (iii) coordinating
hardware and software; and (iv) acting as the intermediary between the
computer system and the end user.

ST. XAVIER'S COLLEGE, BCOM MORNING

6


Functions of operating system



1. Process management

2. Memory management

3. File management

4. Device management

5. Security management

6. User Interface (Command Interpretation)

Operating System
cont…

ST. XAVIER'S COLLEGE, BCOM MORNING

7


What is a
process
?


A process is identified as an execution of a program by the processing
unit. One program may consist of several tasks. For example, a text
editing document is a program. While editing the document, the user may
start printing a spreadsheet and also may read data from CD
-
ROM. During
execution, a process requires certain resources like CPU time allocation,
memory space, files and I/O devices. Hence, the process management
module of an operating system is responsible for managing the process
assigned by the user and accomplishing all the tasks by making proper
and efficient use of hardware resources.

Operating System
cont…

1.
Process Management


ST. XAVIER'S COLLEGE, BCOM MORNING

8

What is process life
-
cycle?

When there are processes running on a computer, operating system
allocates certain amount of time to each process for making use of the
processor. So, the process may be at different stages of execution. These
are
-

Running, ready and waiting.

Running


the process which is allowed by the operating system to use the
processor.

Ready


the process which can run when the processor becomes free.

Waiting


the running process which is interrupted after completing its
allotted time and kept waiting (to be processed later).

The change of the state from one to another is known as context change
and the action is known as context switching.

Operating System
cont…

1.
Process Management

cont…


ST. XAVIER'S COLLEGE, BCOM MORNING

9

What is process scheduling?

In a multiprogramming environment the processor is required to handle many
processes at a given time and these processes are to be the processor time,
which is known as scheduling.

Two most popular implementation of scheduling are


First in First out (FIFO)

and Round Robin

First in First out and (FIFO)


In this system, all the available processes are kept
in queue. When the first one is dispatched to the processor all other processes
move up one slot in the queue. In this approach, a process may take up long time to
complete and holds up other processes in the queue.

Round Robin


In this approach, a process is allowed to run for a fixed period of
time known as time slicing, after which it is interrupted and sent to the end of the
queue.

Operating System
cont…

1.
Process Management

cont…


ST. XAVIER'S COLLEGE, BCOM MORNING

10

Part of the operating system that manages the memory of a computer is


known as
memory manager.




Two major tasks are involved in memory management:


(i)
allocation of memory space to each process; and

(ii)
effective utilization of different types of memory.

Operating System
cont…

2.

Memory Management


ST. XAVIER'S COLLEGE, BCOM MORNING

11

Memory protection

Memory protection program ensures that that memory location allocated to
one process is not being used by any other process. The operating system
keeps track of the memory space assigned to each program. If a program
attempts to modify the contents of memory locations that do not belong to it;
operating system’s memory routine intervenes and usually terminates the
program.

Virtual memory

Virtual memory acts like a main memory to the user, although it is no real
memory. A part of the secondary storage device (like hard disk) is linked with
the main memory through the referenced page pf a program and made
available to the user, when necessary.

Operating System
cont…

2.

Memory Management

cont…


ST. XAVIER'S COLLEGE, BCOM MORNING

12

It may also be described as information management because information

is stored in the system in the form of files. Process can read information

from files and can create new files for newly generated information.


File manager of the operating system is responsible for

(i)
maintenance of the file system;

(ii)
providing directories for organizing files; and

(iii)
providing a protection mechanism to allow different users to access
information stored in different files.

Operating System
cont…

3.

File Management


ST. XAVIER'S COLLEGE, BCOM MORNING

13

Device management module of an operating system controls all the I/O
devices of a computer. For example, a printer is recognized and used
through the operating system.

Device manager keeps track of I/O requests from processor, issues
command to the I/O devices and ensures correct data transmission to/from
I/O devices.

Operating System
cont…

4.

Device Management


SPOOLING

SPOOL stands for
Simultaneous Peripheral Operation On
-
line
. It refers to putting jobs
in a buffer memory where a device can access them when it is ready. The processor
send the data very fast and the buffer provides a waiting space while the slower device
catches up. The most common spooling application is print spooling.


ST. XAVIER'S COLLEGE, BCOM MORNING

14

This module of operating system provides protection against data
corruption (or destruction) and unauthorized access.


Two major security techniques are:




data backup and




user authentication (like the use of password).


Operating System
cont…

5.

Security Management


ST. XAVIER'S COLLEGE, BCOM MORNING

15

Command interpretation module (also known as command interpreter) of an
operating system serves as an interface for the user to communicate with the
computer via its operating system.

Two types of interface may be provided to the user.


(i) Command Line Interface (CLI)


Here the user gives user to the computer
by typing commands line by line. DOS and UNIX are the examples of the
operating system providing CLI.

(ii) Graphical User Interface (GUI)


Here the command is graphical or pictorial.
User can give commands by clicking icons and opening dialog boxes.
Commands are selected by moving a pointer (generally by using mouse).
WINDOWS and LINUX are the examples of GUI based operating systems.

Operating System
cont…

6.

User Interface (Command Interpretation)


ST. XAVIER'S COLLEGE, BCOM MORNING

16

Utilities are the utility programs, which assist the users with the system

maintenance tasks.


Some of the common utilities are:

1.
Disk formatting

2.
Disk compaction

3.
Disk cleanup

4.
Data compression

5.
Data backup

6.
Data recovery

7.
Virus protection

8.
Firewall

UTILITIES

ST. XAVIER'S COLLEGE, BCOM MORNING

17

It helps the user in analyzing the performance of the various hardware
components as well as the overall performance of a computer system.


It provides such information as % of CPU utilization, % of memory
utilization, and number of disk accesses during any given period of time.

PERFORMANCE MONITORING OR PROFILER