OS Practical
OS Practical
The study of hardware and software requirements of different operating systems involves
analyzing the minimum and recommended specifications needed for these systems to
function effectively. Here’s an overview of the hardware and software requirements for the
mentioned operating systems:
1. UNIX
Hardware Requirements:
o Processor: Originally designed for PDP-11, now supports modern
architectures like x86, ARM, SPARC, etc.
o Memory (RAM): Varies depending on the distribution, but generally requires
4MB–16MB minimum for older UNIX systems.
o Storage: At least 100MB for basic installations; modern UNIX systems
require more for additional packages.
o Peripherals: Support for network interfaces, basic I/O devices.
Software Requirements:
o Written in C, requiring a C compiler for development and updates.
o Requires shell environments (Bourne, Korn, or C shell).
o Utilities for file management, networking, and programming.
2. Linux
Hardware Requirements:
o Processor: Pentium 233 MHz or faster (recommended: 300 MHz).
o Memory (RAM):
Minimum: 64MB.
Recommended: 128MB or more.
o Storage:
Minimum: 1.5GB of free space.
Recommended: 3GB or more for updates and software.
o Graphics: SVGA (800x600) or higher resolution.
o Peripherals: Support for USB, CD/DVD drives, and network adapters.
Software Requirements:
o DirectX 8.1 or higher for multimedia applications.
o Internet Explorer 6 for web browsing (initial release).
o .NET Framework for certain applications.
4. Windows 7
Hardware Requirements:
o Processor: 1 GHz or faster (32-bit or 64-bit).
o Memory (RAM):
Minimum: 1GB (32-bit), 2GB (64-bit).
Recommended: 4GB or more for advanced applications.
o Storage:
Minimum: 16GB (32-bit), 20GB (64-bit).
o Graphics: DirectX 9-capable graphics card with WDDM 1.0 or higher driver.
o Peripherals: Support for USB, CD/DVD drives, and network interfaces.
Software Requirements:
o DirectX 11 for multimedia and gaming.
o Internet Explorer 8 (default browser).
o Compatibility with most Windows XP applications through compatibility
mode.
5. Windows 8
Hardware Requirements:
o Processor: 1 GHz or faster with PAE, NX, and SSE2 support.
o Memory (RAM):
Minimum: 1GB (32-bit), 2GB (64-bit).
Recommended: 4GB or more.
o Storage:
Minimum: 16GB (32-bit), 20GB (64-bit).
o Graphics: Microsoft DirectX 9-capable with WDDM 1.0 driver.
o Peripherals: USB 2.0/3.0 support, DVD drive for installation media.
Software Requirements:
o Windows Store for app installation.
o Internet Explorer 10 or later.
o Support for .NET Framework and legacy applications.
Key Takeaways:
UNIX and Linux systems are versatile and can be adapted to a wide range of
hardware, making them suitable for embedded systems to high-performance servers.
Windows XP has very modest requirements, reflecting its era, but is now outdated
and unsupported.
Windows 7/8 introduced modern features, higher resource requirements, and better
multimedia support compared to XP.
Each operating system's requirements are tailored to the technology and use cases of its time,
with newer systems requiring more advanced hardware to handle improved functionality and
security features.
Implementing CPU scheduling policies in C requires simulating how each policy allocates
CPU time to processes based on specific rules. Here is an explanation and implementation for
each policy.
Explanation:
Non-preemptive scheduling.
The process with the shortest burst time is executed first.
Minimizes average waiting time.
C Implementation:
#include <stdio.h>
void sjf(int n, int bt[], int p[]) {
int wt[n], tat[n], total_wt = 0, total_tat = 0;
int i, j, temp;
int main() {
int n = 4;
int bt[] = {6, 8, 7, 3};
int p[] = {1, 2, 3, 4};
printf("SJF Scheduling:\n");
sjf(n, bt, p);
return 0;
}
2. Priority Scheduling
Explanation:
Non-preemptive scheduling.
Process with the highest priority (lowest priority number) is executed first.
If two processes have the same priority, scheduling may fall back to FCFS.
C Implementation:
#include <stdio.h>
// Sort by priority
for (i = 0; i < n - 1; i++) {
for (j = i + 1; j < n; j++) {
if (pr[i] > pr[j]) {
temp = pr[i]; pr[i] = pr[j]; pr[j] = temp;
temp = bt[i]; bt[i] = bt[j]; bt[j] = temp;
temp = p[i]; p[i] = p[j]; p[j] = temp;
}
}
}
wt[0] = 0;
for (i = 1; i < n; i++) {
wt[i] = wt[i - 1] + bt[i - 1];
total_wt += wt[i];
}
int main() {
int n = 4;
int bt[] = {10, 5, 8, 6};
int p[] = {1, 2, 3, 4};
int pr[] = {2, 1, 4, 3};
printf("Priority Scheduling:\n");
priorityScheduling(n, bt, p, pr);
return 0;
}
Explanation:
Non-preemptive scheduling.
Processes are executed in the order they arrive.
Simple but can lead to high average waiting time due to the "convoy effect."
C Implementation:
#include <stdio.h>
wt[0] = 0;
for (i = 1; i < n; i++) {
wt[i] = wt[i - 1] + bt[i - 1];
total_wt += wt[i];
}
int main() {
int n = 4;
int bt[] = {8, 4, 2, 6};
int p[] = {1, 2, 3, 4};
printf("FCFS Scheduling:\n");
fcfs(n, bt, p);
return 0;
}
Explanation:
Processes are divided into different queues based on priority or type (e.g., system,
interactive, batch).
Each queue can have its own scheduling algorithm.
Scheduling between queues can use priority or round-robin.
C Implementation (Conceptual):
#include <stdio.h>
void multiLevelQueue() {
printf("Multi-Level Queue Scheduling simulation:\n");
printf("Queue 1: System processes (Round Robin)\n");
printf("Queue 2: Interactive processes (SJF)\n");
printf("Queue 3: Batch processes (FCFS)\n");
// Logic for simulating queues and switching between them would be more extensive.
}
int main() {
multiLevelQueue();
return 0;
}
Summary: