You are on page 1of 30

DEPARTMENT OF INFORMATION TECHNOLOGY

Practical File

B.Tech (IT) 2nd Year – 4th Semester

Subject: Operating System


BTIT 405-18

CHANDIGARH ENGINEERING COLLEGE

(LANDRAN)

Faculty:- Submitted by:-

Ms. ABHASH KUMAR


Assistant Professor Roll No – 2101926
IT Department IT 4th A1
Department of Information Technology

INDEX
Sr. No. Task No. Title Page No Date SIGN.
1. Task 1 Installation process of various operating systems

2. Task1.a Installation of Microsoft Windows Operating


system

3. Task1.b Installation of Ubuntu Linux Operating System

4. Task 2 Virtualisation, installation of virtual machine


software and installation of operating system on
virtual machine

5. Task 3 Implementation of CPU scheduling algorithms to


find turnaround time and waiting time

6. Task3.a First Come First Serve (FCFS)

7. Task3.b Shortest Job next (SJN)

8. Task3.c Round Robin (Pre - emptive)

9. Task3.d Priority
10. Task4.a Commands for files and
directories:cd,ls,cp,md,rm,mkdir,rmdir
Creating and viewing files
using cat.File Comparisons

11. Task4.b Processes in Linux,connecting processes with


pipes,background processing,managing multiple
processes.
Background process: changing process
priority,scheduling of processes at command,batch
commands,kill,ps,who,sleep.
12. Task4.c Printing commands,
grep,fgrep,find,sort,cal,banner,touch,file
File related commands ws,cut,sat,grep
13. Task5.a Shell programming :basic of shell programming,
various types of shell, Shell.

14. Task5.b Programming in Bash, conditional and looping


statement ,case statements, parameter passing and
arguments
15. Task 5.c Shell variables ,shell keywords, creating shell
programs for automate system tasks, report
printing.
16. Task 6 Implementation of bankers alogorithm for the
purpose of deadlock avoidance.

2101926 Page 2
Department of Information Technology

TASK NO. 1

Aim:- Installation Process Of Various Operating Systems.

Definition Of OS (Operating System) : An operating system (OS) is the program that,


after being initially loaded into the computer by a boot program, manages all of the other
application programs in a computer. The application programs make use of the operating
system by making requests for services through a defined application program interface (API).

Why use an operating system?


An operating system brings powerful benefits to computer software and software development.
Without an operating system, every application would need to include its own UI, as well as
the comprehensive code needed to handle all low-level functionality of the underlying
computer, such as disk storage, network interfaces and so on. Considering the vast array of
underlying hardware available, this would vastly bloat the size of every application and make
software development impractical.

Common desktop operating systems include the following:

Windows :- Window is Microsoft's flagship operating system, the de facto standard for home
and business computers. Introduced in 1985, the GUI-based OS has been released in many
versions since then. The user-friendly Windows 95 was largely responsible for the rapid
development of personal computing.

Mac OS:- Mac OS is the operating system for Apple's Macintosh line of PCs and
workstations.

Unix:- Unix is a multiuser operating system designed for flexibility and adaptability.
Originally developed in the 1970s, Unix was one of the first operating systems to be written in
the C language.

Linux:- Linux is a Unix-like operating system that was designed to provide PC users a free or
low-cost alternative. Linux has a reputation as an efficient and fast-performing system.

2101926 Page 3
Department of Information Technology
Types of Operating System:-

Given below are the different types of Operating System along with brief information about
each of them:

1. Batch Operating System:-There is no direct communication between the computer and


the OS.

There is an intermediate, the Operator, which needs to distribute the work into batches and sort
similar jobs.

Multiple users can use it.

Can easily manager a large amount of work.

2. Real-Time Operating System:-It has a data processing system.

The processing time is very small between the user’s command and the output.

Used in fields where the response needs to be quick and rapid.

3. Time-Sharing Operating System:-Multiple people at various terminals can use a


program at the same time.

The main motive is to minimize the response time.

4. Distributed Operating System:-When two or more systems are connected to each other
and one can open files which are not present in their system but in other devices connected
in the network.

Its usage has now increased over the years.

They use multiple central processors to serve real-time applications.

Failure of one system does not affect the other systems connected in the network.

5. Embedded Operating System:-These special Operating systems are built into larger
systems.

They generally are limited to single specific functions like an ATM.

2101926 Page 4
Department of Information Technology

6. Network Operating System:-They have one main server which is connected to other
client servers.

All the management of files, processing of data, access to sharing files, etc. are performed over
this small network.

It is also a secure operating system for working with multiple users.

7. Mobile Operating System:-With the advancement in the field of technology,


smartphones now are released with an Operating system.

They are designed in a manner that they can help a small device work efficiently.
Functions of Operating System:-

Given below are the various functions of an Operating System:

1. It helps with memory management. It keeps a track of the files being saved in the Main
memory and the primary memory of the computer device.

2. Whenever a computer is turned on, the Operating system automatically starts to work.
Thus, the booting and rebooting process of a computer device is also an important
function of the OS.

3. It provides a user interface.


4. Managing of basic peripheral devices is done by the operating system.
5. Using the password protection option of an operating system, the data in the device can
be kept secure.
6. It coordinates with the software and the user.
7. Easy navigation and organisation of files and programs are managed by the OS.

List Of Operating Systems:

FIGNO:1.1: List of operating system

2101926 Page 5
Department of Information Technology

TASK NO. 1.A

Aim:- Installation Process Of Window In Computer Systems.

Definition Of Window :- window is a separate viewing area on a computer display screen


in a system that allows multiple viewing areas as part of a graphical user interface ( GUI ).
Windows are managed by a windows manager as part of a windowing system . A window can
usually be resized by the user.

For example, it can be stretched on any side, minimized, maximized, and closed. On today's
multitasking operating systems, you can have a number of windows on your screen at the same
time, interacting with each whenever you choose.

The operating system is what allows you to use a computer. Windows comes preloaded on most
new personal computers (PCs), which helps to make it the most popular operating system in
the world.

Windows makes it possible to complete all types of everyday tasks on your computer.

Windows is also used in many offices because it gives you access to productivity tools such as
calendars, word processors, and spreadsheets.

Various versions of Windows:-

Windows 2.0:

It was released in December 1987, and was more popular than its predecessor. It features
several improvements to the user interface and memory management.Windows 2.03 changed
the OS from tiled windows to overlapping windows.

Windows 2.1:

It was released in two different versions: Windows/286 and Windows/386. Windows/386 uses
the virtual 8086 mode of the Intel 80386 to multitask several DOS programs and the paged
memory model to emulate expanded memory using available extended memory.

2101926 Page 6
Department of Information Technology

Windows 3.0 It was released in 1990, improved the design, mostly because of virtual memory
and loadable virtual device drivers (VxDs) that allow Windows to share arbitrary devices
between multitasked DOS applications.

Windows 9x:

The next major consumer-oriented release of Windows, Windows 95, was released on August
24, 1995. While still remaining MS-DOS-based, Windows 95 introduced support for native 32-
bit applications, plug and play hardware, preemptive multitasking, long file names of up to 255
characters, and provided increased stability over its predecessors.

Windows XP:

The next major version of Windows NT, Windows XP, was released on October 25, 2001. The
introduction of Windows XP aimed to unify the consumer-oriented Windows 9x series with
the architecture introduced by Windows NT, a change which Microsoft promised would
provide better performance over its DOS-based predecessors.

Windows Vista:

After a lengthy development process, Windows Vista was released on November 30, 2006, for
volume licensing and January 30, 2007, for consumers. It contained a number of new features,
from a redesigned shell and user interface to significant technical changes.

Windows 7:

On July 22, 2009, Windows 7 and Windows Server 2008 R2 were released as RTM (release to
manufacturing) while the former was released to the public 3 months later on October 22, 2009.
Unlike its predecessor, Windows Vista, which introduced a large number of new features,
Windows 7 was intended to be a more focused, incremental upgrade to the Windows line.

Windows 8:

The successor to Windows 7, was released generally on October 26, 2012. A number of
significant changes were made on Windows 8, including the introduction of a user interface
based around Microsoft's Metro design language with optimizations for touch-based devices
such as tablets and all-in-one PCs.

2101926 Page 7
Department of Information Technology

Installation Of Window In Computer system:

1. Creating an installation disc or drive:

A. Connect a blank USB flash drive or insert a blank writable DVD. You can install Windows

10 by creating a bootable USB flash drive or DVD that contains the Windows 10 installation
files. You'll need a USB flash drive that's at least 8GB, or any blank DVD to get started.

If you already have Windows 10 installed on the PC and just want to reinstall it, it'll be easiest
to reinstall it from within Windows 10 instead of creating installation media.

If you want to upgrade from Windows 7 or Windows 8.1, you won't need to create an
installation disc or drive. However, you will need to follow most of this method to start the
upgrade.

Make sure you have a product key. If you bought Windows 10 through Microsoft using your
Microsoft account, your product key is already linked to your account. If you bought Windows
10 from another retailer, you'll have a 25-character product key that you'll need to have handy
to activate Windows. If you don't have a product key or you're installing Windows 10 on a new
hard drive, make sure you've linked your Windows 10 digital license to your Microsoft account
before you start the installation.

FIG NO. 1.A.1.A: Creating an installation disc or drive

2101926 Page 8
Department of Information Technology

B. Go to https://www.microsoft.com/en-us/software-download/windows10%20. This is the


official download site for Windows 10.

FIG NO.1.A.1.B: official download site

C. Click Download tool now. This is a blue button in the middle of the page. This downloads
the Media Creation Tool, which you'll use to create your installation media (or start your
upgrade).

FIG NO.1.A.1.C: Download

2101926 Page 9
Department of Information Technology

D. Double-click the downloaded file. Its name begins with "MediaCreationTool" and ends with
".exe." You'll find it in your default download folder, which is usually called Downloads.

Click Yes when prompted to allow the installer to run.

FIG NO.1.A.1.D: Run the installer

E. Click Accept to accept the license. It's in the bottom-right corner of the window.

FIG NO.1.A.1.E: Accept the license

2101926 Page 10
Department of Information Technology

F. Select "Create installation media" and click OK. This option lets you create a Windows
installation disc or drive that will work on any compatible PC, not just the one you're using
now.

If you're updating your PC from an earlier version of Windows, select Upgrade this PC now
instead, and then follow the on-screen instructions to install Windows 10. You're done!

FIG NO.1.A.1.F: Create installation media

G. Select your preferences and click Next. If you're installing Windows on the current PC, you
can keep the default options. If you need to install on a different PC, make sure you choose the
language and edition for which you have a license, and select the architecture (64-bit or 32-bit)
that matches the PC you're going to install on.

If you're not sure about the architecture, you can choose Both from the menu.

2101926 Page 11
Department of Information Technology

FIG NO.1.A.1.G: select the architecture

H. Choose an installation type and click Next. An ISO file is a type of file that can be burned to
a DVD, so choose that option if you plan to create a DVD. Otherwise, choose the USB flash drive
option.

FIG NO.1.A.1.H: choose media

2 .Booting from Windows 10 Installation Media:-

A. Connect your Windows 10 installation media. If you created a flash drive, connect it to the

2101926 Page 12
Department of Information Technology

FIG NO.1.A.2.A: connect installation media

B. Boot the PC into the BIOS. If your PC is not already set up to boot from your flash or optical
drive, rebooting from your installation media won't work. You'll need to make a quick change
in your BIOS to change the boot order. There are a few ways to get in:

Windows 8.1 or 10: From Windows, open Settings, select Update & Recovery or Update &
Security, and go to Recovery > Restart now > Troubleshoot > Advanced Options > UEFI
Firmware Settings > Restart.

Any PC: Reboot the PC and immediately start pressing (over and over again) the keyboard key
required by your PC to enter "Setup," or the BIOS. The key varies by computer, but here are
some of the most common keys:

Acer and Asus: F2 or Del

Dell: F2 or F12

HP: ESC or F10

2101926 Page 13
Department of Information Technology

FIG NO.1.A.2.B: BIOS feature

C. Go to the Boot tab. You'll use the arrow keys to select it. The Boot tab may instead say Boot
Options or Boot Order, depending on your computer's manufacturer.

FIG NO.1.A.2.C: Booting option

2101926 Page 14
Department of Information Technology

D. Select a device from which to boot. You have a couple of options here:

For a USB flash drive, select the Removable Devices option.

For a disc installation, select the CD-ROM Drive or Optical Drive option.

FIG NO.1.A.2.D: Booting option

E. Press the + key until your boot option is first. Once either Removable Devices or CD-ROM
Drive is at the top of the list, your computer will select your choice as its default boot option.

.Save your settings. You should see a key prompt F10 at the bottom of the screen that correlates
to "Save and Exit". Pressing it will save your settings and restart your computer.

FIG NO.1.A.2.E: Booting process

2101926 Page 15
Department of Information Technology

F. Wait for your computer to restart. Once your computer finishes restarting, you'll see a window
here with your geographical data. You're now ready to begin setting up your Windows 10
installation.

FIG NO.1.A.2.F: Restart

3 .Installing Windows 10:-

A. Click Next when prompted. You can also change the options on this page (e.g., the setup
language) before continuing if need be.

FIG NO.1.A.3.A: Installing window 10

B. Click Install Now. It's in the middle of the window.


2101926 Page 16
Department of Information Technology

FIG NO.1.A.3.B: Install

C. Enter your Windows 10 key, then click Next. If you don't have a Windows 10 key, instead
click Skip in the bottom-right corner of the screen.

If you've already installed Windows 10 on this PC and were signed in with your Microsoft
account, your key should be linked to your account. When prompted, just sign in with your
Microsoft account and Windows will locate your key

FIG NO.1.A.3.C : Activation

D. You can choose to install your Windows 10 system file to a certain partition here

2101926 Page 17
Department of Information Technology

FIG NO.1.A.3.D: Installation process

E.Windows 10 is now installing.

FIG NO.1.A.3.E: Installing Process

F.You are required to perform a restart of your computer now. When your PC starts back on,
you need to select the settings. It is suggested that you choose Customize if you don’t want to
change the settings later manually.

2101926 Page 18
Department of Information Technology

FIG NO.1.A.3.F: Restart


G.Sign in with your account now. Then hit Next to continue.

FIG NO.1.A.3.G: Sign in

H. These procedures are quite simple ,Now your window is ready and installed.

2101926 Page 19
Department of Information Technology

TASK NO. 1(b)

AIM : Installation of Linux operating System.

INTRODUCTION : Ubuntu is an operating system with Linux kernel based on Debian


and distributed as free and open source software. It’s one of the most popular operating systems
for Desktop and Server.

Ubuntu can be installed in two ways as follows :

 Using a DVD
It’s easy to install Ubuntu from a DVD.
Put the Ubuntu DVD into the DVD – drive. Restart your computer. You should see a
welcome screen prompting you to choose your language and giving you the option to
install Ubuntu or try it from the DVD.
If you don’t get this menu , read the booting from DVD guide for more information.
 Using a USB drive
Connect the USB flash drive to a new PC. Turn on the PC and press the key that opens
the boot-device selection menu for the computer, such as the Esc/F10/F12 keys. Select
the option that boots the PC from the USB flash drive. Windows Setup starts.

Ubuntu is an African word that literally means “humanity to others”.

What you’ll need to install ubuntu linux operating system :

• A laptop or PC (obviously) with at least 25GB of storage space.

• A flash drive (8GB as a minimum, 12GB or above recommended).

Installation of Ubuntu Linux Operating system:


Step 1: Make sure to save it to a memorable location on your PC .

FIG No 1.b.1 (download Ubuntu desktop)

2101926 Page 20
Department of Information Technology

Step 2: Create a bootable USB stick.

To install Ubuntu Desktop, you need to write your downloaded ISO to a USB stick to create the
installation media. This is not the same as copying the ISO, and requires some bespoke software. For
this tutorial, we’ll use balena Etcher, as it runs on Linux, Windows and Mac OS. Choose the version
that corresponds to your current operating system, download and install the tool.

FIG No 1.b.2 (download bootable USB stick)

Step 3: Select your downloaded ISO, choose your USB flash drive, and then click Flash! to
install your image.

FIG 1.b.3 (selecting ISO and USB flash drive)

Step 4: Most new computers can boot from USB. You should see a welcome screen prompting you
to choose your language and giving you the option to install Ubuntu or try it from the CD.If your
computer doesn’t automatically do so, you might need to press the F12 key to bring up the boot menu,
but be careful not to hold it down – that can cause an error message.

2101926 Page 21
Department of Information Technology

FIG 1.b.4 (boot the restart device)

Use the checkboxes to choose whether you’d like to Install Ubuntu alongside another operating
system, delete your existing operating system and replace it with Ubuntu, or-if you’re an
advanced user - choose the ‘Something else’ option.

FIG 1.b.6 (drive space allocated and installation begins)

Step 5: Prepare to install ubuntu

Plug your computer into a power source and have enough space on your computer to install
Ubuntu.
Step 6: Allocate the drive space.

2101926 Page 22
Department of Information Technology

Step 7: Select your location.

Select your location and timezone from the map screen and click Continue. This information
will be detected automatically if you are connected to the internet.

FIG 1.b.7 (choosing location on world map)

Step 8: Select your preferred keyboard layout.


Click on the language option you need. This information will be detected automatically if you
are connected to the internet.

FIG 1.b.8 (choosing keyboard layout)

Step 9: Enter your login password and details

2101926 Page 23
Department of Information Technology

FIG 1.b.9 (entering password and login id)

Step 10: Complete the Installation


Now sit back and enjoy the slideshow as Ubuntu installs in the background!

FIG 1.b.10 (Ubuntu installed)

Step 11: Once the installation has completed, you will be prompted to restart your machine.Click
Restart Now.

FIG 1.b.11 (prompt screen)

2101926 Page 24
Department of Information Technology
TASK NO 2
AIM : Introduction to Virtualization and installation of virtual box.
INTRODUCTION : Virtual box allows you to run an entire operating system inside
another operating system. We must have a minimum of 512 MB of RAM. 1 GB of RAM or
more is recommended.

 Advantages of Virtual Installation :


The size of the installation doesn't have to be predetermined. It can be a dynamically
resized virtual hard drive.
● You do not need to reboot in order to switch between Ubuntu and Windows.
● The virtual machine will use your Windows internet connection, so you don't have to
worry about Ubuntu not detecting your wireless card, if you have one.
● The virtual machine will set up its own video configuration, so you don't have to
worry about installing proprietary graphics drivers to get a reasonable screen resolution.
● You always have Windows to fall back on in case there are any problems. All you
have to do is press the right Control key instead of rebooting your entire computer.
● For troubleshooting purposes, you can easily take screenshots of any part of Ubuntu
(including the boot menu or the login screen).
● It's low commitment. If you later decide you don't like Ubuntu, all you have to do is
delete the virtual hard drive and uninstall VirtualBox.

 Disadvantages of Virtual Installation :


In order to get any kind of decent performance, you need at least 512 MB of RAM,
because you are running an entire operating system (Ubuntu) inside another entire
operating system (Windows). The more memory, the better. I would recommend atleast
1 GB of RAM.
● Even though the low commitment factor can seem like an advantage at first, if you
later decide you want to switch to Ubuntu and ditch Windows completely, you cannot
simply delete your Windows partition. You would have to find some way to migrate
out your settings from the virtual machine and then install Ubuntu over Windows
outside the virtual machine.

2101926 Page 25
Department of Information Technology

● Every time you want to use Ubuntu, you have to wait for two boot times (the time it
takes to boot Windows, and then the time it takes to boot Ubuntu within Windows).

Installation of Virtual Box:

Step 1: Go to page above and download the binary version for Windows host. After
downloading, run the executable to begin installing the software. When you start the
installation, you should get a prompt.

FIG 2.1 (installation of virtual box)

Step 2: During the installation wizard, you’ll get a Network Interfaces warning.. Click Yes to
proceed. If you’re in the process of downloading or copying files and data, this will interrupt
your network connection briefly. So, maybe pause the process or wait until you’re done before
installing VirtualBox.

FIG 2.2 (Network Interface Warning)

2101926 Page 26
Department of Information Technology

Step 3: On the next screen, click Install to begin installing the program.

FIG 2.3 (installing virtual box)

Step 4: Install Virtual Box extension pack.

FIG 2.4 (Installation of extension pack)

Then select extension, click the browse button to the right to find the download extension
pack.

FIG 2.4.a (Select the extension pack)

2101926 Page 27
Department of Information Technology

Step 5: After you launch VirtualBox from the Windows Start menu, click on New to create a
new virtual machine. When the New Virtual Machine Wizard appears, click Next.

FIG 2.5 (create virtual machine)

Step 6: You can call the machine whatever you want. If you're installing Ubuntu, it makes
sense to call it Ubuntu, I guess. You should also specify that the operating system is Linux.

FIG 2.6 (select the OS type)

Step 7: Ubuntu's default installation is less than 3 GB. If you plan on adding software or
downloading large files in your virtualized Ubuntu, you should tack on some buffer.

FIG 2.7 (Virtual disk file location)

2101926 Page 28
Department of Information Technology
Step 8: Select the ubuntu .iso that is download earlier.

FIG 2.8 (select iso file)

FIG 2.8.a (click on virtual machine to start up)

Step 9: Wait for ubuntu to boot up.

FIG 2.9 (booting ubuntu)

2101926 Page 29
Department of Information Technology

Step 10: Once it’s started up follow the regular installation procedure to install ubuntu.

FIG 2.10 (installing ubuntu in virtual box)

2101926 Page 30

You might also like