Experiment 1: Study of Hardware and Software
Requirements of Different Operating Systems
and Installation
1. Windows OS Requirements
and Installation:-
Hardware Requirements (Windows 11):
● Processor: 1 gigahertz (GHz) or faster with at least 2
cores on a compatible 64-bit processor or system on
a chip (SoC).
● RAM: 4 GB or more.
● Storage: 64 GB or more.
● Graphics Card: DirectX 12 compatible graphics /
WDDM 2.x.
● Display: >9” display with HD resolution (720p).
● Internet: Internet connection required for certain
features and activation.
● TPM (Trusted Platform Module): Version 2.0.
Software Requirements:
● File System: NTFS.
● Boot Mode: UEFI firmware with Secure Boot capability.
● Drivers: Latest drivers for hardware
components (graphics, network, sound, etc.).
Installation Steps:
1. Download the Windows 11 ISO from the official
Microsoft website or use the Media Creation Tool.
2. Create a bootable USB using tools like Rufus or
the Media Creation Tool.
3. Insert the bootable USB into the target machine.
4. Boot into the BIOS/UEFI by pressing F2, F12, Esc, or
Del based on your device. Set the USB drive as the
first boot option.
5. Save and Exit from BIOS to boot from the USB.
6. Follow the installation wizard:
○ Select the language, time, and keyboard layout.
○ Click on "Install Now."
○ Choose between an Upgrade or
Custom Installation (for clean
installation).
○ Partition the hard drive if needed.
7. After installation, follow the prompts to complete
setup (creating a user account, setting up
preferences, etc.).
2. Ubuntu (Linux) OS Requirements and
Installation:- Hardware Requirements (Ubuntu 22.04
LTS):
● Processor: 2 GHz dual-core processor or better.
● RAM: 4 GB or more.
● Storage: 25 GB of free space or more.
● Graphics Card: VGA capable of 1024x768
screen resolution.
● Network: Internet connection for updates
and software installations.
Software Requirements:
● File System: Ext4 by default (can support
other filesystems like Btrfs, XFS).
● Boot Mode: UEFI or Legacy BIOS
supported. Installation Steps:
1. Download the Ubuntu ISO from the official
Ubuntu website.
2. Create a bootable USB using a tool like Rufus
or Etcher.
3. Insert the bootable USB into your target machine.
4. Boot into the BIOS/UEFI and set the USB drive
as the first boot option.
5. Save and Exit to boot from the USB drive.
6. Try Ubuntu without installing to test
compatibility or directly select Install Ubuntu.
7. Follow the installation wizard:
○ Select your language, keyboard layout, and
install updates during installation (if
desired).
○ Choose between Normal Installation (with
additional software) or Minimal
Installation.
○ Select Erase disk and install Ubuntu for
a clean installation or Something else for
manual partitioning.
○ Set up partitions like / (root), /home,
swap, etc., if using custom partitioning.
8. Create your user account, set time zone,
and continue installation.
9. Reboot after installation is complete, removing
the USB drive when prompted.
3. macOS Requirements and Installation:-
Hardware Requirements (macOS Sonoma):
● Processor: Apple M1, M2, or Intel
processor (certain models).
● RAM: 8 GB or more.
● Storage: 35 GB of free space for upgrade.
● Graphics: Integrated Apple Silicon GPU
or Intel-compatible graphics.
● Internet: Required for software updates and
iCloud services.
Software Requirements:
● File System: APFS (Apple File System).
● Boot Mode: Secure Boot (on Apple Silicon
Macs) or UEFI for Intel Macs.
Installation Steps:
1. Download macOS Sonoma from the Mac App Store.
2. Once downloaded, launch the installer.
3. Follow the installation wizard:
○ Select your target disk for installation.
○ Enter your password if needed.
4. The system will restart and complete the
installation process. Follow the on-
screen instructions to set up user
preferences.
5. If installing on a new drive, use Disk Utility
from macOS Recovery to format the drive in
APFS.
6. Post-installation setup involves
configuring iCloud, Siri, and other features.
Comparison of Operating Systems:-
Feature Windows 11 Ubuntu 22.04 macOS Sonoma
LTS
Processor 1 GHz, 64-bit CPU 2 GHz, dual-core Apple M1/M2 or
Intel
RAM 4 GB 4 GB 8 GB
Storage 64 GB 25 GB 35 GB (for
upgrade)
File NTFS Ext4 APFS
System
Graphics DirectX 12 VGA @ 1024x768 Integrated Apple
compatible GPU
Boot UEFI with Secure UEFI/BIOS Secure
Mode Boot Boot/UEFI
License Proprietary (Paid) Free and Open Proprietary
Source (Paid)
2. Experiment 2: Executing Various UNIX System Calls
and Setup Linux Environments:-
Part 1: Setting Up Linux Environment:-
1. Using a Virtual Machine (VM):-
You can set up a Linux environment using a VM like
VirtualBox or VMware. Here's how to do it:
1. Download and Install VirtualBox or VMware:
○ Download VirtualBox from
https://www.virtualbox.org/.
○ Download VMware from
https://www.vmware.com/.
2. Download a Linux Distribution (ISO):
○ Download an ISO image for a Linux
distribution like Ubuntu, CentOS, or
Fedora from their official websites:
■ Ubuntu: https://ubuntu.com/download
■ CentOS:
https://www.centos.org/download/
■ Fedora: https://getfedora.org/
3. Create a New Virtual Machine:
○ In VirtualBox or VMware, click on "New"
to create a new VM.
○ Choose a name and set the OS type as Linux.
○ Allocate RAM and CPU resources (at least
2 GB RAM and 2 CPU cores
recommended).
○ Attach the downloaded Linux ISO as a
virtual CD to the VM.
○ Start the VM and follow the instructions
to install Linux.
2. Using WSL (Windows Subsystem for Linux)
on Windows:-
Windows users can also set up a Linux environment
using WSL:
1. Enable WSL:
Open PowerShell as Administrator and run:
wsl --install
○
○ This will install WSL and a default
Linux distribution (like Ubuntu).
2. Install a Linux Distribution:
○ You can install additional Linux distributions
via the Microsoft Store, like Ubuntu or
Debian.
3. Access Linux Terminal:
○ Once installed, you can access the Linux
terminal by typing "Ubuntu" in the Start
menu.
3. Using Cloud-based Linux Environments:-
If you prefer not to install locally, you can
use cloud-based solutions like:
● AWS EC2: Create a Linux VM in AWS and access
it via SSH.
● Google Cloud Platform (GCP): Use Google
Cloud Compute Engine to set up a Linux VM.
● DigitalOcean: Create a Linux droplet and SSH
into it.
Part 2: Executing UNIX System Calls:-
1. fork() - Creates a new process by duplicating
the calling process.
2. exec() - Replaces the current process image with
a new process image.
3. getpid() - Gets the process ID of the
calling process.
3. Experiment 3: cat, cd, cp, chmod, df, less, ls,
mkdir, more, mv, pwd, rmdir, rm, man,uname,
who,ps, vi, cal, date, echo, bc, grep :-
hello. c. .v oxc len os verslon- y -con ro ,Pl
save . vboxcllent- seaMless- tty2 control. pld
. vboxc lient -vf'lsvga - session- t ty2 -control. pid
. vboxc1ien t - Vf'lsvga - session- t t y2 - service. pid
: $ ls - l
total 64
-rw-rw-r-- lonewolf lonewolf 23 Oct 22 22:41 backup_exa,ple.txt
drwxr-xr-x lonewolf lonewolf 4096 Oct 16 00:18
drwxr-xr-x lonewolf lonewolf 4096 Oct 16 00:18
drwxr-xr-x lonewolf lonewolf 4096 Oct 16 00:18
-rwxr-xr-x lonewolf lonewolf 23 Oct 22 22:40
-rw lonewo l f lonewo l f 52 Oct 22 19:09 hello.c.save
drwxr-xr-x lonewo lf lonewolf 4096 Oct 16 00:18
drwxrwxr-x lonewolf lonewolf 4096 Oct 22 21:23
drwxr-xr-x lonewo lf lonewo lf 4096 Oct 16 00: 18
drwxr-xr-x lonewo lf lonewolf 4096 Oct 16 00:18
drwxrwxr-x lonewolf lonewolf 4096 Oct 16 19:23
drwxrwxr-x lonewolf lonewolf 4096 Oct 16 20:44
drwx- - - - - lonewolf lonewolf 4096 Oct 22 21:00
-drwxr-xr-x lonewolf lonewolf 4096 Oct 16 00: 18
drwxrwxr-x lonewolf lonewolf 4096 Oct 22 22: 36
drwxr-xr-x lonewo lf lonewo lf 4096 Oct 16 00: 18
: $ l'lkdi.r test_di.rectory
: $ !'lore exaf'lple. txt
This ls a ex aMple fi.le
$ l'lV backup_exal'lple. txt exaf'lple_backup. txt
$ pwd
/hooe/lonewolf
rMdi.r ef'lpty_dir
rMdi.r: failed to rer"!ove 'el'lpty_di.r' : No such fi.1e or di.rectory
rM exar"lple_backup. txt
rr"I -r test_di.rectory
l'lan 1s
unar"le - a
who
lonewo l f seat0 2024-10-22 19: 05 ( logln screen)
lonewolf ttyZ 2024-10 22 19: ( tyZ)
05 t
COMMAND
: $ ps aux
/sbln/lnl t sp
USER PIO %CPU %MEM vsz RSS TTY STAT START TIME
[kthreadd]
root 1 0.1 0.1 23308 13552 ? 5s 20: 30 0: 14 [ pool_wor kque
root 0.0 0.0 0 0 ? 5 20: 30 0:00 [ kworker /R-
root 0.0 0.0 0 0 ? 20: 30 0:00 re [kworker/R-
root 4 0.0 0.0 0 I< 20: 30 0:00
root
0
0 ?
' 20: 30 0:00
rc [kworker/R-
0.0 0.0 0 I< sl [ kworker
root 6 0.0 0.0 0 0 ? I< 20: 30 0:00 /R- ne [
root 0.0 0.0 0 0 ? I< 20: 30 0:00 kworker /0: 0H
root 10 0.0 0.0 0 I< 20: 30 0:00
root
0
0
'? I< 20: 30 0:00
[kworker/R-,,
12 0.0 0.0 0 [ rcu_ tasks -
root 13 0.0 0.0 0 0 ? 20: 30 0:00 kt [ rcu_
root 14 0.0 0.0 0 0 ? 20: 30 0:00 tasks- ru [
root 15 0.0 0.0 0 0 ? 20: 30 0:00 rcu_ tasks tr
root 16 0.0 0.0 0 0 ? 20: 30 0:00 [ksoftirqd/0]
root 17 0. 3 0.0 0 0 ? 20: 30 0: [ rcu_preeopt]
root 18 0.0 0.0 0 20: 30 27 [olgratlon/0]
root
0
0 ?
' 20: 30 0:01 [idle_inject/
19 0.0 0.0 0
root 0 20: 30 0:00 [cpuhp/0]
20 0.0 0.0 0 ?
root 0 ? 20: 30 0:00 [cpuhp/1]
21 0.0 0.0 0
root 0 20: 30 0:00 [idle_inject/
22 0.0 0.0
root
0
0 ?
' 20: 30
0:00 [oigration/1]
23 0.0 0.0 0
root 0 ? 0:00 [ksoftirqd/1]
24 0.0 0.0 0 20: 30
root 0 ? 0:00 [ kworker / 1:
26 0.0 0.0 0 I< 20: 30
0:00
root 27 0.0 0.0 0 0 ? s 20: 30
0:00
0H [cpuhp/2]
root 28 0.0 0.0 0 0 ? 20: 30 [idle_inject/
root 0 ? 0:00 [oigration/2]
29 0.0 0.0 0 20: 30
root 0:01 [ksoftirqd/2]
30 0.0 0.0 0 0 ? 20: 30
root 0:00 [kworker/2:0H
32 0.0 0.0 0 0 ? I< 20: 30
root 0:00 [cpuhp/3]
33 0.0 0.0 0 0 ? 20: 30
root 0:00 [idle_inject/
34 0.0 0.0 0 0 ? 20: 30
root 0:00 [olgratlon/3]
35 0.0 0.0 0 20: 30
root
0
0 ?
' 20: 30
0:01 [ ksoftirqd/ 3]
36 0.0 0.0 0
root 0: 03
39 0.0 0.0 0 0 ? 20: 30
0:00
f.j lonewolf@lonewolf:- a - X
root 44 0.0 0.0 0 0 ? [< 20: 30 0:00 [kworker/4:0H
root 45 0.0 0.0 0 0 ? 20: 30 0:00 [cpuhp/5]
root 46 0.0 0.0 0 0 ? 20: 30 0:00 [idle_inject/
root 47 0.0 0.0 0 0
root 48 0.4 0.0 0 0
root 50 0.0
20: 30 0:00 [sigration/5]
root 51 0.0 '
? 20: 30 0: 33 [ksoftlrqd/5]
root 52 0.0 0.0 0 0 ? [< 20: 30 0:00 [kworker/5:0H
root 54 0.0 0.0 0 0 ? 20: 30 0:00 [kdevtspfs]
root 55 0.0 0.0 0 0 ? [< 20: 0:00 [kworker/R-in
root 56 0.0 30
20: 0:00 [kaudltd]
0.0 0 0
root 58 0.0
0.0 0 '
0 ? 30
20: 0:00 [khungtaskd]
root 59 0.0 30
20: 0:00 [ oos_reaper]
0.0 0 0 ?
root 60 0.0 30
20: 0:00 [kworker/R-wr
0.0 0 0 ? [<
root 61 0.0 30
20: 0:02 [ kcospactd0]
root 0.0 0 0
62 0.0
0.0 0 0 '
? SN 30
20: 0:00 [kssd]
root 63 0.0 30
20: 0:00 [ khugepaged]
0.0 0 0 ? SN
root 64 0.0 30
20: 0:00 [ kworker /R-h
0.0 0 0 ? I<
root 65 0.0 30
20: 0:00 [kworker/R-kb
0.0 0 0 ? [<
root 68 0.0 30
20: 0:00 [kworker/R-bl
[<
root 69 0.0 0.0 0 0
root 70 0.0 0.0 0 0 '
?
30
20: 0:00 [lrq/9-acpl]
30
20: 0:00 [kworker/R-tp
root 71 0.0 0.0 0 0 ? I<
30 0:00
20: [kworker/R-at
root 72 0.0 0.0 0 0 ? [<
30 0:00
20: [ kworker /R-
root 73 0.0 0.0 0 0 ? [<
30 0:00
20: sd
root 74 0.0 0.0 0 0 ? [<
30 0:00
20: [kworker/R- d
root 75 0.0 0.0 0 0 ? [<
30 0:00
20: [kworker/R-ed
[kworker/R-de
root 76 0.0 0.0 0 0 ? I<
30 0:00
20:
root 77 0.0 0.0 0 0 ? 30 0:00
20: [watchdogd]
root 78 0.0 0.0 0 0
[<
30 0:00 [kworker/1:lH
root 80 0.0 0.0 0 0 '
?
20:
30 0:00 [ kswapd0]
20:
root 83 0.0 0.0 0 0 ? 30 0:00
20: [kworker/R-kt
root 84 0.0 0.0 0 0 ? I< 30 0:00
20: [kworker/R-ac
root 85 0.0 0.0 0 0 ? [< 30 0:00
20: [ scs
root 86 0.0 0.0 0 0 ? 30 0:00
20: l_eh_0]
[kworker/R-sc
root 90 0.0 0.0 0 0 ? [< 0:00
30
20:
root 91 0.0 0.0 0 0 ? 30 0:00
20: [ scsi._eh _1]
[kworker/R-sc
0.0 0 0 ? [< 30
20: 0:00 [kworker/R-sl
[< 30 0:00
0.0 0 0 20: kworker 4:1H
0.0 0 '
0 ? [< 30
f.j lonewolf@lonewolf:- a - X
onewol f 2235 0.0 0.0 9476 4864 20: 0:00 /usr /bln/dbus
onewo1 2236 8. 5 3. 2 4365524 274088 ? Ssl 32 11: /usr /bin/gnos
onewo l
f 2274 0.0 0.0 236068 7424 ' Sl 20:
32
32
0:00 /usr /l lbexec/
2293 0.0 0.2 654772 17152 51 0:00 /usr /l lbexec/
f 20:
onewo1
2302
2315
0.0
0.0
0.5
0.3
'
1201228 42112 ?
2667268 26436 ? ?
Ssl
Sl
32 0:01 /usr /l ibexec/
0:00 /usr/bln/gjs
f 20:
onewo l 2324 0. 2 0.1 397508 11964 5s l 32 0: 16 /usr /bin/ibus
2326 0.0 0.0 392184 6272 5s l 20: 0:00 /usr /l lbexec/
f
onewo1 2327 0.0 0. 2 421556 19840
' Ssl 32 0:00 /usr /l ibexec/
f 2329 0.0 0. 440336 12032 Ss l 20: 0:00 /usr /l lbexec/
onewo l 2332 0.0 1 467532 7552 ?
' 5s l
32
0:00 /usr /l lbexec/
f 20:
2336 0.0 0.0 420416 19072 Ss l 0:00 /usr /l lbexec/
onewol f
2343 0.0 0. 2 750264 25068 ?
' 5s l
32
20: 0: 01 /usr /l lbexec/
onewo1
f 2349 0.0 0.2 532176 23744 Ssl 32 0:01 /usr /l ibexec/
onewo l 2352 0.0 0. 2 332312 11264 ? Ssl 20: 0:00 /usr /l lbexec/
f 2356 0.0 0.1 539752 6272 5s l 32 0:00 /usr /l ibexec/
onewo1 2357 0.0 0.0 20:
318228 6016 5s l 0:00 /usr /l lbexec/
f 2359 0.0 0.0 305624 6912
' Sl
32
0:00 /usr /l ibexec/
onewo l 20:
2360 0.0 0.0 551860 11520 Ss l 0:00 /usr /l lbexec/
f
2368 0.0 0. 394484 8064 ?
' 5s l
32
20: 0:00 /usr /l lbexec/
onewo1
f 2376 0.0 1 402304 9472 Ssl 32 0:00 /usr /l ibexec/
onewo l 2382 0.0 0.0 891532 59136 ? Sl 20: 0: 01 /usr /l lbexec/
f 2387 0.0 0.1 5s l 32 0:00 /usr /l ibexec/
495120 19968 20:
onewo1 2479 0.0 0.7 471708 11008 5s l 0:00 /usr /l lbexec/
f 2488 0.0 0. 2 245316 7040
' 5l
32
0:00 /usr /l ibexec/
onewo l 20:
2493 0.1 0.1 430156 29008 51 0:11 /usr /l lbexec/
f
2501 0.0 0.0 319096 7040
' Sl
32
20: 0:00 /usr /l ibexec/
onewol f
2538 0.0 0.3 424872 14592 Sl 32 0:00 /usr /l lbexec/
onewo1
f 2542 0.0 0.0 555316 23680 ?
' 51 20: 0:00 /usr /l lbexec/
onewo l 2558 0.0 0. Ssl 32
318460 6400 0:00 /usr /l ibexec/
2566 0.0 1 20:
f 397796 8704 ? Sl 0:00 /usr /l lbexec/
32
onewo1 2577 0.0 0.2 899528 23808 5s l 0:00 /usr /l ibexec/
f 20:
2579 0.0 0.0 318440 6272 5s l 32 0:00 /usr /l lbexec/
onewo l
2594 0.0 0.1 319428 6784
' Ssl 20: 0:00 /usr /l ibexec/
f
2612 0.0 0. 2 398044 7808 Ss l 32 0:05 /usr /l lbexec/
onewo1
f 2642 2.5 0.0 289872 84120 ?
' 5 20: 3 :27 /usr /bln/Xway
2644 0.0 0.0 Ssl 32
onewo l 760232 29568 0:00 /usr /l ibexec/
0.0 20:
f
4. Experiment 4: Write small C programs
that demonstrate the use of each system
call. :-
1. fork() - Creates a new process by duplicating
the calling process.
2. exec() - Replaces the current process image with
a new process image.
3. wait() - Waits for the child process to terminate.
4. open() and close() - Opens and closes a
file descriptor.
5. read() and write() - Read from and write to a
file descriptor.
6. lseek() - Repositions the file offset for the
file descriptor.
7. getpid() - Gets the process ID of the
calling process.
8. kill() - Sends a signal to a process.
5. Experiment 5: Implement CPU scheduling policies:
(a) SJF , SRTF
(b) Priority, RR
(c) FCFS
(d) Multi-level queue
a)
b)
c)
d)