Lecture 2, OS
Lecture 2, OS
An Operating System performs all the basic tasks like managing files, processes, and
memory. Thus operating system acts as the manager of all the resources, i.e. resource
manager. Thus, the operating system becomes an interface between user and machine.
Types of Operating Systems: Some widely used operating systems are as follows-
Advantages of RTOS:
• Maximum Consumption: Maximum utilization of devices and system, thus
more output from all the resources
• Task Shifting: The time assigned for shifting tasks in these systems are very
less. For example, in older systems, it takes about 10 microseconds in shifting
one task to another, and in the latest systems, it takes 3 microseconds.
• Focus on Application: Focus on running applications and less importance to
applications which are in the queue.
• Real-time operating system in the embedded system: Since the size of
programs are small, RTOS can also be used in embedded systems like in
transport and others.
• Error Free: These types of systems are error-free.
• Memory Allocation: Memory allocation is best managed in these types of
systems.
Disadvantages of RTOS:
• Limited Tasks: Very few tasks run at the same time and their concentration is
very less on few applications to avoid errors.
• Use heavy system resources: Sometimes the system resources are not so
good and they are expensive as well.
• Complex Algorithms: The algorithms are very complex and difficult for the
designer to write on.
• Device driver and interrupt signals: It needs specific device drivers and
interrupts signals to respond earliest to interrupts.
• Thread Priority: It is not good to set thread priority as these systems are very
less prone to switching tasks.
• Program execution
• I/O operations
• File System manipulation
• Communication
• Error Detection
• Resource Allocation
• Protection
Program execution
Operating systems handle 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 −
I/O Operation
An I/O subsystem comprises of I/O devices and their corresponding driver software. Drivers hide
the peculiarities of specific hardware devices from the users.
An Operating System manages the communication between user and device drivers.
• 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.
Communication
In case of distributed systems which are a collection of processors that do not share memory,
peripheral devices, or a clock, the operating system manages communications between all the
processes. Multiple processes communicate with one another through communication lines in the
network.
The 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 −
Error handling
Errors can occur anytime and anywhere. An 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
−
Protection
Considering a computer system having multiple users and concurrent execution of multiple
processes, the various processes must be protected from each other's activities.
Protection refers to a mechanism or a way to control the access of programs, processes, or users
to the resources defined by a computer system. Following are the major activities of an operating
system with respect to protection −