0% found this document useful (0 votes)
15 views

I.K.G Punjab Technical University, Kapurthala: Operating System Lab BTCS404-18

Uploaded by

Rohit Jha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

I.K.G Punjab Technical University, Kapurthala: Operating System Lab BTCS404-18

Uploaded by

Rohit Jha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Operating System Lab Rohit Kumar

BTCS404-18 2224525

I.K.G Punjab Technical University,


Kapurthala
Department of Computer Science Engineering

Operating System Lab


BTCS404-18

Bachelor of Technology
(Computer Engineering)

Submitted To: Submitted By:


Ms. Kanchan Gupta Name : Rohit Kumar
Roll no : 2224525
Group : D

1
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Practical-1 – Installation Of Windows- 11


Step: 1 -> Minimum Requirement of installing window 11+3

Step-2 -> Download the Windows 11 installation file


To be able to install your desired Windows system, you need one
so-called “ISO” file. This contains all the necessary installation files.
You will receive the download links for installing the necessary ISO files by email with your
key.

Please click on the “Downloads” link available from my Key


is provided. On the Microsoft website please select “Windows 10”.
DO NOT use the version with “K” or , if selectable
“KN” or “N” – these are modified versions that do not match my Key
sold product keys are compatible.

2
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Step-3-> Prepare a bootable operating system DVD or USB stick for devices without a DVD
reader

Here you can choose between DVD or USB stick installation

 a) You burn the installation files onto a DVD. It is important that not
simply burn the ISO file onto the DVD,
a special burning process is made bootable. There are two here
Methods that we recommend. If one fails, please try the
other. Windows XP and Windows Vista users definitely need to
Use method 2.
 b) You prepare a USB stick specifically so that it becomes bootable and that
Operating system can be started with it if the computer e.g. Not
has a DVD drive. There are two programs here that we
recommend Windows USB / DVD Download Tool and Rufus, see also
Method 3 and 4.

Burn a bootable Windows 10 operating system DVD (method 1)->


1) When the download is finished, find the downloaded file in the Explorer and
right click on it to Select “Burn Disk Image” .
2) 2)Now the “Windows burner for disk images opens. Select the drive used,
insert a blank DVD and click on “Burn”.

3) When the process is finished, you can use the DVD for installation.

Create a bootable USB stick in Windows 10 (method 3)

1) A bootable USB stick can be easily created with the “Windows USB / DVD Download
Tool”. It comes directly from Microsoft and can be downloaded here
http://wudt.codeplex.com/. Please be patient, the website loads very slowly. Click
“download” on the right side of the website.

3
Operating System Lab Rohit Kumar
BTCS404-18 2224525

2) Install the program and open it. It should be in the “Programs” folder.

3) Now select the Windows operating system ISO file to be copied to the USB stick
(“Browse”) and click on “Next”.

4) Now select “USB device”

4
Operating System Lab Rohit Kumar
BTCS404-18 2224525
5) Now insert the USB stick, if it is not displayed, click on the small “update”
symbol. Attention: The USB stick will be deleted completely! If there is important data
on it, be sure to copy it to another location.
Now click on “Begin copying”. The bootable USB stick is created. This can take a few
minutes.

Create a bootable USB stick from Windows XP or Vista (method 4)

1) Go to http://rufus.akeo.ie

2) Find the “Download” area and be sure to download version 2.18 – this is the last one that
still supports Windows XP and Vista. If a newer version is offered, go to “Other versions” to
download this version.

3) Install and open the Program.


4) Now select the USB stick to which the Windows operating system should be copied (1),
select “ISO Image” (2), and click on the file search icon next to it (3). Select the ISO file that

5
Operating System Lab Rohit Kumar
BTCS404-18 2224525
you want to put on the stick and confirm the entry. Rufus automatically makes the correct
settings.Please note that the USB stick must be larger than the ISO file! You must also know
that all data on the stick will be deleted. So make sure to backup the data if there is any on it!

5) Click on “Start” and wait until the files have been copied onto the stick properly.

You now have a bootable Windows DVD or USB stick.


Preparation Step 3: Install the operating system on your device

Have you now followed the instructions and created a boot DVD or bootable USB stick?
Now you have to get your PC to boot from it and start the Windows 7 installation process.

Method 1 (the simplest): insert operating system DVD

This is the easiest method, but it doesn’t always work. Simply insert the DVD and double-
click “setup.exe” when the “AutoPlay” window opens.

For example, this is how it looks when you install Windows 11:

If the window does not open automatically, please open the Explorer and double-click
“setup” manually.

The boot process should now start.

6
Operating System Lab Rohit Kumar
BTCS404-18 2224525
Method 2: Set boot order in BIOS

Regardless of whether you want to start from a DVD or a bootable USB stick, you must
first tell the computer that it should boot from your medium, otherwise it will simply boot the
system that is already installed.

Select the desired language and region.

Now click on “Install now”.

Now you can enter your Windows 10 product key.

7
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Now accept the license terms and click on “Next”.

Now you can choose whether you want to upgrade an existing system (“Upgrade: Windows
….”) or whether you want a so-called “Clean Install” (“Custom: …”). The latter will delete
all data if you install it on an existing partition. Please note that the upgrade only works if the
same bit version is selected as for the original system. So it is possible to upgrade from a
32bit system to a Windows 10 system, but not from e.g. from 64bit to 32bit.

It is only possible to upgrade from Windows 7 to Windows 10, unfortunately older versions
such as Windows XP or Vista are no longer supported.

In any case, make sure to backup your data , as there is always a risk of data loss!

In this guide, we opted for a clean reinstallation, ie “user-defined”.

8
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Now select the partition on which Windows 11is to be installed. If necessary, delete or format
them beforehand (“delete” or “format” command), you can also create a new partition
(“new”).

Now Windows is installed. This can take some time.

9
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Task - 2

Implementation of CPU scheduling algorithms to find turnaround time and


waiting time.

a) FCFS

#include <iostream>

using namespace std;

void CalculateWaitingTime(int at[],

int bt[], int N){

int wt[N];

wt[0] = 0;

cout << "PN\t\tAT\t\t"

<< "BT\t\tWT\n\n";

cout << "1"

<< "\t\t" << at[0] << "\t\t"

<< bt[0] << "\t\t" << wt[0] << endl;

for (int i = 1; i < 5; i++) {

wt[i] = (at[i - 1] + bt[i - 1]

+ wt[i - 1]) - at[i];

cout << i + 1 << "\t\t" << at[i]

<< "\t\t" << bt[i] << "\t\t"

<< wt[i] << endl;

float average;

float sum = 0;

10
Operating System Lab Rohit Kumar
BTCS404-18 2224525
for (int i = 0; i < 5; i++) {

sum = sum + wt[i];

average = sum / 5;

cout << "\nAverage waiting time = "

<< average;

int main(){

int N = 5;

int at[] = { 0, 1, 2, 3, 4 };

int bt[] = { 4, 3, 1, 2, 5 };

CalculateWaitingTime(at, bt, N);

return 0;

(b) SJF

#include <iostream>

using namespace std;

11
Operating System Lab Rohit Kumar
BTCS404-18 2224525
int main() {

int A[100][4];

int i, j, n, total = 0, index, temp;

float avg_wt, avg_tat;

cout << "Enter number of process: ";

cin >> n;

cout << "Enter Burst Time:" << endl;

for (i = 0; i < n; i++) {

cout << "P" << i + 1 << ": ";

cin >> A[i][1];

A[i][0] = i + 1;

for (i = 0; i < n; i++) {

index = i;

for (j = i + 1; j < n; j++)

if (A[j][1] < A[index][1])

index = j;

temp = A[i][1];

A[i][1] = A[index][1];

A[index][1] = temp;

temp = A[i][0];

A[i][0] = A[index][0];

A[index][0] = temp;

12
Operating System Lab Rohit Kumar
BTCS404-18 2224525
}

A[0][2] = 0;

for (i = 1; i < n; i++) {

A[i][2] = 0;

for (j = 0; j < i; j++)

A[i][2] += A[j][1];

total += A[i][2];

avg_wt = (float)total / n;

total = 0;

cout << "P BT WT TAT" << endl;

for (i = 0; i < n; i++) {

A[i][3] = A[i][1] + A[i][2];

total += A[i][3];

cout << "P" << A[i][0] << " " << A[i][1] << " " << A[i][2] << " "
<< A[i][3] << endl;

avg_tat = (float)total / n;

cout << "Average Waiting Time= " << avg_wt << endl;

cout << "Average Turnaround Time= " << avg_tat << endl;

13
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Practical-3 -> Virtualization, Installation of Virtual Machine and Installation


of Operating System on Virtual Machine
VMware Workstation
VMware Workstation was the first product launched by VMware. It is the most popular
software that offers running multiple instances of operating systems on a single physical
personal computer. It enables users to set up and run various virtual machines on a single
physical machine and use them simultaneously with the actual physical machine.

Steps to Install VMware


Below are the detailed steps for installing VMware Workstation.

Step 1. To download and install the VMware product, visit the official website of VMware.

https://www.vmware.com/in.html

Hover on the Downloads tab; here, you will find various products.

Workstation Player is for running a second OS on Windows or Linux PC for free for personal
use.

Step 2. Click on Free Product Trials & Demo >> Workstation Pro. You will be redirected to
the download page. (Similarly, you can select any product you want to install.)

14
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Click on Download Now according to your Operating System. We have chosen Workstation
15 Pro for Windows.

While downloading, ensure you have a proper internet connection, as the file may be large.

Step 3. Once the download is complete, run the .exe to install VMware Workstation. A
popup will appear.

Step 4. Once Initialization gets completed, Click on Next.

15
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Step 5. Accept the terms and click Next

Step 6. On the next screen, It will ask for additional features; it is not mandatory to check this
box. Click on Next.

Step 7. On the next screen, some checkboxes are populated; check them as per your
requirement.

Click on Next.

16
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Step 8. At this step, VMware Workstation is ready to install. Click on Install.

Step 9. At this step, you can see installation taking place. The installation will take some
time; wait for it to install properly.

Step 10. Once the installation gets completed, you will see the following dialogue box. Click
on Finish. If you have purchased the product and have a license key, click on License to enter
the key.

17
Operating System Lab Rohit Kumar
BTCS404-18 2224525

Step 11. Upon Finishing, the window will close, and You can see VMware Workstation
installed icon on your Desktop.

The icon looks like this,

Double Click on the icon to open the application.

Step 12. For the first time opening, if you have not entered the License key in step 7, it will
ask for a license key. You can go for the trial version, free for 15 to 30 days. Click on
Continue. Make sure you have Admin rights for this in Windows.

18
Operating System Lab Rohit Kumar
BTCS404-18 2224525

At this stage, you will get the final installation message. Click on Finish.

Finally, this will open a window of VMware Workstation Pro.

Installation of Ubuntu in VMware:

1. Fier up VMWare Workstation

Download the VMWare Workstation application for your host operating system and install it
on your machine. The installation procedure is pretty simple and straight. Read
the documentation for more details. Open the app after installation. Create a new Virtual
Machine.

2. Supply Ubuntu ISO Image to Virtual Machine

19
Operating System Lab Rohit Kumar
BTCS404-18 2224525
Download Ubuntu image. Edit the CD/DVD settings and import the downloaded Ubuntu
image.

3. Install Ubuntu Linux on VMWare Workstation

4. Power On the Virtual Machine


Press the Play button to power on the Virtual Machine.

5. Welcome Ubuntu Virtual Machine


After powering on the Virtual machine, you will be treated with a welcome screen
on which you will see two options: Try Ubuntu and Install Ubuntu. Select Try
Ubuntu if you want to run Ubuntu in live mode. Select Install to continue the
installation process.

20
Operating System Lab Rohit Kumar
BTCS404-18 2224525

6. Select Keyboard Layout

7. Software Update and Package Selection in Virtual Machine

8. Partition the Disk


Select Erase the Disk for auto partition. Or Select the Advance option to create the
custom partition.

21
Operating System Lab Rohit Kumar
BTCS404-18 2224525

9. Write Changes to Disk

10. Select Time Zone

11. Create an Admin Account

22
Operating System Lab Rohit Kumar
BTCS404-18 2224525

12. Reboot Virtual Machine

Reboot the machine after installation.

13. Remove the installation media


Remove the installation media before reboot.

23
Operating System Lab Rohit Kumar
BTCS404-18 2224525

TASK 4:- Commands


A. Commands for files & directories : cd , Is, cp , mv, rm , mkdir , rmdir .
1. cd:
Change Directory - change the current working directory to a specific Folder.

SYNTAX -
cd [-LP] [directory]

2. Ls :
List all files in the current directory , in column format.

SYNTAX:-
ls[DIRECTORY]

3. cp :
Copy one or more files to another location Copy SOURCE to DEST, or
multiple SOURCE(s) to DIRECTORY.

SYNATX-
cp [options]... Source Dest

24
Operating System Lab Rohit Kumar
BTCS404-18 2224525

4. mkdir :
Create new folder(s), or directory if they do not already exist.

SYNTAX-
mkdir [Options] folder...
mkdir &quot;Name with spaces&quot;

5. rmdir :
Remove directory, this command will only work if the folders are empty.
Syntax -
rmdir [options]... folder(s)...

B. Creating and viewing files using cat.:-

1. cat:
Create, read, write, or append the contents of a file.
SYNTAX-
cat [Options] [File]...

25
Operating System Lab Rohit Kumar
BTCS404-18 2224525

26

You might also like