0% found this document useful (0 votes)
23 views16 pages

Operating System Notes

The document outlines the essential concepts and functions of operating systems, including their types, services, and components. It details various operating systems such as Batch, Multi-programmed, Time-Sharing, Multi-Processing, Distributed, Real-Time, and Mobile OS, along with their advantages and disadvantages. Additionally, it discusses command-line interfaces and specific operating systems like MS-DOS and UNIX, highlighting their features and limitations.

Uploaded by

rutujahalale
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)
23 views16 pages

Operating System Notes

The document outlines the essential concepts and functions of operating systems, including their types, services, and components. It details various operating systems such as Batch, Multi-programmed, Time-Sharing, Multi-Processing, Distributed, Real-Time, and Mobile OS, along with their advantages and disadvantages. Additionally, it discusses command-line interfaces and specific operating systems like MS-DOS and UNIX, highlighting their features and limitations.

Uploaded by

rutujahalale
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/ 16

GOVERNMENT RESIDENTIAL WOMEN’S POLYTECHNIC, LATUR

DEPARTMENT OF COMPUTER ENGINEERING


Sub Name:-Operating System (OSY-315319)
Unit one:-Operating System Services and Components
MSBTE Syllabus Contents of First Unit :-

TLO 1.1 Describe Unit - I Operating System services and components


functions of an Operating 1.1 Operating System: concept, functions
System. 1.2 Different types of Operating System: Batch Operating System,
TLO 1.2 Explain different Multi-programmed, Time Shared Operating System, Multiprocessor
services of Operating System, Distributed System, Real Time System, Mobile OS (Android
System. OS)
1 TLO 1.3 Explain use of 1.3 Command line based Operating System: DOS, UNIX GUI based
system call of Operating Operating System: WINDOWS, LINUX, MaC OS
System. 1.4 Different Services of Operating System, System Calls: Concept,
TLO 1.4 Explain activities types of system calls
of Operating System in 1.5 Operating System Components: Process Management, Main
concern with their Memory Management, File Management, IO Management, Secondary
components. Storage Management

An Introduction to Operating System


An operating system acts as an intermediary between the user of a computer and
computer hardware. In short its an interface between computer hardware and user.
 The purpose of an operating system is to provide an environment in which a user
can execute programs conveniently and efficiently.
 An operating system is software that manages computer hardware and software.
The hardware must provide appropriate mechanisms to ensure the correct
operation of the computer system and to prevent user programs from interfering
with the proper operation of the system.
 The operating system (OS) is a program that runs at all times on a computer. All
other programs, including application programs, run on top of the operating system.
 It does assignment of resources like memory, processors and input / output
devices to different processes that need the resources. The assignment of
resources has to be fair and secure.

The Operating System as a User Interface:-


1. User (Interacts with the system)
2. System and application programs (Software tools for the user)
3. Operating system (Manages hardware and software resources)
4. Hardware (Physical computing devices)
Every general-purpose computer consists of hardware, an operating system(s), system
programs and application programs. The hardware consists of memory, CPU, ALU, I/O
devices, peripheral devices and storage devices. The system program consists of
compilers, loaders, editors, OS, etc.
Every computer must have an operating system to run other programs. The operating
system coordinates the use of the hardware among the various system programs and
application programs for various users. It simply provides an environment within which
other programs can do useful work.
An OS is a package of some programs that runs on a computer machine, allowing it to
perform efficiently. It manages the simple tasks of recognizing input from the keyboard,
managing files and directories on disk, displaying output on the screen and controlling
peripheral devices.

Functions of the Operating System:-

 Resource Management: The operating system manages and allocates memory,


CPU time, and other hardware resources among the various programs and
processes running on the computer.
 Process Management: The operating system is responsible for starting, stopping,
and managing processes and programs. It also controls the scheduling of
processes and allocates resources to them.
 Memory Management: The operating system manages the computer's primary
memory and provides mechanisms for optimizing memory usage.
 Security: The operating system provides a secure environment for the user,
applications, and data by implementing security policies and mechanisms such as
access controls and encryption.
 Job Accounting: It keeps track of time and resources used by various jobs or
users.
 File Management: The operating system is responsible for organizing and
managing the file system, including the creation, deletion, and manipulation of files
and directories.
 Device Management: The operating system manages input/output devices such
as printers, keyboards, mice, and displays. It provides the necessary drivers and
interfaces to enable communication between the devices and the computer.
 Performance Monitoring: The operating system provides tools for monitoring and
optimizing system performance, including identifying bottlenecks, optimizing
resource usage, and analyzing system logs and metrics.
 Error-detecting Aids: These contain methods that include the error messages,
and other debugging and error-detecting methods.

Different Types of Operating Systems

1. Batch Operating System:-


This type of operating system does not interact with the computer directly. There is an
operator which takes similar jobs having the same requirements and groups them into
batches. It is the responsibility of the operator to sort jobs with similar needs. Batch
Operating System is designed to manage and execute a large number of jobs efficiently
by processing them in groups.

Advantages of Batch Operating System


 Multiple users can share the batch systems.
 The idle time for the batch system is very little.
 It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System
 CPU is not used efficiently. When the current process is doing IO, the CPU is free
and could be utilized by other processes waiting.
 The other jobs will have to wait for an unknown time if any job fails.
 In a batch operating system, average response time increases as all processes are
processed one by one.

2. Multi-Programming Operating System:-


Multiprogramming Operating Systems can be simply illustrated as more than one
program is present in the main memory and any one of them can be kept in execution.
This is used for better utilization of resources.
Advantages of, Multi-Programming Operating System
 CPU is better utilized, and the overall performance of the system improves.
 It helps in reducing the response time.

3. Time-sharing Operating systems / Multi-tasking:-


It is a type of Multiprogramming system with every process running in round robin
manner. Each task is given some time to execute so that all the tasks work smoothly.
Each user gets the time of the CPU as they use a single system. These systems are
also known as Multitasking Systems. The task can be from a single user or different
users. The time that each task gets to execute is called quantum. After this time
interval is over, the OS switches over to the next task.

Advantages of Time-Sharing OS
 Each task gets an equal opportunity.
 Fewer chances of duplication of software.
 CPU idle time can be reduced.
 Resource Sharing: Time-sharing systems allow multiple users to share hardware
resources such as the CPU, memory, and peripherals, reducing the cost of
hardware and increasing efficiency.

Disadvantages of Time-Sharing OS
 One must take care of the security and integrity of user programs and data.
 Data communication problem.
 High Overhead: Time-sharing systems have a higher overhead than other
operating systems due to the need for scheduling, context switching, and other
overheads that come with supporting multiple users.
 Complexity: Time-sharing systems are complex and require advanced software to
manage multiple users simultaneously. This complexity increases the chance of
bugs and errors.
 Reliability Problem.

4. Multi-Processing Operating System:-


A Multi-Processing Operating System is a type of Operating System in which more than
one CPU is used for the execution of resources. It betters the throughput of the System.

Advantages of a Multi-User Operating System


 It increases the throughput of the system as processes can be parallelized.
 As it has several processors, so, if one processor fails, we can proceed with
another processor.

5. Distributed Operating System:-


These types of operating systems are a recent advancement in the world of computer
technology and are being widely accepted all over the world and, that too, at a great
pace. Various autonomous interconnected computers communicate with each other
using a shared communication network. Independent systems possess their own
memory unit and CPU. Systems. These systems' processors differ in size and function.
The major benefit of working with these types of operating systems is that it is always
possible that one user can access the files or software which are not present on his
system but on some other system connected within this network, i.e., remote access is
enabled within the devices connected to that network.

Advantages of Distributed Operating System


 Failure of one will not affect the other network communication, as all systems are
independent of each other.
 Electronic mail increases the data exchange speed.
 Since resources are being shared, computation is highly fast and durable.
 Load on host computer reduces.

Disadvantages of Distributed Operating System


 Failure of the main network will stop the entire communication.
 To establish distributed systems, the language is not yet well-defined.
 These types of systems are not readily available as they are very expensive. Not
only that the underlying software is highly complex and not understood well yet.

6.Real-Time Operating System:-


These types of OSs serve real-time systems. The time interval required to process and
respond to inputs is very small. This time interval is called response time. Real-time
systems are used when there are time requirements that are very strict like missile
systems, air traffic control systems, robots, etc.
Types of Real-Time Operating Systems
 Hard Real-Time Systems: Hard Real-Time OSs are meant for applications where
time constraints are very strict, and even the shortest possible delay is not
acceptable. These systems are built for saving lives like automatic parachutes or
airbags which are required to be readily available in case of an accident. Virtual
memory is rarely found in these systems.
 Soft Real-Time Systems: These OSs are for applications where time is less strict.

Advantages of RTOS
 Maximum Consumption: Maximum utilization of devices and systems, thus more
output from all the resources.
 Task Shifting: The time assigned for shifting tasks in these systems is very less.
For example, in older systems, it takes about 10 microseconds to shift from one
task to another, and in the latest systems, it takes 3 microseconds.
 Focus on Application: Focus on running applications and give less importance to
applications that are in the queue.

Disadvantages of RTOS
 Limited Tasks: Very few tasks run at the same time and their concentration is very
less on a 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.

7. Mobile Operating Systems (Android OS):-


Mobile operating systems are designed specifically for mobile devices such as
smartphones and tablets. Examples of such operating systems are Android and iOS.
These operating systems manage the hardware and software resources of the device,
providing a platform for running applications and ensuring a seamless user
experience.

Advantages of Mobile Operating Systems


User-Friendly Interfaces: Mobile operating systems are designed to be intuitive and
easy to use, making them accessible to a wide range of users.
Extensive App Ecosystems: The availability of a vast number of applications allows
users to customize their devices to meet their specific needs.
Connectivity Options: Mobile operating systems support multiple connectivity
options, enabling users to stay connected wherever they go.

Disadvantages Mobile Operating Systems


Battery Life Constraints: Despite advancements in power management, battery life
remains a challenge for mobile devices, especially with heavy usage.
Security Risks: Mobile devices are susceptible to various security threats, such as
malware and phishing attacks, which can compromise user data.
Fragmentation: In the case of Android, the wide range of devices and customizations
can lead to fragmentation, making it difficult for developers to ensure compatibility
across all devices.

Command Line based Operating System


Command line interface (CLI), A software tool that lets you use the keyboard to
interact with your operating system. Command-line interfaces first emerged on
computer terminals in the middle of the 1960s as a more approachable and interactive
option to the punch card-based, non-interactive interface. Any server or computer
system can be configured and navigated, and its applications run using text
commands through the use of a command line interface. A command-line interface is
built into every operating system, including Windows, Linux, and macOS, to facilitate
quicker system interaction.
Advantages of Command Line Interface
Below are some benefits of Command Line Interface:
 Remote access: CLI applications typically require fewer network resources than
GUI ones. This makes CLI applications appropriate for devices with modest
hardware resources or remote server setups. You can control servers remotely by
providing commands via a secure shell, even if your connection is slow.
 Troubleshooting: Using command line interfaces is an important skill for
developers and system administrators since it promotes a more in-depth grasp of
the underlying system. It can help you become more adept with numerous tools
and utilities while also improving mistake management.
 Efficiency: The CLI lets you perform actions on several files with a single text
command, saving you time from having to look for and click on each file
individually. You can navigate and interact with your system fast if you are familiar
with the commands. You can write scripts that carry out a variety of CLI commands
to automate tedious or repetitive tasks.
Disadvantages of Command Line Interface
Below are some risks of Command Line Interface
 Error management: Errors in command writing might cause files to be deleted or
moved to the incorrect location. You run the risk of encountering issues if you
unintentionally remove any files, especially if they hold crucial information.
 Learning curve: Acquiring command knowledge takes time. The majority of
commands are lost if they are not used on a regular basis.
 Replicate orders: The majority of commands on the command line interface
cannot be undone or reversed. As a result, using commands requires extreme
caution. The majority of the time, a command's execution is irreversible and
continues.

DOS:-
MS-DOS Operating System also called the Disk Operating system was Developed by
Microsoft for x86 personal computers. It works on the phenomenon of doing less and
getting more. It is a 16-bit operating system. A closed-source model was initially
released on August 12, 1981, and the final release on September 14, 2000.

Limitations of MS DOS Operating System:-


 It is text-based and it does not have any graphical user interface.
 Not secure to be used in any kind of public network.
 Encryption is not supported.
 Difficulty in memory access.
 Mouse cannot be used to give inputs.
Advantages of DOS:-
 Compatibility with a Wide range of hardware.
 Efficient use of system resourses.
 Simple and intuitive command-line interface.
 Stability.
 Efficient use of System resourses.
UNIX
UNIX is an innovative or groundbreaking operating system which was developed in the
1970s by Ken Thompson, Dennis Ritchie, and many others at AT&T Laboratories. It is
like a backbone for many modern operating systems like Ubuntu, Solaris, Kali Linux,
Arch Linux, and also POSIX. Originally, It was designed for developers only, UNIX
played a most important role in the development and creation of the software and
computing environments. Its distribution to government and academic institutions led to
its widespread adoption across various types of hardware components. The core part
of the UNIX system lies in its base Kernel, which is integral to its architecture, structure,
and key functionality making it the heart of the operating system.
The basic design philosophy of UNIX is to provide simple, powerful tools that can be
combined to perform complex tasks. It features a command-line interface that allows
users to interact with the system through a series of commands, rather than through a
graphical user interface (GUI).
Features of UNIX
1. Multiuser support: UNIX allows multiple users to simultaneously access the same
system and share resources.
2. Multitasking: UNIX is capable of running multiple processes at the same time.
3. Shell scripting: UNIX provides a powerful scripting language that allows users to
automate tasks.
4. Security: UNIX has a robust security model that includes file permissions, user
accounts, and network security features.
5. Portability: UNIX can run on a wide variety of hardware platforms, from small
embedded systems to large mainframe computers.
6. Communication: UNIX supports communication methods using the write
command, mail command, etc.
Advantages of UNIX
1. Stability: UNIX is known for its stability and reliability. It can run for long periods of
time without requiring a reboot, which makes it ideal for critical systems that need
to run continuously.
2. Security: UNIX has a robust security model that includes file permissions, user
accounts, and network security features. This makes it a popular choice for
systems that require high levels of security.
3. Scalability: UNIX can be scaled up to handle large workloads and can be used on
a variety of hardware platforms.
4. Flexibility: UNIX is highly customizable and can be configured to suit a wide range
of needs. It can be used for everything from simple desktop systems to complex
server environments.
5. Command-line interface: UNIX's command-line interface allows for powerful and
efficient interaction with the system.
Disadvantages of UNIX
1. Complexity: UNIX can be complex and difficult to learn for users who are used to
graphical user interfaces ( GUIs ).
2. Cost: Some UNIX systems can be expensive, especially when compared to open-
source alternatives like Linux.
3. Lack of standardization: There are many different versions of UNIX, which can
make it difficult to ensure compatibility between different systems.
4. Limited software availability: Some specialized software may not be available for
UNIX systems.
5. Steep learning curve: UNIX requires a certain level of technical knowledge and
expertise, which can make it challenging for novice users.

Graphical User Interface (GUI)


A system of interactive visual components for a computer or system software is called
a GUI (graphical user interface). GUI is the interface that uses graphical elements to
let people interact as per requirement with electronic devices including computers,
laptops, tablets, and smartphones. In terms of human-computer interaction systems or
technology, it's a very important component of software application programming
since it substitutes actions for the text-based commands in the system. Whether it's a
text file, object, image, or video as per requirement, it displays all types of required
content a user could envision in the system. Additionally, it can be featured in the
gaming platform where the resolution is visible or optimal.
Advantages of GUI
 A graphical user interface (GUI) is basically seen as more intuitive for users than a
text-based command-line interface as per requirement, such MS-DOS or the Unix-
like operating system shell process.
 It is incredibly user-friendly and readily available to all and for novices, the user
interface is rather easy to understand and uncomplicated as per requirement.
 GUI represents the now-hidden lines of command with the required graphic
elements.
 The end users must commit required instructions to memory for the software to
function properly.
Disadvantages of GUI
 An interface which is very much difficult to use will make the required tasks more
difficult for the user to complete and less effective overall processes.
 Gamers are still much affected negatively by a poor interface or surface system,
therefore it remains a problem for them to control the overall system.

Windows:-
Generally referred to as Microsoft Windows, these OS are manufactured and developed
by the tech-giant Microsoft and are the most commonly used OS for personal computers
and to some extent in mobile phones or the Windows phone. Microsoft Windows is a
collection of many graphics-oriented operating systems, first developed and launched
in 1985 by the name Windows 1.0. When it started it had the aim to provide a graphical
shell to the then-famous MS-DOS which had a character user interface, but it didn't gain
much popularity then. Slowly with the implementation of innovative features, the OS
gained popularity and soon dominated the market of the Computer Industry, owing to
its freedom of use and user-friendly environment. Let's look at the advantages and
disadvantages of using Microsoft Windows.
Advantages of Windows
1. Hardware compatibility: Almost every computer hardware manufacturing industry
supports Microsoft Windows. This makes the users buy any random computer
manufacturing brand and get the latest version of pre-loaded Microsoft Windows 11
in it.
2. Pre-loaded and available Software: Windows comes with much more user-
friendly software to make everyday task easier and if the software is not available
then one can easily get it from the Internet and run it.
3. Ease of Use: Microsoft Windows has developed by far the most user-friendly OS in
the market, keeping in mind that it serves the purpose of most types of markets in
the world. It's the most preferred OS for personal computers.
4. Game Runner: Windows supports a plethora of games manufactured till date and
comes with all the supporting base software to drive the game engine. So it's the
most popular OS among the game lovers.
Disadvantages of Windows
 Expensive: Microsoft is a closed-source OS and the license cost is really high. It's
not possible for every class of society to buy a new license every time one is
expired. The latest Windows 11 costs around 8000 to 12000 INR.
 Poor Security: Windows is much more prone to viruses and malware in
comparison to other OS like Linux or Mac in the market (microsoft defender
antivirus is also introduced in the nwe version).
 Not reliable: Windows starts to lag with time and eventually needs booting every
time and now to get back the initial speed.

Linux:-
Primarily derived from the concept of Unix, Linux became the most-prominent free and
open-source OS available to everyone in the world. It is built around the Linux kernel
and served for both desktop and server use. Linux was originally developed for personal
computers based on the Intel x86 architecture but since then it was ported to more
platforms than any other operating system. Linux has the largest installed base of all
general-purpose operating systems. It is also the leading operating system on servers
and other big iron systems such as mainframe computers, and the only OS used on
TOP500 Supercomputers. The top Linux OS are Ubuntu, Fedora, OpenSUSE, RedHat,
and many more.
Advantages of LINUX
 The OS is open-source and available free of cost to every computer user. There
are large repositories from which anyone can freely download high-quality software
for almost any task.
 Linux provides high performance for a longer time and does not require a periodic
reboot to maintain the system.
 It is one of the most secure OS and does not permit any unwanted malware and
virus into the system.
 It is designed to multitask and can perform multiple processes at the same time,
without hampering the performance of the OS.
 The OS is highly compatible and flexible to run on all modern PCs and networks.
Disadvantages of LINUX
 It is not as user-friendly as Windows and users need to struggle for a few days
before adapting to the behavior of OS.
 It is not meant for gamers since it does not support any high graphics game.
 Since there are no standard editions available for Linux, it comes with many
versions, confusing the users about what to adapt and what not.

macOS:-
macOS operating system that Apple Inc. developed especially for its Macintosh
computer series. It is the replacement for the classic MacOS. The reliability, security
features, ease of use, and compatibility with other Apple goods and services are all
well known aspects of macOS. It include a number of built in programs are for a
variety of functions, productivity, email, multimedia playing, and web browsing.

Features of macOS
 User Friendly Interface: The window and menu that makeup macOS user friendly
interface which make it simple to navigate and find the information you need.
 Built in Apps: In macOS so many apps are pre-installed like Mail for email and
Photos for picture management. similarly, safari is used for online browsing is also
pre installed in it.
 Integration with Other Apple Devices: macOS connects easily with other Apple
devices, such as the iPad, iPhone, and others. Not only you can reply to messages
and take calls, but you may even begin things on one device and complete them on
another.
 Privacy and Security: macOS is designed with security and protecting your data
from malware and viruses. By allowing you to choose which apps can access your
data.
 Updates: By apple, New features like enhancements and security patches are
frequently added to macOS through regular updates. These updates keep your
Mac operating properly and are generally simple to apply.
 Accessibility: macOS includes features like VoiceOver for visually disabled users
and Dictation for individuals who have trouble in typing.

Advantages of macOS
 Security: macOS is less vulnerable to malware and security problems than other
operating systems.
 Integration with Apple Devices: macOS has good interoperability with other
Apple products, such as iPads and iPhones, enabling smooth tasks and data
transfer.
 Multitasking: macOS has multitasking feature. which enables users to quickly and
effortlessly switch between applications and complete tasks.
 Free Productivity Applications: macOS is pre installed with a number of useful
free productivity apps.
Disadvantages of macOS
 High Cost: Compared to comparable Windows-based solutions, Mac goods are
typically more expensive, which can be a deterrent for many customers.
 Limited Software Availability: Some users may find it aggravating since Mac OS
supports fewer games and software programs than Windows.
 Lack of Hardware Customization: Those who want a more customized setup
may find that macOS offers less choices for customizing hardware.
 Incompatible File System: Moving files between the two operating systems is
challenging because the macOS file system is incompatible with Windows.

Different Services of Operating System


Program Execution
It is the Operating System that manages how a program is going to be executed. It loads
the program into the memory after which it is executed. The order in which they are
executed depends on the CPU Scheduling Algorithms. A few are FCFS, SJF, etc. When
the program is in execution, the Operating System also handles deadlock i.e. no two
processes come for execution at the same time. The Operating System is responsible
for the smooth execution of both user and system programs. The Operating System
utilizes various resources available for the efficient running of all types of functionalities.

Input Output Operations


Operating System manages the input-output operations and establishes communication
between the user and device drivers. Device drivers are software that is associated with
hardware that is being managed by the OS so that the sync between the devices works
properly. It also provides access to input-output devices to a program when needed.

Communication Between Processes


The Operating system manages the communication between processes.
Communication between processes includes data transfer among them. If the
processes are not on the same computer but connected through a computer network,
then also their communication is managed by the Operating System itself.

File Management
The operating system helps in managing files also. If a program needs access to a file,
it is the operating system that grants access. These permissions include read-only,
read-write, etc. It also provides a platform for the user to create, and delete files. The
Operating System is responsible for making decisions regarding the storage of all types
of data or files, i.e, floppy disk/hard disk/pen drive, etc. The Operating System decides
how the data should be manipulated and stored.

Error Handling
The Operating System also handles the error occurring in the CPU, in Input-Output
devices, etc. It also ensures that an error does not occur frequently and fixes the errors.
It also prevents the process from coming to a deadlock. It also looks for any type of
error or bugs that can occur while any task. The well-secured OS sometimes also acts
as a countermeasure for preventing any sort of breach of the Computer System from
any external source and probably handling them.

Resource Management
System resources are shared between various processes. It is the Operating system
that manages resource sharing. It also manages the CPU time among processes
using CPU Scheduling Algorithms. It also helps in the memory management of the
system. It also controls input-output devices. The OS also ensures the proper use of all
the resources available by deciding which resource to be used by whom.

User Interface
User interface is essential and all operating systems provide it. Users either interacts
with the operating system through the command-line interface or graphical user
interface or GUI. The command interpreter executes the next user-specified command.
A GUI offers the user a mouse-based window and menu system as an interface.

Security and Privacy


 Security : OS keep our computer safe from an unauthorized user by adding
security layer to it. Basically, Security is nothing but just a layer of protection which
protect computer from bad guys like viruses and hackers. OS provide us defenses
like firewalls and anti-virus software and ensure good safety of computer and
personal information.
 Privacy : OS give us facility to keep our essential information hidden like having a
lock on our door, where only you can enter and other are not allowed . Basically , it
respect our secrets and provide us facility to keep it safe.

Time Management
Imagine traffic light as (OS), which indicates all the cars(programs) whether it should
be stop(red)=>(simple queue), start(yellow)=>(ready queue),move(green)=>(under
execution) and this light (control) changes after a certain interval of time at each side of
the road(computer system) so that the cars(program) from all side of road move
smoothly without traffic.

Sytem Calls:-
A system call is a programmatic way in which a computer program requests a service
from the kernel of the operating system on which it is executed. A system call is a way
for programs to interact with the operating system. A computer program makes a
system call when it requests the operating system's kernel. System call provides the
services of the operating system to the user programs via the Application Program
Interface(API). System calls are the only entry points into the kernel system and are
executed in kernel mode.
 A user program can interact with the operating system using a system call. A
number of services are requested by the program, and the OS responds by
launching a number of systems calls to fulfill the request.
 A system call can be written in high-level languages like C or Pascal or in assembly
language. If a high-level language is used, the operating system may directly
invoke system calls, which are predefined functions.
 A system call is initiated by the program executing a specific instruction, which
triggers a switch to kernel mode, allowing the program to request a service from
the OS. The OS then handles the request, performs the necessary operations, and
returns the result back to the program.
 System calls are essential for the proper functioning of an operating system, as
they provide a standardized way for programs to access system resources. Without
system calls, each program would need to implement its methods for accessing
hardware and system services, leading to inconsistent and error-prone behavior.

Types Of System Calls:-


1. Process Control:
 These system calls manage the lifecycle of processes.
 Examples include creating new processes (fork), terminating processes (exit), waiting for
processes to finish (wait), and managing process attributes.
 These are fundamental for multitasking and enabling programs to run concurrently.
2. File Management:
 This category handles operations related to files and directories.
 System calls include creating files (open), reading from files (read), writing to files (write), deleting
files (unlink), and managing file permissions.
 They are essential for any program that needs to store or retrieve data persistently.

3. Device Management:
 These calls allow processes to interact with hardware devices.
 Examples include reading from and writing to devices (read, write), controlling device attributes
(ioctl), and managing device access.
 They enable programs to communicate with hardware components like printers, keyboards, and
network interfaces.
4. Information Maintenance:
 This type provides access to system-level information.
 Examples include getting the current time (time), getting process IDs (getpid), and managing
system configuration settings.
 These calls allow programs to retrieve and modify system-wide data.
5. Communication:
 These system calls facilitate communication between processes.
 They enable processes to exchange data, either on the same machine (inter-process
communication or IPC) or over a network.
 Examples include creating pipes (pipe), sharing memory (shmget, mmap), and sending
messages.

Operating System Components

Process Management:-
A process is a program in execution. It consists of the followings:
 Executable program
 Program data
 Stack and stack pointer
 Program counter and other CPU registers
 Details of opened files
A process can be suspended temporarily and the execution of another process can be
taken up. A suspended process can be restarted later. Before suspending a process,
its details are saved in a table called the process table so that it can be executed later
on. An operating system supports two system calls to manage processes Create and
Kill -
 Create a system call used to create a new process.
 Kill system call used to delete an existing process.
A process can create a number of child processes. Processes can communicate
among themselves either using shared memory or by message-passing techniques.
Two processes running on two different computers can communicate by sending
messages over a network.
Main Memory Management:-
Main memory is a flexible and volatile type of storage device. It is a large sequence of
bytes and addresses used to store volatile data. Main memory is also called Random
Access Memory (RAM), which is the fastest computer storage available on PCs. It is
costly and low in terms of storage as compared to secondary storage devices.
Whenever computer programs are executed, it is temporarily stored in the main memory
for execution. Later, the user can permanently store the data or program in the
secondary storage device.

File Management:-
Files are used for long-term storage. Files are used for both input and output. Every
operating system provides a file management service. This file management service
can also be treated as an abstraction as it hides the information about the disks from
the user. The operating system also provides a system call for file management. The
system call for file management includes:
 File creation
 File deletion
 Read and Write operations
Files are stored in a directory. System calls provide to put a file in a directory or to
remove a file from a directory. Files in the system are protected to maintain the privacy
of the user. Below shows the Hierarchical File Structure directory.

I/O Device Management:-


The I/O device management component is an I/O manager that hides the details of
hardware devices and manages the main memory for devices using cache and
spooling. This component provides a buffer cache and general device driver code that
allows the system to manage the main memory and the hardware devices connected to
it. It also provides and manages custom drivers for particular hardware devices.
The purpose of the I/O system is to hide the details of hardware devices from the
application programmer. An I/O device management component allows highly efficient
resource utilization while minimizing errors and making programming easy on the entire
range of devices available in their systems.

Secondary Storage Management


Broadly, the secondary storage area is any space, where data is stored permanently
and the user can retrieve it easily. Your computer’s hard drive is the primary location for
your files and programs. Other spaces, such as CD-ROM/DVD drives, flash memory
cards, and networked devices, also provide secondary storage for data on the
computer. The computer’s main memory (RAM) is a volatile storage device in which all
programs reside, it provides only temporary storage space for performing
tasks. Secondary storage refers to the media devices other than RAM (e.g. CDs, DVDs,
or hard disks) that provide additional space for permanent storing of data and software
programs which is also called non-volatile storage.

You might also like