KEMBAR78
OS LAB Assignment #1-2025 | PDF | Booting | Bios
0% found this document useful (0 votes)
97 views9 pages

OS LAB Assignment #1-2025

The document outlines the assignments for the Operating Systems course at Gian Jyoti Institute of Management & Technology for the academic session Jan-May 2025, detailing submission deadlines and marking criteria. It includes two main questions: one on installation steps for Windows, Linux, and dual boot systems, and another on CPU scheduling using SJF and FCFS algorithms, with calculations for turnaround, waiting, and response times. Additionally, it provides a comparison of performance metrics between the two scheduling algorithms.

Uploaded by

pratikgjimt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views9 pages

OS LAB Assignment #1-2025

The document outlines the assignments for the Operating Systems course at Gian Jyoti Institute of Management & Technology for the academic session Jan-May 2025, detailing submission deadlines and marking criteria. It includes two main questions: one on installation steps for Windows, Linux, and dual boot systems, and another on CPU scheduling using SJF and FCFS algorithms, with calculations for turnaround, waiting, and response times. Additionally, it provides a comparison of performance metrics between the two scheduling algorithms.

Uploaded by

pratikgjimt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Gian Jyoti Institute of Management & Technology, Mohali

Assignments I
Academic Session Jan, 2025 – May, 2025

Name of the Faculty: - Prof. Siddhartha Shyam Vyas, Ph.D.


Subject and Code: Operating Systems, UGCA1926
Class & Semester: BCA-IV(B)
Date for Allotment: - 03/02/2025
Last Date for Submission: - 09/02/2025
Department: IT
Max Marks: 10

Q1. Write down the installation steps for


 Windows OS
 Linux OS
 Dual Boot of Operating Systems

Q2. Consider the following set of processes arrival time and burst time.

Process ID Arrival Time Burst Time


P1 1 7
P2 2 5
P3 3 1
P4 4 2
P5 5 8

Assumption: I / O time is 0 time unit for all processes

(a) Draw the Gantt Chart, and find average Turnaround Time, average Waiting Time, average Response
Time, Schedule Length, and Throughput using – SJF Scheduling Algorithm

(b) Draw the Gantt Chart, and find average Turnaround Time, average Waiting Time, average Response
Time, Schedule Length, and Throughput using – using FCFS Scheduling Algorithm
Here’s a detailed solution for Question 2 from your OS Lab Assignment #1 on CPU scheduling.

Given Data:
Process Arrival
Burst Time
ID Time
P1 1 7
P2 2 5
P3 3 1
P4 4 2
P5 5 8

Assumption: I/O time is 0 time units for all processes.

Solution Using SJF (Shortest Job First) Scheduling Algorithm

Step 1: Arrange the Processes Based on Shortest Job First (Non-


Preemptive)

 The CPU selects the process with the shortest burst time that has already arrived.
 If two processes have the same burst time, the one that arrived first is selected.

Step 2: Construct the Gantt Chart

1. P1 arrives at time = 1, but we wait for more processes to arrive.


2. P3 has the shortest burst time (1), so it executes first.
3. P4 (burst time 2) executes next.
4. P2 (burst time 5) executes next.
5. P1 (burst time 7) executes next.
6. P5 (burst time 8) executes last.

Gantt Chart for SJF:


| P3 | P4 | P2 | P1 | P5 |
0 3 5 10 17 25

Step 3: Calculate Turnaround Time (TAT)

TAT=Completion Time−Arrival TimeTAT = Completion\ Time - Arrival\ Time


Proce Arrival Burst Completion Turnaround Time
ss Time Time Time (TAT)
P1 1 7 17 16
P2 2 5 10 8
P3 3 1 3 0
Proce Arrival Burst Completion Turnaround Time
ss Time Time Time (TAT)
P4 4 2 5 1
P5 5 8 25 20

Step 4: Calculate Waiting Time (WT)

WT=Turnaround Time−Burst TimeWT = Turnaround\ Time - Burst\ Time


Proce Turnaround Time Burst Waiting Time
ss (TAT) Time (WT)
P1 16 7 9
P2 8 5 3
P3 0 1 -1
P4 1 2 -1
P5 20 8 12

Step 5: Calculate Response Time (RT)

Since this is a non-preemptive algorithm,

RT=Waiting TimeRT = Waiting\ Time


Proc Response
ess Time (RT)
P1 9
P2 3
P3 -1
P4 -1
P5 12

Step 6: Calculate Schedule Length & Throughput

Schedule Length=Completion Time of Last Process=25Schedule\ Length =


Completion\ Time\ of\ Last\ Process = 25
Throughput=Total ProcessesSchedule Length=525=0.2 processes/unit timeThr
oughput = \frac{Total\ Processes}{Schedule\ Length} = \frac{5}{25} = 0.2\
processes/unit\ time

Final Results for SJF

 Average Turnaround Time = (16 + 8 + 0 + 1 + 20) / 5 = 9


 Average Waiting Time = (9 + 3 + (-1) + (-1) + 12) / 5 = 4.4
 Average Response Time = (9 + 3 + (-1) + (-1) + 12) / 5 = 4.4
 Schedule Length = 25
 Throughput = 0.2 processes/unit time

Solution Using FCFS (First Come First Serve) Scheduling Algorithm


Step 1: Arrange Processes in Order of Arrival

 The processes are executed in order of arrival.

Step 2: Construct the Gantt Chart


| P1 | P2 | P3 | P4 | P5 |
1 8 13 14 16 24

Step 3: Calculate Turnaround Time (TAT)

TAT=Completion Time−Arrival TimeTAT = Completion\ Time - Arrival\ Time


Proce Arrival Burst Completion Turnaround Time
ss Time Time Time (TAT)
P1 1 7 8 7
P2 2 5 13 11
P3 3 1 14 11
P4 4 2 16 12
P5 5 8 24 19

Step 4: Calculate Waiting Time (WT)

WT=Turnaround Time−Burst TimeWT = Turnaround\ Time - Burst\ Time


Proce Turnaround Time Burst Waiting Time
ss (TAT) Time (WT)
P1 7 7 0
P2 11 5 6
P3 11 1 10
P4 12 2 10
P5 19 8 11

Step 5: Calculate Response Time (RT)

RT=Waiting TimeRT = Waiting\ Time


Proc Response
ess Time (RT)
P1 0
P2 6
P3 10
P4 10
P5 11

Step 6: Calculate Schedule Length & Throughput

Schedule Length=Completion Time of Last Process=24Schedule\ Length =


Completion\ Time\ of\ Last\ Process = 24
Throughput=Total ProcessesSchedule Length=524=0.208 processes/unit timeT
hroughput = \frac{Total\ Processes}{Schedule\ Length} = \frac{5}{24} =
0.208\ processes/unit\ time

Final Results for FCFS

 Average Turnaround Time = (7 + 11 + 11 + 12 + 19) / 5 = 12


 Average Waiting Time = (0 + 6 + 10 + 10 + 11) / 5 = 7.4
 Average Response Time = (0 + 6 + 10 + 10 + 11) / 5 = 7.4
 Schedule Length = 24
 Throughput = 0.208 processes/unit time

Final Comparison:
SJ FCF
Metric
F S
Average
9 12
TAT
4.
Average WT 7.4
4
4.
Average RT 7.4
4
Schedule
25 24
Length
0. 0.20
Throughput
2 8

Conclusion:

 SJF performs better in terms of waiting time and turnaround time.


 FCFS is simpler but has higher waiting times.

Would you like any clarifications or modifications?


Here's a detailed answer for Question 1 from your OS Lab Assignment #1 on OS installation.

Q1: Installation Steps for Different Operating Systems

1. Installation of Windows OS
Installing Windows OS involves several steps, including downloading the installation media, setting
up bootable media, and configuring the system.

Step 1: Download Windows OS

1. Visit the official Microsoft website to download the latest version of Windows 10 or
Windows 11 ISO file.
2. Use the Media Creation Tool (if required) to create an installation USB.

Step 2: Create a Bootable USB Drive

1. Insert a USB flash drive (at least 8GB) into your computer.
2. Use Rufus or the Windows Media Creation Tool to create a bootable drive:

1. Open Rufus.
2. Select your USB drive.
3. Choose the downloaded Windows ISO file.
4. Click Start to make it bootable.

Step 3: Boot from USB Drive

1. Restart the computer and enter BIOS/UEFI (Press F2, F12, DEL, or ESC, depending on the
manufacturer).
2. Set the USB drive as the primary boot device.
3. Save changes and exit BIOS.

Step 4: Install Windows

1. After booting, select Language, Time, and Keyboard Input.


2. Click Install Now.
3. Choose "I don’t have a product key" if skipping activation.
4. Select Windows Edition (Home, Pro, etc.).
5. Accept License Agreement.
6. Select Custom Installation (for a fresh install).
7. Choose the drive where you want to install Windows:

1. Delete old partitions (if needed).


2. Format the selected partition.
3. Click Next.
Step 5: Configure Windows Settings

1. Windows installation will take 15–30 minutes to complete.


2. The system will restart multiple times.
3. Set up Username, Password, Wi-Fi, and Privacy Settings.
4. Choose Windows Updates and Security Settings.

Step 6: Install Drivers & Software

1. Install necessary drivers (Graphics, Wi-Fi, Audio).


2. Install required software such as Microsoft Office, Chrome, Antivirus.
3. Activate Windows using a valid product key.

2. Installation of Linux OS
Linux distributions (Ubuntu, Fedora, Debian, etc.) have similar installation steps.

Step 1: Download Linux ISO

1. Visit the official Linux distribution website (e.g., Ubuntu, Fedora).


2. Download the latest ISO file.

Step 2: Create a Bootable USB Drive

1. Insert a USB flash drive (at least 4GB).


2. Use Rufus (Windows) or Balena Etcher (Linux/Mac) to create a bootable drive:

1. Select your USB drive.


2. Choose the downloaded Linux ISO file.
3. Click Start to create a bootable USB.

Step 3: Boot from USB Drive

1. Restart the computer and enter BIOS/UEFI (Press F2, F12, DEL, or ESC).
2. Set the USB drive as the primary boot device.
3. Save and exit BIOS.

Step 4: Install Linux

1. Choose "Try Linux" to check without installation OR click "Install Linux".


2. Select Language and Keyboard Layout.
3. Choose installation type:

1. Erase disk (for full installation).


2. Something else (for manual partitioning).
4. Select a partition for installation:

1. Assign root (/), swap space, and home (/home).

5. Click Install Now.

Step 5: Set Up User & System

1. Enter username and password.


2. Choose Time Zone.
3. Wait for installation to complete (10–20 minutes).

Step 6: Post-Installation Setup

1. Remove USB drive and restart the system.


2. Install updates and drivers.
3. Install necessary software (VLC, Chrome, VS Code, etc.).

3. Installation of Dual Boot (Windows + Linux)


Dual boot allows both Windows and Linux on the same computer.

Step 1: Install Windows First

1. Follow the Windows Installation Steps above.


2. While installing, leave free space (20GB+) for Linux.

Step 2: Install Linux

1. Boot from Linux USB drive (as explained earlier).


2. Select "Something Else" in Installation Type.
3. Create three partitions in the free space:

1. Root (/): 20GB (for system files).


2. Swap: 2GB-4GB (for virtual memory).
3. Home (/home): Remaining space (for personal files).

4. Click Install Now.

Step 3: Configure Boot Loader (GRUB)

1. Linux will automatically detect Windows and add it to the GRUB boot menu.
2. If Windows is missing in GRUB:

1. Open Linux Terminal.


2. Run:
sudo update-grub

3.
4. Restart the system.

Step 4: Boot Selection

1. After restarting, GRUB menu appears.


2. Select Windows or Linux to boot.

Final Comparison
Installation Bootable User-
OS
Time Media Friendly
Windo 30–40
USB/DVD Easy
ws minutes
20–30
Linux USB/DVD Medium
minutes
Dual 40–50
USB Medium
Boot minutes

This guide gives you step-by-step instructions for Windows, Linux, and Dual Boot installation. Let
me know if you need more details! 😊

You might also like