Operating System Unit 1
Operating System Unit 1
An operating system is a framework that enables user application programs to interact with
system hardware. The operating system does not perform any functions on its own, but it
provides an atmosphere in which various apps and programs can do useful work. The operating
system may be observed from the point of view of the user or the system, and it is known as
the user view and the system view. In this article, you will learn the views of the operating
system.
Viewpoints of Operating System
The operating system may be observed from the viewpoint of the user or the system. It is
known as the user view and the system view. There are mainly two types of views of the
operating system. These are as follows:
1. User View
2. System View
User View
The user view depends on the system interface that is used by the users. Some systems are
designed for a single user to monopolize the resources to maximize the user's task. In these
cases, the OS is designed primarily for ease of use, with little emphasis on quality and none on
resource utilization.
The user viewpoint focuses on how the user interacts with the operating system through the
usage of various application programs. In contrast, the system viewpoint focuses on how the
hardware interacts with the operating system to complete various tasks.
1. Single User View Point
Most computer users use a monitor, keyboard, mouse, printer, and other accessories to
operate their computer system. In some cases, the system is designed to maximize the output
of a single user. As a result, more attention is laid on accessibility, and resource allocation is less
important. These systems are much more designed for a single user experience and meet the
needs of a single user, where the performance is not given focus as the multiple user systems.
2. Multiple User View Point
Another example of user views in which the importance of user experience and performance is
given is when there is one mainframe computer and many users on their computers trying to
interact with their kernels over the mainframe to each other. In such circumstances, memory
allocation by the CPU must be done effectively to give a good user experience. The client-server
architecture is another good example where many clients may interact through a remote
server, and the same constraints of effective use of server resources may arise.
3. Handled User View Point
Moreover, the touchscreen era has given you the best handheld technology ever. Smartphones
interact via wireless devices to perform numerous operations, but they're not as efficient as a
computer interface, limiting their usefulness. However, their operating system is a great
example of creating a device focused on the user's point of view.
4. Embedded System User View Point
Some systems, like embedded systems that lack a user point of view. The remote control used
to turn on or off the tv is all part of an embedded system in which the electronic device
communicates with another program where the user viewpoint is limited and allows the user to
engage with the application.
System View
The OS may also be viewed as just a resource allocator. A computer system comprises various
sources, such as hardware and software, which must be managed effectively. The operating
system manages the resources, decides between competing demands, controls the program
execution, etc. According to this point of view, the operating system's purpose is to maximize
performance. The operating system is responsible for managing hardware resources and
allocating them to programs and users to ensure maximum performance.
From the user point of view, we've discussed the numerous applications that require varying
degrees of user participation. However, we are more concerned with how the hardware
interacts with the operating system than with the user from a system viewpoint. The hardware
and the operating system interact for a variety of reasons, including:
1. Resource Allocation
The hardware contains several resources like registers, caches, RAM, ROM, CPUs, I/O
interaction, etc. These are all resources that the operating system needs when an application
program demands them. Only the operating system can allocate resources, and it has used
several tactics and strategies to maximize its processing and memory space. The operating
system uses a variety of strategies to get the most out of the hardware resources, including
paging, virtual memory, caching, and so on. These are very important in the case of various user
viewpoints because inefficient resource allocation may affect the user viewpoint, causing the
user system to lag or hang, reducing the user experience.
2. Control Program
The control program controls how input and output devices (hardware) interact with the
operating system. The user may request an action that can only be done with I/O devices; in
this case, the operating system must also have proper communication, control, detect, and
handle such devices.
user and operating system interface
The user and operating system are connected with each other with the help of interface, so
interface is used to connect the user and OS.
In computers there are different types of interface that can be used for connection with
computers to users and their connection is responsible for data transfer.
Also, in computers there are different interfaces. These interfaces are not necessarily used but
can be used in computers whenever it is needed. So, different types of tasks can be performed
by the help of different interfaces.
• Process Control
• File Management
• Device Management
• Information Maintenance
• Communication
Now, you will learn about all the different types of system calls one-by-one.
Process Control
Process control is the system call that is used to direct the processes. Some process control
examples include creating, load, abort, end, execute, process, terminate the process, etc.
File Management
File management is a system call that is used to handle the files. Some file management
examples include creating files, delete files, open, close, read, write, etc.
Device Management
Device management is a system call that is used to deal with devices. Some examples of device
management include read, device, write, get device attributes, release device, etc.
Information Maintenance
Information maintenance is a system call that is used to maintain information. There are some
examples of information maintenance, including getting system data, set time or date, get time
or date, set system data, etc.
Communication
Communication is a system call that is used for communication. There are some examples of
communication, including create, delete communication connections, send, receive messages,
etc.
• A decline in consistency.
• Exokernel interfaces have a complex architecture.
• Complexity: More complex to design and manage due to coordination between kernel
and user-space.
• Performance Overhead: Switching between kernel and user modes can introduce
delays.
• Increased Development Time: More time-consuming to develop and debug.
• Less Mature Ecosystem: Fewer tools and community support compared to simpler
architectures.
• Potential Security Flaws: Increased complexity may lead to more subtle security
vulnerabilities.
Process Scheduling
The process scheduling is the activity of the process manager that handles the removal of the
running process from the CPU and the selection of another process on the basis of a particular
strategy.
Types of Process Schedulers
There are three types of process schedulers:
1. Long Term or Job Scheduler
It brings the new process to the ‘Ready State’. It controls the Degree of Multi-programming,
i.e., the number of processes present in a ready state at any point in time. It is important that
the long-term scheduler make a careful selection of both I/O and CPU-bound processes. I/O-
bound tasks are which use much of their time in input and output operations while CPU-
bound processes are which spend their time on the CPU. The job scheduler increases
efficiency by maintaining a balance between the two. They operate at a high level and are
typically used in batch-processing systems.
2. Short-Term or CPU Scheduler
It is responsible for selecting one process from the ready state for scheduling it on the
running state. Note: Short-term scheduler only selects the process to schedule it doesn’t load
the process on running. Here is when all the scheduling algorithms are used. The CPU
scheduler is responsible for ensuring no starvation due to high burst time processes.
Short Term Scheduler
The dispatcher is responsible for loading the process selected by the Short-term scheduler on
the CPU (Ready to Running State) Context switching is done by the dispatcher only. A
dispatcher does the following:
• Switching context.
• Switching to user mode.
• Jumping to the proper location in the newly loaded program.
3. Medium-Term Scheduler
It is responsible for suspending and resuming the process. It mainly does swapping (moving
processes from main memory to disk and vice versa). Swapping may be necessary to improve
the process mix or because a change in memory requirements has overcommitted available
memory, requiring memory to be freed up. It is helpful in maintaining a perfect balance
between the I/O bound and the CPU bound. It reduces the degree of multiprogramming.