0% found this document useful (0 votes)
16 views

OS Module-1 Key Points

Uploaded by

nihalmanoj403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

OS Module-1 Key Points

Uploaded by

nihalmanoj403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

OS - Module 1 Key Points

Module-1 Syllabus
Outline the significance of operating systems and its functions

● System software & application software, examples


● System software
○ assembler,
○ loader,
○ compilers, interpreters and their functions, comparison.
○ Operating system
■ Definition of OS , functions of Operating system
■ different types of Operating Systems
● batch systems , multiprogramming systems
● time sharing , Multiprocessor systems
● real time systems.
Possible Questions
1. Differentiate System software & Application software
2. Examples for system software
3. Assembler - definition & functions
4. Compiler & Interpreter - definition, functions & comparison
5. Loader and its functions
6. Define OS
7. Goals of OS
8. Functions of Operating system
9. Different types of Operating systems
System software & Application software
● Application software are computer programs designed to perform
specific tasks for end-user.
○ Eg: Microsoft office suite, adobe photoshop, student
management system, financial accounting system, video games
etc.
● System software are computer programs designed to manage and
control computer hardware and other software programs in the
system.
○ Eg: Operating system , language translators such as assembler,
compiler, interpreter , loader, linker, debugger etc.
Assembler 1. Translating mnemonic operation code to their
machine language equivalent.

● Assembler is a system 2. Convert symbolic operands to their equivalent


software that converts machine addresses
assembly language 3. Build the machine instruction in the proper
program to machine format
language 4. Convert the data constants in the source program
into their internal machine representation
5. Write the object program and assembly listing
Compiler & Interpreter - both translates high level
language program to machine language
COMPILER INTERPRETER

1. Translates entire source program 1. Translates one line at a time


2. Generates object program 2. Does not generate object program
3. Occupies more memory to store the object 3. It is more memory efficient
program 4. Program need to be interpreted every time
4. Program once compiled can be run any they are run
number of times 5. Errors are reported as soon as it is
5. Syntax errors are reported after checking detected. Execution continues only after
the entire program correcting the reported error
6. Debugging is comparatively difficult 6. Debugging is easy
LOADER
● A loader is a system software that brings the object program ( binary or machine code )
into memory for execution. The process is known as loading
Functions of loader
1. Allocation: This activity allocates the space in the memory where the object
program and its associated data would be loaded for execution by calculating the size of
the program.
2. Linking: Combines multiple object files or modules to form a complete executable
program
3. Relocation: It modifies the object program by changing certain instructions so that it
can be loaded at different address other than the address originally specified.
4. Loading: It brings the object program into the memory for execution. Thus the program
becomes ready for execution
Operating System
● An operating system (OS ) is the essential system software that controls and
coordinates the activities of hardware devices, software applications, and users in
a computer system.
● OS manages the computer resources , So it is the resource manager
● OS provides necessary services required to execute programs
● OS enables users to interact with computer system
● Resources of a computer system
o Hardware - CPU, Memory, Peripherals
o Software - Application programs & other system programs
o Data
o Network
Goals of OS
1) Convenience : The primary goal of some operating systems is “convenience
for the user”. OS provides user friendly interfaces for convenience
2) Efficiency: The primary goal of other operating systems is “efficient”
operation of the computer system. Efficiency is achieved by maximizing
resource utilization.
3) Extensibility: is to introduce new hardware to computer systems and to
provide new functionalities
Functions of Operating System

1. Process Management
2. Memory Management
3. File system Management
4. Device Management (Peripheral Management )
a. I/O Device Management
b. Storage or Disk Management
5. Provides User Interface
6. Enforce Security
7. Facilitate Network communication
8. Detects and handles system errors and provides Recovery
Process Management

● A process is a program under execution. A program is a passive entity which by itself


does nothing. But, a process is an active entity that executes the instructions specified
within the program.
● In connection with process management, the responsibilities of OS are :
1. Create & delete process
2. Suspend & resume the execution of a process
3. Facilitate communication among processes
4. Provide mechanism to deal with deadlocks
Memory Management
● Main memory holds the instructions and data currently being
processed by the CPU, the results of intermediate calculations etc.
Memory is the only storage directly accessible by the CPU.
● In relation to memory management, the responsibilities of OS are :
○ Allocate and release memory space for processes
○ Deciding which processes are to be loaded into memory when
space becomes available
○ Keeping track of which parts of memory are currently being
used and by whom. (Keeping track of used space & free
space)
File System Management

● File management deals with the management and organization of


various files and folders.
● File management responsibilities of OS:
● Creating and deleting files
● Creating and deleting directories
● Mapping files onto secondary storage
● Provide primitives to manipulate the contents of files and
directories

I/O Device Management

● OS has an I/O subsystem to control and manage I/O devices such as keyboard,
monitor, printer.
● I/O subsystem consists of :
● A memory management component that includes buffering, caching &
spooling
● A general device-driver interface which hides the details of different
devices and provides a uniform device access interface.
● Drivers for specific hardware devices. Only the device driver knows the
peculiarities of the specific device.
Storage ( Disk ) Management
● Usually, the capacity of main memory is limited and not enough to
accommodate all data and program in a typical computer. Moreover, all the
data stored is lost when power is lost or switched off. Thus, it is required to use
secondary storage in a computer system to backup main memory
● OS is responsible for following activities
● Allocate space on disk ( Storage Allocation )
● Manage unused ( free ) space available on disk ( Free-space
management )
● Perform disk scheduling
Enforce Security ( Protection System)
● Protection refers to any mechanism used to control access of processes,
programs or users to the resources.
● Protection mechanism must provide:
○ means for control to be imposed ( authentication & authorization )
○ means for enforcement ( password, token, biometric - read, write,
execute)
○ OS grants proper permissions to processes accessing memory segments,
files, CPU cycles etc
○ Accounting of system activities
Facilitate Network Communication

● OS generalize the network access as a form of file access by


providing maximum transparency.
● OS provides secured protocols ( FTP, NFS etc. ) as well as
general protocols ( http ) for communication between systems in
the network.
Detection & Recovery of System Errors
● OS should ensure appropriate action to ensure correct and consistent computing
● Common functionalities:
○ Exception handling
○ Memory protection
○ File system integrity checks
○ Redundancy and error correction
○ Watchdog timers
○ Event logging and reporting
○ Automatic restart and recovery
Types of Operating Systems

● Batch Systems
● Multiprogramming Systems
● Time sharing systems
● multiprocessor systems
● real time systems
Batch OS

● Batch is a set of jobs with similar


needs. For example jobs that need
memory, jobs that need i/o etc.
● A batch processing system services Disadvantages
individual jobs from a batch of jobs ● No interaction between user
● Users submit their jobs to an and computer
● No mechanism to prioritise
operator. Operator ( simple batch
the processes or jobs
OS )will places similar need jobs in ● CPU is often in idle state
batches. A special monitor program Memory layout because the speed of I/O
manages the jobs in batch devices are slower than
CPU.
Multiprogramming OS

● In a multiprogramming OS, the


CPU will never be idle and keeps
on processing some program.
● The operating system keeps several Disadvantages
jobs in memory simultaneously as
● Users can not interact
shown in figure.
directly with the system.
Advantages
● Need sophisticated CPU
● Efficient CPU Utilization Scheduling, I/O
● Increased throughput Management, File
● Efficient memory utilization Protection, Memory
Memory layout Protection etc.
Time Sharing OS
● It is an extension of a multiprogramming
system in which the CPU executes
multiple jobs by frequently switching
among them.
● The users can interact with their
program while it is running. Disadvantages
● As numbers of users are interacting with the
● Here, processor time is shared among
processor at the same time, it is more complex
multiple users. than a multiprogramming OS.
Advantages ● System must have memory management and
● User can interact with the job while it is protection, since several jobs are kept in memory
at the same time.
executing, but it is not possible in batch
● Disk management is also required.
system.
● Requires complex CPU scheduling scheme.
● Efficient CPU utilization
Multiprocessor Systems
Multiprocessor systems ( also known as parallel systems
or tightly coupled systems ) have more than one processor
in close communication, sharing the computer bus, the
clock, and sometimes memory and peripheral devices
Three main Advantages In SMP, all processors are peers. There is no
Increased throughput : More work can be done in less master-slave relationship exists between processors
time by using more than one processors

Economy of Scale : Multiprocessor system can save more


money than multiple single processors because they can
share peripherals, mass storage , and power supplies.

Increased Reliability :If functions can be distributed


properly among several processors, then the failure of one Asymmetric multiprocessor systems: Some
processors act as masters and other systems as slaves.
processor will not halt the system. The master processor schedules and allocates work to
the slave processors
Real time OS ( RTOS ) ● There are two types of RTOS
1) Hard Real time system
● RTOS is the brain of Real time systems. ▪ Tasks have to be performed on time
● RTOS should work with a bounded response time ▪ There may be a failure, if the response takes too long
● In RTOS, the task will be completed within a ▪ Failure to meet deadlines is fatal
specified time . Eg: Control systems for aircraft, nuclear reactors,
● It is used in embedded systems in the real world. missiles, robotics etc.
● Main goal is to generate the correct result within 2) Soft real time system
specified time constraints. If these time constraints ▪ Accuracy of the system will be less , if response time
are not met , the system will fail. is too long
● Priority-based preemptive scheduling is generally ▪ Late completion of jobs is undesirable , but not
used in RTOS fatal
● Memory management is less demanding because ▪ It is not mandatory to meet deadlines. System
processes generally do not move between main performance degrades as more and more jobs miss
memory and hard disk. But protection and sharing deadlines
is essential. Eg:- multimedia, virtual reality systems, undersea
exploration etc.

You might also like