Module 1 operating system
Module 1 operating system
○ Process management
○ Memory management
○ File system management
○ Device management
○ Security.
Process Management
▪ A process is a program in execution. It is a unit of work within the system.
Program is a passive entity; process is an active entity.
▪ Process needs resources to accomplish its task
• CPU, memory, I/O, files
• Initialization data
▪ Process termination requires reclaim of any reusable resources
▪ Single-threaded process has one program counter specifying location of next
instruction to execute
• Process executes instructions sequentially, one at a time, until completion
▪ Multi-threaded process has one program counter per thread
▪ Typically system has many processes, some user, some operating system
running concurrently on one or more CPUs
• Concurrency by multiplexing the CPUs among the processes / threads
Memory Management
▪ To execute a program all (or part) of the instructions must be in memory
▪ All (or part) of the data that is needed by the program must be in memory
▪ Memory management determines what is in memory and when
• Optimizing CPU utilization and computer response to users
▪ Memory management activities
• Keeping track of which parts of memory are currently being used and by
whom
• Deciding which processes (or parts thereof) and data to move into and out
of memory
• Allocating and deallocating memory space as needed
File-system Management
▪ OS provides uniform, logical view of information storage
• Abstracts physical properties to logical storage unit - file
• Each medium is controlled by device (i.e., disk drive, tape drive)
Varying properties include access speed, capacity, data-transfer rate, access
method (sequential or random)
▪ File-System management
• Files usually organized into directories
• Access control on most systems to determine who can access what
• OS activities include
Creating and deleting files and directories
Primitives to manipulate files and directories
Mapping files onto secondary storage
Backup files onto stable (non-volatile) storage media
Mass-Storage Management
▪ Usually disks used to store data that does not fit in main memory or data that must be
kept for a “long” period of time
▪ Proper management is of central importance
▪ Entire speed of computer operation hinges on disk subsystem and its algorithms
▪ OS activities
• Mounting and unmounting
• Free-space management
• Storage allocation
• Disk scheduling
• Partitioning
• Protection
Key Functionalities of Operating Systems
Process Management:
Memory Management:
● Manages the computer’s memory resources, ensuring efficient allocation and access.
Device Management:
User Interface:
● Provides a graphical (GUI) or command-line interface for users to interact with the system.
Dual Mode operations in OS
● There are two modes of operation in the operating system to make sure it works
correctly.
● These are user mode and kernel mode.
User Mode
● The system is in user mode when the operating system is running a user application
such as handling a text editor.
● The transition from user mode to kernel mode occurs when the application requests
the help of operating system or an interrupt or a system call occurs.
● The mode bit is set to 1 in the user mode. It is changed from 1 to 0 when switching
from user mode to kernel mode.
Kernel Mode
● The system starts in kernel mode when it boots and after the operating system is loaded,
it executes applications in user mode. There are some privileged instructions that can only
be executed in kernel mode.
● These are interrupt instructions, input output management etc. If the privileged
instructions are executed in user mode, it is illegal and a trap is generated.
● The mode bit is set to 0 in the kernel mode. It is changed from 0 to 1 when switching from
kernel mode to user mode.
● In the above image, the user process executes in the user mode until it gets a
system call.
● Then a system trap is generated and the mode bit is set to zero.
● The system call gets executed in kernel mode.
● After the execution is completed, again a system trap is generated and the
mode bit is set to 1.
● The system control returns to kernel mode and the process execution
continues.
Historical Perspective of Operating Systems
1. Pre-1950s:
○ No Operating Systems: Early computers ran individual programs without an OS.
2. 1950s-1960s:
○ Batch Processing: Early OS like IBM's mainframe systems handled batch jobs in sequences.
3. 1960s-1970s:
○ Time-Sharing OS: OS such as MULTICS allowed multiple users to interact with a single
machine (e.g., UNIX).
4. 1980s:
○ Personal Computers: Introduction of GUI-based systems like MS-DOS, early Windows, and
Apple's Macintosh.
5. 1990s-Present:
○ Modern OS: Evolved into multi-tasking, virtualized, and networked environments (e.g., Linux,
macOS, Windows).
Types of Kernels
● In a Monolithic kernel, the entire operating system runs as a single program in kernel
mode.
● The user services and kernel services are implemented in the same address space.
● A monolithic kernel is a type of operating system architecture where the entire operating
system, including core functions like memory management, process management, device
drivers, and file systems, is integrated into a single large block of code running in a single
address space.
● This design can make the system faster because all components can interact directly, but
it can also make the system more complex and harder to maintain, as a bug in one part of
the kernel can potentially affect the entire system.
Types of OS
There is an operator which takes similar jobs having same requirement and group
them into batches.
smoothly.
The task can be from single user or from different users also.
Distributed Operating System
Various autonomous interconnected computers communicate each other using a
shared communication network.
Independent systems possess their own memory unit and CPU. These are referred
as loosely coupled systems or distributed systems.
Network Operating System
These systems runs on a server and provides the capability to manage data, users,
groups, security, applications, and other networking functions.
These type of operating systems allows shared access of files, printers, security,
applications, and other networking functions over a small private network.
Real-Time Operating System
Real-time systems are used when there are time requirements are very strict like
missile systems, air traffic control systems, robots etc.
These OSs are meant for the applications where time constraints are very strict
and even the shortest possible delay is not acceptable.
These OSs are for applications where for time-constraint is less strict.
Types of Operating Systems
1. Traditional OS:
○ Examples: Windows, Linux, macOS
○ Use Cases: Desktop computers, laptops, servers.
2. Cloud-Based OS:
○ Examples: Google Chrome OS, AWS OS
○ Use Cases: Cloud computing environments, virtualized services.
3. Containerized OS:
○ Examples: Docker, Kubernetes
○ Use Cases: Microservices architecture, cloud-native applications, DevOps.
4. Edge Computing OS:
○ Examples: Windows IoT, EdgeX Foundry
○ Use Cases: IoT devices, real-time data processing at the network edge.
Cloud-Based Operating Systems
Definition: Operating systems designed specifically for cloud computing environments.
Advantages
1. Cost-Effective
2. No risk of viruses
3. Easy Software upgrades
4. High Speed
Disadvantages
1. It provides limited features.
2. Cloud operating system hardware failure may cause a loss in data.
3. It needs an internet connection continuously.
4. It doesn't perform on a low-speed connection.
Cloud-Based Operating Systems
Key Features:
Examples:
● Containerization is the packaging of software code with just the operating system (OS)
libraries and dependencies required to run the code to create a single lightweight
executable—called a container—that runs consistently on any infrastructure.
● Containerization allows developers to create and deploy applications faster and more
securely.
Containerized Operating Systems
Key Features:
Examples:
● Edge computing allows devices in remote locations to process data at the "edge" of
the network, either by the device or a local server. And when data needs to be
processed in the central datacenter, only the most important data is transmitted,
thereby minimizing latency.
● To make real-time functionality possible for smart apps and IoT sensors, edge computing
solves three interrelated challenges:
○ Connecting a device to a network from a remote location.
Examples:
Virtualization: Facilitates cloud-based services and supports containerized and edge computing
environments.
Scalability & Flexibility: Supports IT growth through cloud, containers, and edge systems.
Automation & Efficiency: Enables the automation of tasks, reducing manual intervention.
Interoperability: Ensures that different software and hardware components work together
seamlessly.
Conclusion