0% found this document useful (0 votes)
6 views17 pages

PPS (BCS-101) UNIT-1 Operating System Linker Loader

An operating system (OS) serves as an intermediary between application programs and hardware, facilitating program execution and hardware control. It can be classified based on interface (CUI/GUI), cost (free/paid), and user type (single/multi-user, batch processing, etc.), each having its own advantages and disadvantages. Key functions of an OS include process management, memory management, and file system management, ensuring efficient resource allocation and system performance.

Uploaded by

xl8phantom
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)
6 views17 pages

PPS (BCS-101) UNIT-1 Operating System Linker Loader

An operating system (OS) serves as an intermediary between application programs and hardware, facilitating program execution and hardware control. It can be classified based on interface (CUI/GUI), cost (free/paid), and user type (single/multi-user, batch processing, etc.), each having its own advantages and disadvantages. Key functions of an OS include process management, memory management, and file system management, ensuring efficient resource allocation and system performance.

Uploaded by

xl8phantom
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/ 17

Operating System: Operating System acts as an interface/Intermediary

between the application programs and the machine hardware.


 Operating System is a System software, which makes a computer to actually
work.
 It provides an environment for execution of programs (application software).
 The OS organizes and controls the hardware.
 Examples: DOS, Windows, Android, Unix, Linux and Mac OS, etc.

An operating system performs basic tasks such as,

Mr. Sharvan Kumar (CSE) Page 1 of 17


Classification or Type of Operating System:

1. Based on View/Interface :
1. CUI : Character User Interface (DOS, UNIX)
2. GUI : Graphical User Interface (Windos, Linux, MacOS, Andorid)

2. Based on Cost:
1. Free/Open-Source OS
2. Paid or proprietary OS

Mr. Sharvan Kumar (CSE) Page 2 of 17


3. Based on User Usage/Type:
1. Single User OS
2. Multi User OS or Network Operating System
3. Batch Processing Operating System
4. Multi-Programming
5. Time Sharing
6. Distributed
7. Realtime Operating System
8. Embeded Operating System
1. Single User Operating System :
 Single user Operating system allows a single user to execute one program at
a particular time.
 This operating system is designed especially for wireless phones and two-way
messaging.
 Some functions such as printing a document, and downloading images and
videos are performed in one given frame.

2. Multiuser Opearating System :

Mr. Sharvan Kumar (CSE) Page 3 of 17


3. Batch operating system : The users of batch operating system
do not interact with the computer directly. Each user prepares his job
on an off-line device like punch cards and submits it to the computer
operator. To speed up processing, jobs with similar needs are batched
together and run as a group. Thus, the programmers left their
programs with the operator. The operator then sorts programs into
batches with similar requirements.

Advantages of Batch Processing


 Once the data process is started, the computer can be left running
without supervision.
 Batch processing allows an organization to increase efficiency because
a large number of transactions can be combined into a batch rather
than processing them each individually.
Disadvantages of Batch Processing
 It is very difficult to maintain the priority between the batches.
 There is no direct interaction of user with computer. Lack of
interaction between the user and job.
 CPU is often idle, because the speeds of the mechanical I/O devices is
slower than CPU.
 Difficult to provide the desired priority.
 With batch processing there is a time delay before the work is
processed and returned.

4. Multiprogramming System : In a multiprogramming system


there are one or more programs loaded in main memory which are
ready to execute. Only one program at a time is able to get the CPU for
executing its instructions (i.e., there is at most one process running
on the system) while all the others are waiting their turn.

The main idea of multiprogramming is to maximize the use of CPU


time. Indeed, suppose the currently running process is performing an
I/O task (which, by definition, does not need the CPU to be
accomplished). Then, the OS may interrupt that process and give the

Mr. Sharvan Kumar (CSE) Page 4 of 17


control to one of the other in-main-memory programs that are ready
to execute (i.e. process context switching).

In this way, no CPU time is wasted by the system waiting for the I/O
task to be completed, and a running process keeps executing until
either it voluntarily releases the CPU or when it blocks for an I/O
operation.

Therefore, the ultimate goal of multi programming is to keep the CPU


busy as long as there are processes ready to execute.

Note that in order for such a system to function properly, the OS must
be able to load multiple programs into separate areas of the main
memory and provide the required protection to avoid the chance of
one process being modified by another one.

Other problems that need to be addressed when having multiple


programs in memory is fragmentation as programs enter or leave the
main memory.

Another issue that needs to be handled as well is that large programs


may not fit at once in memory which can be solved by
using pagination and virtual memory.

Finally, note that if there are N ready processes and all of those are
highly CPU-bound (i.e., they mostly execute CPU tasks and none or
very few I/O operations), in the very worst case one program might
wait all the other N-1 ones to complete before executing.
Advantages of Multi Programming Operating System
 Increase CPU utilization and reduce CPU idle time.
 It decreases total read time needed to execute a job as the jobs are in
main memory.
Disadvantages of Multi Programming Operating System
 It is fairly sophisticated and more complex as compared to
Uniprogramming system.
 Process can consume more than available memory. In such case
system slows down or it may hang some time.

Mr. Sharvan Kumar (CSE) Page 5 of 17


5. Time sharing system : 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.

Advantages of Time Sharing System


 More than one user can execute their task simultaneously. ü
 Avoids duplication of software
 CPU Idle time is reduced and better utilization of resources.
 Provide advantage of quick response.
Disadvantages of Time Sharing System
 Question of securing the security and integrity of user’s data and
programs.
 Since multiple processes are managed simultaneously, so it requires
an adequate management of main memory
 Problem of reliability.

Mr. Sharvan Kumar (CSE) Page 6 of 17


6. Distributed Operating Systems : 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.
The advantages of distributed systems are following.
 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.
 Better service to the customers.
 Reduction of the load on the host computer.
 Reduction of delays in data processing
Disadvantages
1. Security problem due to sharing
2. Some messages can be lost in the network system
3. Bandwidth is another problem if there is large data then all network
wires to be replaced which tends to become expensive
4. Overloading is another problem in distributed operating systems
5. If there is a database connected on local system and many users
accessing that database through remote or distributed way then
performance become slow
6. The databases in network operating is difficult to administrate then
single user system

Mr. Sharvan Kumar (CSE) Page 7 of 17


7. Real time system : Real time system is defines as a data
processing system in which the time interval required to process and
respond to inputs is so small that it controls the environment.

Real time processing is always on line whereas on line system need


not be real time. The time taken by the system to respond to an input
and display of required updated information is termed as response
time. So in this method response time is very less as compared to the
online processing.

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-
applicance controllers, Air traffic control system etc.

There are two types of real-time operating systems.


1. Hard real-time systems Hard real-time systems guarantee that
critical tasks complete on time. In hard real-time systems secondary
storage is limited or missing with data stored in ROM. In these
systems virtual memory is almost never found.
2. Soft real-time systems Soft real time systems are less restrictive.
Critical real-time task gets priority over other tasks and retains the
priority until it completes. Soft real-time systems have limited utility
than hard real-time systems. For example, Multimedia, virtual reality,
Advanced Scientific Projects like undersea exploration and planetary
rovers etc.
Advantages of Real Time Operating System
 Better task scheduling as compared to manual process and time
deadlines achievement is guaranteed in most of the cases.
 Accelerate the process by automanaging the system resources as in
the case of Autopilot airplanes and railway e-ticket booking system.
Disadvantages of Real Time Operating System
 If time dead lines are missed it may result in severe disastrous
situation.
 Complex and need additional kernel, Memory and other resources are
required.
 More vulnerable to security breaches like virus and
unauthorized access.

Mr. Sharvan Kumar (CSE) Page 8 of 17


8. Embedded operating system : An embedded operating system
is a specialized operating system for use in the computers that are
integrated into larger electrical systems.

The embedded computer - running an embedded operating system


specialised for only one particular need of the computer - provides
data processing power to handle incoming data.

They are specifically configured for a certain hardware configuration.


These are designed to be compact, resource efficient and reliable. The
OS is installed on an internal memory chip rather than a hard disk

Examples: Printers, washing machines, mp3 players, radios, Symbian


used in cell phones (nokia) .

Mr. Sharvan Kumar (CSE) Page 9 of 17


Functions of the Operating System
The operating system performs the following functions:

1. Process Management

Process is a program in execution. Process management is a key feature of an operating


system that handles the creation, planning, execution, and termination of processes or tasks
within a computer system. The main components of process management are listed below.

 Process Creation: Creating new processes is the operating system’s responsibility. It


allows the resources required for the process to run, including memory and data
structures. This may involve loading the program code and initializing variables.
 Process Scheduling: The OS manages the execution of processes fairly and
efficiently.
 Process Execution: After scheduling a process, the operating system hands over
control of the CPU to the said process, enabling it to execute its instructions. The
CPU follows a sequential process of executing instructions. The computer program
retrieves directions from its memory and performs computations or actions
accordingly. Throughout its execution, it may communicate with other processes,
request further resources, or interact with input/output devices.
 Process Termination: A process may terminate when it has finished running or when
an error or exception occurs. The operating system reclaims the resources allotted to
the terminated process. Ensuring we keep all relevant data structures up-to-date, free
up memory, and properly close any open files. Once a system terminates the process,
it is removed from the system, freeing up its resources for other processes to use.
 Process Synchronization and Communication: To share data or coordinate
activities, processes may have to synchronize their execution or communicate. The
operating system has synchronization mechanisms, such as semaphores, locks, and
monitors, to ensure that processes can safely access shared resources and prevent
conflicts. Inter-process communication mechanisms like shared memory, message
passing, and pipes enable processes to exchange data and coordinate activities.

Mr. Sharvan Kumar (CSE) Page 10 of 17


 Process States and Control: The operating system maintains track of details about
every process, such as its current state, priority, and resource utilization. A process
can be in various states, such as running, waiting, or ready. The operating system
controls the changes between these modes depending on circumstances like I/O
completion, timer interrupts, or resource availability. It manages process execution,
switching between them and dynamically allocating resources according to their
requirements.

2. Memory Management

Memory management plays a vital role in any operating system. It encompasses the
allocation, tracking, and deallocation of computer memory resources. Its main objective is to
effectively use currently available memory to facilitate the execution of processes and
applications.

 Allocation: The operating system allocates memory to processes or applications when


they load into memory. Allocating sufficient memory to each process is necessary to
guarantee it can complete its duties and handle memory fragmentation problems.

 Deallocation: After a process finishes or gets terminated, the operating system will
release the memory used by the process. This will allow the memory to be used for
other purposes in the future.
 Address Mapping: The operating system handles address mapping, which translates
the logical addresses utilized by processes into physical addresses in the memory.
 Paging and Swapping: Memory management techniques such as paging and
swapping enable processes to utilize more memory than is physically available.
Paging divides the memory into fixed-size pages while swapping moves inactive
processes or parts of them to secondary storage, freeing up physical memory.
 Memory Protection: To ensure data integrity and security, the operating system has
memory protection mechanisms that prevent one process from accessing or altering
the memory of another process.
 Virtual Memory: By using virtual memory, the operating system can give each
process the appearance of having its own dedicated memory space. The system
utilizes physical memory and secondary storage, transferring data between the two
when necessary.

3. File System Management

Managing the file system is an essential task performed by an operating system. It involves
arranging, storing, and retrieving files on various storage devices. I can provide you with a
detailed explanation of File System Management:

 File Organization: The file system controls how files are arranged logically and
systematically on storage systems. It maintains a directory structure that makes it
simple for users to navigate and locate files. This organization can incorporate
directories and subdirectories for the hierarchical organization of files.
 File Creation and Deletion: Users can easily create and delete files using the file
system. When creating a new file, users can specify its name, location, and initial
contents. Similarly, users can delete no longer required files, freeing up storage space.

Mr. Sharvan Kumar (CSE) Page 11 of 17


 File Access and Permissions: The file system manages file access and enforces
permissions to uphold data security and protect privacy. Users or user groups are
assigned permissions, such as read, write, and execute, to regulate their ability to
view, modify, or execute files. This ensures the protection of sensitive data and
restricts unauthorized access.
 File Operations: The file system offers several ways to perform different file
operations. These operations involve reading data from a file, writing data to a file,
adding data to an existing file, changing the read/write pointer position, and resizing
or truncating a file. These operations allow users and applications to manipulate the
content of files efficiently.
 File Metadata Management: The file system stores and manages Metadata related to
each file. File name, size, creation and modification dates, file owner, and permissions
are just a few examples of the information included in the metadata.
 File System Integrity and Recovery: The file system implements mechanisms to
guarantee the integrity and recoverability of files and file system data. It uses
techniques like journaling or transaction logs to keep track of changes and recover
from system problems or failures. This assists in avoiding data corruption and
preserving the file system’s consistency.

4. Device Management

Device Management is an essential task for an operating system. It involves regulating and
coordinating the communication between the computer system and its input/output (I/O)
devices. Here is an explanation of Device Management:

 Device Drivers: Device drivers, which are software components that permit
communication between the operating system and particular hardware devices, are
made available by the operating system. It manages the low-level functions of a
device, such as data transmission and receiving, resource management, and
converting device-specific directives into a format that the operating system can
understand.
 Device Allocation: The management of device allocation to different users or
processes is handled by the operating system. It manages device access and prevents
conflicts between requests for the same device. Assigning device access involves
determining whether access is exclusive or shared, depending on priorities,
permissions, and scheduling policies.
 Device Configuration: The operating system configures the device by identifying
and detecting hardware attached to the computer system. Every device is classified
based on its type, capabilities, and characteristics and configured for optimal
performance. This includes creating communication channels, initializing device
drivers, and setting device parameters.
 Device Input and Output: The operating system uses devices to manage input and
output processes. It controls the data flow between the computer system, input devices
(such as keyboards and mice), and output devices (like monitors and printers). The
operating system transfers data accurately, buffered as necessary, and synchronized
with the operation of processes or applications.
 Device Synchronization: The operating system offers synchronization techniques to
manage how devices and processes interact. It manages the order and timing of device
operations to avoid data inconsistencies or conflicts. Synchronization may involve

Mr. Sharvan Kumar (CSE) Page 12 of 17


locking, signaling, or interrupt handling to ensure proper device access and data
integrity.

5. User Interface

The method through which users interact with a computer system or software application
refers to as the user interface (UI). Users can enter commands, access system operations, and
receive output or feedback from the system using the interface, which can be visual or tactile.

 Graphical User Interface (GUI): GUIs display system functions through icons,
menus, buttons, and windows, allowing users to interact with the system by clicking
or tapping. The design of these tools prioritizes user-friendliness and intuitive
navigation to ensure effortless completion of tasks.
 Command-Line Interface (CLI): CLI is a text-based system where users input
commands through a keyboard. Advanced users and system administrators prefer CLI
interfaces for direct control and scripting abilities. It’s highly efficient for executing
complex commands and performing repetitive tasks.
 Menu-Driven Interface: Menu-driven interfaces present users with a list of options.
They are often used in more straightforward applications or for a streamlined user
experience.
 Natural Language Interface: With a natural language interface, users can
communicate with a system using regular, human language. They can input
commands or questions in a natural sentence, and the system will interpret and
respond appropriately. These interfaces commonly use artificial intelligence and
natural language processing techniques to understand and process user input.
 Touch-Based Interface: Developers create touch-based interfaces explicitly for
devices with touchscreens, such as smartphones and tablets. These interfaces enable
users to interact with the system through direct touch on the screen and gestures such
as tapping, swiping, or pinching. Touch-based interfaces offer intuitive and tactile
interactions, which help users navigate, select options, and perform actions using their
fingers.

6. Security and Protection

Ensuring the safety and protection of a computer system, its resources, and the data it
processes are essential functions of an operating system.

 Access Control: To protect the system resources, the operating system uses access
control mechanisms that only allow authorized users or processes to access them. It
enforces authentication methods, manages user accounts, and sets permissions to
restrict access to sensitive data, networks, devices, and files.
 Data Encryption: The operating system has built-in features that safeguard sensitive
information from being accessed or intercepted by unauthorized individuals using
data encryption techniques. Encryption algorithms and cryptographic protocols
utilized during transmission and storage ensure data security from unauthorized
access or tampering.
 Malware Detection and Prevention: The operating system includes security
measures to detect and prevent malware infections. These measures include antivirus
software, firewalls, and intrusion detection systems designed to detect and mitigate

Mr. Sharvan Kumar (CSE) Page 13 of 17


security threats such as viruses, worms, trojans, and unauthorized network access
attempts.
 Firewalls and Intrusion Detection Systems: The network has firewalls and intrusion
detection systems that oversee and manage all incoming and outgoing traffic. They
filter out any malicious or unauthorized activities. Firewalls stop unauthorized
network connections, while intrusion detection systems identify and respond to
suspicious behavior or security breaches.

7. Network Management

Network management refers to administering, monitoring, and optimizing computer networks


to ensure efficient and secure operation. It involves processes, tools, and methodologies to
maintain the network’s performance, reliability, and security. Network management tasks can
vary depending on the size and complexity of the network, ranging from small local area
networks (LANs) to large-scale wide area networks (WANs) and data centers.

Key aspects of network management include:

 Network Monitoring: Managing a network requires ongoing monitoring of devices


like routers, switches, firewalls, servers, and network links. Monitoring tools collect
data on network performance, traffic patterns, and device health, allowing
administrators to identify and address issues proactively.

 Network Configuration Management: Configuration management includes


maintaining and updating network device configurations. Network administrators
ensure proper configuration of devices, adherence to best practices, and
implementation of necessary changes when required.
 Network Troubleshooting: When network issues occur, network management
involves troubleshooting to identify and resolve the root causes of problems.
Troubleshooting may include analyzing logs, conducting packet captures, and using
network diagnostic tools.
 Network Performance Optimization: Network managers work to optimize the
network’s performance, ensuring efficient data flow and minimizing delays or
bottlenecks. This may involve load balancing, traffic shaping, and QoS (Quality of
Service) configuration.

8. Control over system performance

Controlling system performance is critical to managing computer systems and ensuring their
efficient operation. It involves various techniques and tools to monitor, optimize, and
maintain the performance of hardware, software, and networks to meet user expectations and
requirements. Controlling system performance helps avoid bottlenecks, reduce response
times, and maximize resource utilization.

9. Job Accounting

In computing, job accounting, also known as workload accounting or resource accounting,


involves tracking and recording resource usage and performance metrics of individual jobs or
tasks. It gathers information on resource usage by different processes, applications, or users,
aiding in billing, performance analysis, capacity planning, and optimization. Job accounting

Mr. Sharvan Kumar (CSE) Page 14 of 17


is commonly used in multi-user systems, high-performance computing clusters, cloud
computing environments, and shared hosting services.

10. Error Detecting aids

Mechanisms and techniques used in computing and communication systems identify and
detect errors or anomalies that may occur during data transmission, processing, or storage.
These are known as error-detecting aids. These aids are crucial for maintaining data integrity,
ensuring information accuracy, and improving systems’ reliability.

11. Co-ordination between software and users

Operating systems are crucial in coordinating and managing various software tools like
interpreters, compilers, assemblers, and other applications for different users in a computer
system. They handle resource allocation, process management, communication, and security,
enabling a seamless and efficient user experience while executing different software tools.

Mr. Sharvan Kumar (CSE) Page 15 of 17


Interpreter

Mr. Sharvan Kumar (CSE) Page 16 of 17


Mr. Sharvan Kumar (CSE) Page 17 of 17

You might also like