Os Operating System
Os Operating System
Operating System
An Operating System is a System software that manages all the resources of the computing deice.
Acts as an interface between the software and different parts of the computer or the computer hardware.
Manages the overall resources and operations of the computer.
Controls and monitors the execution of all other programs that reside in the computer, which also
includes application programs and other system software of the computer.
Examples of Operating Systems are Windows, Linux, macOS, Android, iOS, etc.
Let us now see some of the objectives of the operating system, which are mentioned below.
Convenient to use: One of the objectives is to make the computer system more convenient to use in an
efficient manner.
User Friendly: To make the computer system more interactive with a more convenient interface for the
users.
Easy Access: To provide easy access to users for using resources by acting as an intermediary between
the hardware and its users.
Management of Resources: For managing the resources of a computer in a better and faster way.
Controls and Monitoring: By keeping track of who is using which resource, granting resource requests,
and mediating conflicting requests from different programs and users.
Fair Sharing of Resources: Providing efficient and fair sharing of resources between the users and
programs.
2
Embedded Operating Systems: Embedded Operating Systems are designed to run on devices with
limited resources, such as smartphones, wearable devices, and household appliances. Examples include
Google’s Android and Apple’s iOS.
Cluster Operating Systems: Cluster Operating Systems are designed to run on a group of computers, or
a cluster, to work together as a single system. They are used for high-performance computing and for
applications that require high availability and reliability. Examples include Rocks Cluster Distribution
and OpenMPI.
a) Kernel
The kernel is the core part of an OS that manages system resources and allows communication between
hardware and software. It handles:
b) Process Management
c) Memory Management
e) Device Management
3
Services Provided by an Operating System
a) Process Execution
b) Resource Allocation
f) Networking
h) Device Communication
4
A system call is a mechanism that allows user-level applications to request services from the operating
system (OS). These calls act as an interface between user programs and the OS kernel, enabling programs to
access low-level system resources such as file management, process control, and memory operations.
1. Process Control
o Create, execute, and terminate processes.
o Example system calls:
fork() – Creates a new process.
exec() – Replaces the current process with a new program.
exit() – Terminates a process.
wait() – Waits for a child process to finish execution.
2. File Management
o Operations related to files, such as creation, deletion, and modification.
o Example system calls:
open() – Opens a file.
read() – Reads data from a file.
write() – Writes data to a file.
close() – Closes an open file.
unlink() – Deletes a file.
3. Device Management
o Handles input/output (I/O) operations.
o Example system calls:
ioctl() – Controls device parameters.
read() – Reads data from an I/O device.
write() – Writes data to an I/O device.
4. Memory Management
o Allocates and deallocates memory.
o Example system calls:
brk() – Adjusts the size of the process's data segment.
mmap() – Maps files or devices into memory.
munmap() – Unmaps memory.
5. Communication (Interprocess Communication - IPC)
o Facilitates communication between processes.
o Example system calls:
pipe() – Creates a pipe for communication.
shmget() – Allocates shared memory.
msgsnd() – Sends a message to a message queue.
msgrcv() – Receives a message from a message queue.
socket() – Creates a network socket.
1. A user application initiates a system call using a library function (e.g., printf() calls write()).
2. The system call is transferred to the kernel via a trap instruction.
3. The kernel performs the requested operation.
4. The result is returned to the user program.
5
Example: File Reading Using read()
c
CopyEdit
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
int main() {
char buffer[100];
int fd = open("file.txt", O_RDONLY);
if (fd < 0) {
perror("Error opening file");
return 1;
}
read(fd, buffer, sizeof(buffer));
printf("Data: %s\n", buffer);
close(fd);
return 0;
}
In this example:
System Program
A System Program is a type of software designed to manage and control the hardware and software
resources of a computer system. It serves as an interface between the hardware and the user applications,
enabling efficient system operations.
1. Operating System (OS) – Manages hardware, software, and system resources. Examples: Windows,
Linux, macOS.
2. Device Drivers – Enable communication between the OS and hardware devices like printers,
keyboards, and GPUs.
3. Utility Programs – Perform maintenance tasks, such as disk cleanup, file management, and antivirus
scanning.
4. Compilers and Interpreters – Convert programming code into machine language for execution.
5. Linkers and Loaders – Link different program modules and load them into memory for execution.
6. Shells and Command-Line Interfaces – Provide an interface for users to interact with the system
(e.g., Bash, PowerShell).
6
Operating System Structure
The structure of an operating system (OS) defines how its components are organized and interact to
perform system-level functions efficiently. The OS structure ensures resource management, process
coordination, and system stability.
Types of Operating System Structures
1. Monolithic Architecture
The OS is a single, large program where all services (e.g., process management, file system, memory
management) reside in the kernel.
Fast but less modular and difficult to modify/debug.
Examples: UNIX, MS-DOS.
Diagram:
sql
CopyEdit
+--------------------+
| Application Layer |
+--------------------+
| System Calls |
+--------------------+
| Kernel (Single Layer) |
+--------------------+
| Hardware |
+--------------------+
2. Layered Architecture
The OS is divided into multiple layers, each built on top of the lower one.
Provides better modularity and abstraction.
Slower due to layer-to-layer communication.
Examples: THE OS, MULTICS.
Diagram:
sql
CopyEdit
+--------------------+
| User Interface |
+--------------------+
| Application Layer |
+--------------------+
| File System Layer |
+--------------------+
| Process Management |
+--------------------+
| Memory Management |
+--------------------+
| Hardware Control |
+--------------------+
| Hardware |
+--------------------+
7
3. Microkernel Architecture
The kernel is minimal and handles only core functions like communication and scheduling.
Other services run in user space, improving security and stability.
More modular but has performance overhead due to frequent user/kernel mode switches.
Examples: MINIX, QNX, macOS.
Diagram:
sql
CopyEdit
+--------------------+
| Applications |
+--------------------+
| System Services |
+--------------------+
| Microkernel (Minimal) |
+--------------------+
| Hardware |
+--------------------+
Diagram:
diff
CopyEdit
+--------------------+
| Applications |
+--------------------+
| Kernel Modules |
+--------------------+
| Core Kernel |
+--------------------+
| Hardware |
+--------------------+
Diagram:
diff
CopyEdit
+----------------------+
| Guest OS (VM 1) |
8
| Guest OS (VM 2) |
| Guest OS (VM 3) |
+----------------------+
| Hypervisor |
+----------------------+
| Host OS |
+----------------------+
| Hardware |
+----------------------+
Conclusion
Different OS structures are used based on performance, security, and modularity requirements. Monolithic
kernels are fast but complex, while microkernels offer better security. Hybrid and modular architectures
are the most widely used today.
A Virtual Machine (VM) is a software-based simulation of a physical computer that runs an operating
system (OS) and applications just like a real machine. It allows multiple OS instances to share the same
physical hardware while remaining isolated from each other.
A Virtual Machine (VM) is an abstraction of a physical computer created using virtualization technology.
It provides a complete execution environment, including CPU, memory, storage, and network interfaces.
Use Cases:
Use Cases:
A hypervisor is software that creates and manages virtual machines by allocating system resources like
CPU, RAM, and storage.
Types of Hypervisors:
1. Type 1 (Bare-Metal) Hypervisors:
o Runs directly on hardware.
o More efficient and secure.
o Examples: VMware ESXi, Microsoft Hyper-V, Xen.
2. Type 2 (Hosted) Hypervisors:
o Runs on top of a host OS.
10
o Easier to install but slower than Type 1.
o Examples: VirtualBox, VMware Workstation.
Feature Type 1 Hypervisor Type 2 Hypervisor
Runs on Hardware Yes No (Runs on OS)
Performance High Moderate
Security High Moderate
Example VMware ESXi, Xen VirtualBox, VMware Workstation
📌 VMs are ideal for running multiple OSes, while containers are better for lightweight application
virtualization.
Cloud Computing – AWS, Google Cloud, Azure use VMs to provide scalable infrastructure.
Software Development & Testing – Developers use VMs to test applications across different OS
environments.
Server Virtualization – Enterprises consolidate multiple servers into fewer physical machines.
Security & Sandboxing – Malware testing and penetration testing in isolated VM environments.
Legacy System Support – Running old OSes on modern hardware.
8. Conclusion
11
Virtual Machines are a crucial technology in cloud computing, enterprise IT, and software development.
They provide a way to run multiple OS environments efficiently and securely. While containers are gaining
popularity for lightweight applications, VMs remain essential for full OS virtualization.
Definition of Windows OS
Windows operating system is a computer program that manages all computer resources and provides
services to applications that run on top of it. This operating system was developed by Microsoft and released
in 1985 under the name Windows 1.0. Since then, the Windows operating system has continued to evolve
and become one of the most popular operating systems in the world. The Windows operating system is
designed to run on various types of hardware, including desktops, laptops, servers, and mobile devices.
Windows uses a graphical user interface (GUI) that allows users to interact with the computer through icons,
buttons, and visual menus, rather than using text commands like other operating systems. Windows also has
many features such as multitasking capability, which allows several applications to run simultaneously, as
well as plug-and-play capability that makes it easy for users to connect additional devices such as printers,
scanners, and cameras.
History of Windows OS
This OS was first introduced by Microsoft in 1985 and has since undergone many developments and
evolutions.
Windows 1.0, the first version of this OS, was released in November 1985. This OS was the first graphical
operating system designed for commercial use and could be used on PCs using Intel 8086 or 8088
processors. Windows 1.0 had a simple interface and offered support for several applications, such as
Paintbrush, Write, and Calculator.
In 1987, Microsoft released Windows 2.0. This OS offered several improvements and enhancements
compared to the previous version, including support for more applications, the ability to run multiple
programs simultaneously, and the introduction of drag-and-drop functionality.
Windows 3.0, released in 1990, was the first truly popular Windows operating system. Windows 3.0 offered
a more modern and user-friendly interface, support for more programs, and the ability to run multiple
programs simultaneously. In addition, Windows 3.0 also included the introduction of features such as File
Manager and Program Manager.
Windows 95, released in 1995, was a very popular Windows operating system and a milestone for modern
operating systems. Windows 95 offered a completely new interface, which included the Start button and
Taskbar, as well as support for plug-and-play hardware. Windows 95 also added support for 32-bit programs
and introduced features such as Windows Explorer, Internet Explorer, and Microsoft Office software.
After Windows 95, Microsoft released several other versions of Windows, including Windows 98, Windows
2000, Windows XP, Windows Vista, Windows 7, Windows 8, and Windows 10. Each version of this OS
offered different improvements and fixes, including performance improvements, enhanced interface, support
for new hardware and software, and better security features.
The Windows operating system has undergone incredible evolution since it was first launched in 1985. Each
version of Windows offers different improvements and fixes, and this operating system remains one of the
most popular in the world to this day.
12
Providing Compatibility: The Windows operating system is designed to support various hardware and
software devices, making it easier for users to install and use different applications and programs on their
computers or laptops. Windows also provides the ability to run programs and applications designed for
different versions of the Windows operating system.
Facilitating Network Setup: Windows operating system provides various tools to facilitate network setup,
such as network configuration, firewall configuration, and network access configuration. This allows users
to connect to networks and share data with other devices in the network easily.
Facilitating Security: The Windows operating system provides various security features such as anti-virus,
anti-malware, and firewall that help protect computers or laptops from virus and malware attacks. Windows
also provides tools to configure network security and access control to protect user’s important data.
Managing File Management: Windows also facilitates file management such as data storage, access rights
configuration, and file searching. Windows provides various tools to help users organize and store data and
files on their computers or laptops.
Facilitating System Setup: Windows provides various tools for system setup such as desktop appearance
configuration, sound and visual effects configuration, and operating system updates. This makes it easy for
users to configure and update the operating system according to their needs and preferences.
Providing Technical Support: Windows provides technical support for users in the form of customer
service, tutorials, and documentation. This helps users solve problems and optimize the use of Windows
operating system on their computers or laptops.
Advantages:
Wide Compatibility: Windows has extensive compatibility with various hardware and software devices,
making it possible for users to use different types of devices with this operating system.
Ease of Use: Windows is designed with a user-friendly and familiar user interface for many people, making
it easy to learn and use even for new users.
Rich Multimedia Features: Windows provides many multimedia features, such as Windows Media Player,
that allow users to play various types of audio and video files easily.
Large Developer Support: There are many developers who make applications and games for Windows, so
users can choose from a variety of application and game options available.
Long-term Support: Microsoft provides long-term support for each version of Windows, which means
users can receive updates and security support for several years after its release.
Disadvantages:
Vulnerability to Malware: As the most widely used operating system in the world, Windows is also more
vulnerable to virus and malware attacks, so users need to be more cautious in using it.
Hardware Requirements: Windows requires relatively high hardware requirements, making it difficult for
users with older computers or laptops to use the latest version of Windows.
Cost: Windows is not a free operating system, so users need to purchase a license to use it, which can be
expensive.
Having too many features: In some cases, Windows can be too complicated with too many features, so
users have to take the time to learn and understand these features.
In conclusion, Windows OS has its strengths and weaknesses like any other operating system. However, its
wide compatibility and large developer support make it the top choice for many users. Users should take
note of these shortcomings and ensure to take necessary security measures to protect their devices from virus
and malware attacks.
What is Taskbar
13
The Taskbar is a user interface component in Microsoft’s Windows operating system that provides quick
access to open apps, files, and system settings. It is usually found at the bottom of the screen and allows
quick access to key features including the Start menu and task manager.
The taskbar is the bar at the bottom of the screen. The taskbar has one button for each window on the
desktop. When multiple programs are running, the button for each program is created in the toolbar. Users
can navigate between these programs by simply clicking the program’s button. The Taskbar should be
assessed based on the following criteria, and additional factors should also be taken into consideration for its
evaluation.
Taskbar
Components of the Taskbar
Start button: The Start button is present at the bottom-left corner of the taskbar. When we click on the
Sart button the Start menu appears. The Start menu displays a list of options to perform various tasks on
the computer. We can start a program, search for a program, shut down the computer, etc. Using the
Start button.
Search box: The search box helps us to easily find anything on the computer or the internet.
Task View : To the right of the Search bar is the Task View button. It helps the user to view windows
that are opened. The user can easily switch between open windows, or close them.
Pinned programs and File Explorer: To the right of Task View there is File Explorer and few pinned
programs. File Explorer provides users a shortcut way to view the contents present in the computer.
Notification area: This area is located at the bottom-right corner of the taskbar. Notification area
displays time and date.
Show desktop button: Show desktop button is located to the right end of the notification area.
What is a Desktop
The graphical user interface (GUI) or display area that appears on our screen is called a desktop on
a computer. When working on the system, a desktop gives us a visual representation that gives us a
set of tools and shortcuts on our screen to access files, documents, apps, etc. It is quite easy to
switch between different desktops and we may create many desktops on our computers without
having to close the other ones. Our desktops are customizable to fit our requirements and tastes. To
improve the appearance of the desktop, we can change the wallpaper on it. To give the desktop an
orderly appearance, the icons can be moved across the screen and customized. Additionally, we
can make shortcuts and add them to the desktop screen for easy accessibility and usage.
14