Assignment 1
Assignment 1
PRINCIPLES OF OPERATING
SYSTEMS
Submitted To:
Mam Memoona Malik
Submitted By:
Shoaib Hasan SP22-BAI-045
Shugufta Zehra SP22-BAI-046
Easha Altaf SP22-BAI-010
Semester:
5th
Program:
BAI
COMSATS UNIVERSITY ISLAMABAD
Ans.
Free and open-source software (FOSS) refers to software that meets two essential criteria:
1. Free to Use: You can use the software for any purpose, personal, commercial, or
educational, without paying any licensing fees.
2. Open Source: The source code, the underlying code that makes the software function, is
freely available for anyone to inspect, modify, and distribute.
Freedom to Use: Users are free to run the software for any purpose.
Freedom to Modify: You can change the source code and create your own modified versions
of the software.
Freedom to Share: You can share the software and your modifications with others, freely
redistributing it.
Freedom to Contribute: You can contribute to the improvement of the software by fixing
bugs, adding new features, and submitting your changes back to the project.
Ans. A Linux distribution, often abbreviated as distro, is a complete operating system built around
the Linux kernel. It's like a pre-packaged box containing the essential ingredients (kernel) and a
variety of tools, applications, and libraries needed to run a functional computer system.
Linux Kernel: The core component, responsible for managing hardware resources like
memory, CPU, and device drivers. It acts as the bridge between the hardware and software.
Distributions: Different organizations or individuals package the Linux kernel with additional
software to cater to specific needs or user preferences. These additional components can
include:
o Package Managers: Tools to easily install, update, and remove software
applications.
o Desktop Environments: Graphical user interfaces (GUIs) that provide a user-friendly
way to interact with the system. Popular options include GNOME, KDE Plasma
o Applications: A wide range of software programs for various tasks, like web
browsing, office productivity, multimedia, and development tools.
o Configuration Tools: Utilities to manage system settings, network configuration, and
user accounts.
Q3: Compare
User Interface Primarily mouse and keyboard-driven, Primarily touch-based interface, with optional
(UI) with optional touch support. stylus support on some devices.
Processing More processing power for demanding Lower processing power for battery efficiency.
Power tasks.
Multitasking More efficient multitasking capabilities. Limited multitasking capabilities
Connectivity Wired and wireless connectivity options. Primarily wireless connectivity (Wi-Fi, Cellular)
Examples Windows, macOS, Linux Android, iOS, iPadOS
Ans.
Purpose Handle time-sensitive events, exceptions Request services from the kernel
Examples Timer ticks, device I/O completion, errors File access, memory allocation, process
creation.
Ans.
Hybrid kernels, micro kernels, and modular kernels are different design approaches in operating
system (OS) kernel architecture. Each approach has its own advantages and trade-offs.
Hybrid Kernel:
Combines Aspects: Attempts to balance the benefits of both microkernels and monolithic
kernels. It has a smaller kernel than a monolithic kernel but includes some essential device
drivers and functionalities within the kernel space for performance reasons.
Security: Offers a balance between security (smaller kernel) and performance (essential
drivers in kernel space).
Complexity: More complex than a microkernel but potentially simpler than a monolithic
kernel depending on the design.
Examples: Windows NT, NetWare, BeOS
Micro kernel:
Design Philosophy: Minimalist approach. The microkernel itself only provides the most
essential functionalities like memory management, process management, and inter-process
communication (IPC).
Security: Considered more secure because a smaller kernel attack surface reduces potential
vulnerabilities.
Performance: This may have slightly lower performance compared to monolithic or hybrid
kernels due to the overhead of message passing between the microkernel and device drivers
or services running in user space.
Flexibility: Highly modular. Device drivers and other services run in separate user-space
processes, allowing for easier updates and customization without affecting the core kernel.
Examples: Mach (used in early versions of macOS), QNX
Modular Kernel:
Focus on Modularity: A modular kernel shares some characteristics with microkernels but
emphasizes the concept of modules. The core kernel provides essential functionalities, while
device drivers and other services can be loaded as modules at runtime.
Flexibility: Like microkernels, modular kernels offer flexibility and easier updates by adding
or removing modules as needed.
Performance: This can offer good performance due to the ability to load only required
modules, reducing kernel size and context switching.
Examples: Linux kernel (with modules)
The choice of kernel architecture depends on factors like performance requirements, security needs,
and desired level of flexibility.
Microkernels: Ideal for security-critical systems where a smaller attack surface is paramount.
Monolithic Kernels: Traditionally favoured for performance-oriented systems where raw
speed is a priority.
Hybrid Kernels: Offer a compromise between security and performance for general-purpose
systems.
Modular Kernels: Provide a balance between flexibility, performance, and security, making
them popular choices for modern operating systems like Linux.
Q5: Suppose you need to design a complete operating system for an Intel computer system
which behaves as a client in a client-server architecture. The client computer system uses
a single Intel microprocessor, 8 GB RAM, 256 GB solid state drive and standard
input/output devices. Clearly state the functions that your operating system will provide
if you would select the micro-kernel OS structure. Provide appropriate diagrams to
support your answer.
Ans.
Here are the main functions the operating system would provide:
Memory Management: The microkernel manages the allocation and deallocation of physical
memory for processes running in user space. It ensures no process can directly access memory used
by another process or the kernel itself.
Device Management (Basic): The microkernel might handle basic device initialization and interrupt
handling. However, complex device drivers would likely run in user space for increased flexibility and
security.
Process Management: This includes creating, scheduling, and managing processes. Since we're
aiming for a micro-kernel architecture, most of the operating system services will be implemented as
user-space servers, including device drivers and file systems.
Inter-Process Communication (IPC): Facilitating communication between client processes and server
processes. This would include message-passing mechanisms and possibly shared memory for
efficient data exchange.
File System Management: Managing access to files stored on the 256 GB solid-state drive, including
file permissions, directory structure, and file caching.
Security: Implementing security measures such as access control mechanisms to ensure that client
processes can only access resources they're authorized to use.
Diagram
___________________________
| User Processes |
|___________________________|
|
___________|___________
| Micro-Kernel OS |
|_________________________|
| Process Management |
| Memory Management |
| Inter-Process Comm. |
| Device Management |
| Security |
|_________________________|
|____________________|___________________|
|____________________| Permissions) |
| Hardware |
In this diagram:
User processes interact with the micro-kernel, which provides essential OS services like process
management, memory management, IPC, device management, file system management, and
security.
Device drivers and the file system are implemented as separate user-space server processes,
interacting with the micro-kernel through well-defined interfaces.
This architecture keeps the kernel minimal, improving system stability, scalability, and security, while
allowing for easy extensibility and maintenance.