OSPractical File New
OSPractical File New
Submitted by:
Name :
Roll no. :
STEP 3:
Select the drive unit that contains the Windows 10 installer.
STEP 4:
A message to Press any key to boot from the CD or DVD… appears. Pressing any key will start the Windows
10 install process and the Windows 10 logo will appear.
STEP 5:
The first step is to choose to Install now.
STEP 6:
Next, we’ll need to choose the language of the interface, the time and currency format, and
the keyboard layout
STEP 7:
Next step is to enter the Windows 10 product key.
STEP 8:
Select the Windows edition you want to install. It must match the product key entered earlier or else Windows won’t
activate.
STEP 9:
To proceed you need to agree to licensing terms (EULA).
STEP 10:
Select the installation type: Upgrade an existing installation of Windows (version 7, 8, or 10) or Custom.
Since it’s a new computer we’ll be choosing the latter option.
STEP 11:
The installer will check the disk where Windows files will be copied. At this step, you can partition the existing disk
into smaller virtual disks (recommended for bigger disks). If you only have one unformatted disk just select it and hit
Next. The installer will create all needed partitions.
STEP 12:
The setup will now start to copy files from the install disk to their destination.
STEP 13:
At this step you’ll be asked to select the geographical region, and keyboard layout again. They can differ and will
override the settings from step 6. Optionally, you can add more keyboard layouts (use WIN + Shift to switch between
them while using Windows).
STEP 14:
Now it’s time to select the type of predefined set-up: for Personal use or Organization, in which case a system
administrator will enforce some settings for you. We’ll be using Personal for our guide.
STEP 15:
we’ll create the first user account which will also act as the administrator for this computer. Microsoft will
push you towards using a Microsoft online account, but you can also set up an offline account.
STEP 16:
I didn’t remember this step, but it seems you now must select 3 security questions that will help you recover your
account in case you forget the password.
Step 17
September 17, 1991. It is a free and open-source operating system and the source code can
GNU General Public License. Initially, Linux was created for personal computers
and gradually it was used in other machines like servers, mainframe computers,
supercomputers, etc. Nowadays, Linux is also used in embedded systems like routers,
automation controls, televisions, digital video recorders, video game consoles, smart
watches, etc. The biggest success of Linux is Android (operating system) it is based on the
Linux kernel that is running on smart phones and tablets. Due to android Linux has the
After downloading the program, open it and choose from the list the
distribution we want to install, here we will choose Linux mint.
Now we can boot with this memory stick.
After that we should Restart our PC and proceed to BIOS settings
thereafter select boot options and make sure that the USB is the firstoption,
then save our BIOS settings and reboot.
As soon as the installation screen appears, click on Enter and it will loadthe live
CD content.
Click install Linux Mint
Now choose the language used for installation.
Click install Linux Mint
Now choose the language used for installation.
Then choose the installation type. We should be more careful if we are
installing Linux on a disk that contains other operating systems, we MUST
choose the option called SOMETHING ELSE.
If we are installing it on a new disk, choose the option Erase disk.
Now we will create them by clicking the plus button and choose about 12 GB
or more as we need but not less than that for the root partition, and choose
mount type as / which stands for root and of course format will be Ext4.
Now we create a swap partition, choose the remaining free space
Linux and Windows both are operating systems. Linux is open source and is free to usewhereas
Windows is a proprietary.
Following are the important differences between Linux and Windows.
Open Linux is Open Source and is free to use. Windows is not open source and is not
1
Source free to use.
Case Linux file system is case sensitive. Windows file system is case
2
sensitivity insensitive.
Path Linux uses forward slash as path Windows uses backward slash as apath
5
Separator separator between directories. separator.
2. A Windows 10 license
If Windows 10 came with our PC, the license will be built into the computer, so we don't need to
worry about entering it during installation. If we bought the retail edition, we should have a
product key, which we will need to enter during the installation process.
Select which version of Windows we want to install. If we have a retail copy, the label will tell
us what version we have. Otherwise, it is typically located with the documentation that came with
our computer. In most cases, it's going to be either Windows 10 Home or Windows 10 Pro.
Most PCs that come with the Home edition have a label that simply reads "Windows 10," while
Pro is clearly marked.
Accept the license agreement by checking the box, then click Next.
After accepting the agreement, we have two installation options available. Choose thesecond
option, Custom: Install Windows only (advanced).
The next screen should show our current hard disk configuration.
We will probably see one or more partitions for our current operating system.
Highlight each partition and remove it.
At this point, our screen will show our entire disk as unallocated. To continue,create
a new partition.
Here we can see that we divided the drive in half (or close enough) by creating a
partition of 81,920MB (which is close to half of 160GB). Give Windows at least
40GB, preferably 64GB or more. Leave the rest of the driveunallocated, as that's
where we'll install Ubuntu later.
our results will look similar to this:
Confirm the partitioning looks good to us and click Next. Windows will begin
installing.
Our computer successfully boots into Windows, we're all set to move on to thenext step.
Install Ubuntu
use the Ubuntu installation media we created earlier to boot into Ubuntu. Insert the media and boot
our computer from it. Again, the exact sequence of keys to access the boot menu varies from one
computer to another, so check our documentation if we'renot sure. If all goes well, we see the
following screen once the media finishes loading:
Here, we can select between Try Ubuntu or Install Ubuntu. Don't install justyet;
instead, click Try Ubuntu. After it finishes loading, we should see the Ubuntu
desktop.
Double-click on the Install Ubuntu 20.04 LTS icon on the desktop to launch the installer.Choose
the language we want to use for the installation process, then click Continue.
Next, choose the keyboard layout. Once we've made our selection, click Continue. We have a few
options on the next screen. We can choose a Normal or a Minimal installation. For most people,
Normal installation is ideal. Advanced users may want to do a Minimal install instead, which has
fewer software applications installed by default.In addition, we can choose to download updates
and whether or not to include third- party software and drivers. We recommend checking both of
those boxes. When done, click Continue.
The next screen asks whether we want to erase the disk or set up a dual-boot.Since we're
dual-booting, choose Install Ubuntu alongside Windows 10.
Click Install Now.
The following screen may appear. If we installed Windows from scratch and left unallocated space
on the disk, Ubuntu will automatically set itself up in the empty space. If we already had
Windows 10 installed and it's taking up the entire drive, this screen will appear and give us an
option to select a disk at the top. If we have just one disk, we can choose how much space to steal
from Windows and apply to Ubuntu. we can drag the vertical line in the middle left and right with
our mouse to take space away from one and gives it to the other. Adjust this exactly the way
we want it, then click Install Now.
We should see a confirmation screen indicating what Ubuntu plans on doing. If everything looks
right, click Continue.
Ubuntu installs in the background, but we still have some configuration to do. While Ubuntu tries
its best to figure out our location, we can click on the map to narrow it downto ensure our time
zone and other things are set correctly.
Next, fill in the user account information: your name, computer name, username, and
password. Click Continue when you're done.
Once the installation finishes, reboot our PC.
If all went according to plan, we should see a screen similar to this when our
computer restarts. Choose Ubuntu or Windows 10; the other options are for
troubleshooting, so we won't go into them.
EXPERIMENT
1 OBJECTIVE
Write a C program to simulate the following non-preemptive CPU scheduling algorithms to find
turnaround time and waiting time for the above problem. a) FCFS b) SJF c) Round Robin d)
Priority
2 DESCRIPTION
For FCFS scheduling algorithm, read the number of processes/jobs in the system, their CPU burst
times. The scheduling is performed on the basis of arrival time of the processes irrespective of
their other parameters. Each process will be executed according to its arrival time. Calculate the
waiting time and turnaround time of each of the processes accordingly.
For SJF scheduling algorithm, read the number of processes/jobs in the system, their CPU burst
times. Arrange all the jobs in order with respect to their burst times. There may be two jobs in
queue with the same execution time, and then FCFS approach is to be performed. Each process
will be executed according to the length of its burst time. Then calculate the waiting time and
turnaround time of each of the processes accordingly.
For round robin scheduling algorithm, read the number of processes/jobs in the system, their
CPU burst times, and the size of the time slice. Time slices are assigned to each process in equal
portions and in circular order, handling all processes execution. This allows every process to get
an equal chance. Calculate the waiting time and turnaround time of each of the processes
accordingly.
For priority scheduling algorithm, read the number of processes/jobs in the system, their CPU
burst times, and the priorities. Arrange all the jobs in order with respect to their priorities. There
may be two jobs in queue with the same priority, and then FCFS approach is to be performed.
Each process will be executed according to its priority. Calculate the waiting time and turnaround
time of each of the processes accordingly.
FCFS CPU SCHEDULING ALGORITHM
INPUT
Enter the number of processes -- 3
Enter Burst Time for Process 0 – 24
Enter Burst Time for Process 1 – 3
Enter Burst Time for Process 2 – 3
OUTPUT
SJF CPU SCHEDULING ALGORITHM
/* Program of SJF CPU Scheduling Algorithm */
#include<stdio.h>
#include<conio.h>
void main()
{
int p[20], bt[20], wt[20], tat[20], i, k, n, temp;
float wtavg, tatavg;
clrscr();
printf("\nEnter the number of processes -- ");
scanf("%d", &n);
for(i=0;i<n;i++)
{
p[i]=i;
printf("Enter Burst Time for Process %d -- ", i);
scanf("%d", &bt[i]);
}
for(i=0;i<n;i++)
for(k=i+1;k<n;k++)
if(bt[i]>bt[k])
{
temp=bt[i];
bt[i]=bt[k];
bt[k]=temp;
temp=p[i];
p[i]=p[k];
p[k]=temp;
}
wt[0] = wtavg = 0;
tat[0] = tatavg = bt[0];
for(i=1;i<n;i++)
{
wa[i]=tat[i]-ct[i];
att+=tat[i];
awt+=wa[i];
}
printf("\nThe Average Turnaround time is -- %f",att/n);
printf("\nThe Average Waiting time is -- %f ",awt/n);
printf("\n\tPROCESS\t BURST TIME \t WAITING TIME\tTURNAROUND TIME\n");
for(i=0;i<n;i++)
printf("\t%d \t %d \t\t %d \t\t %d \n",i+1,ct[i],wa[i],tat[i]);
getch();
}
INPUT
Enter the no of processes – 3
Enter Burst Time for process 1 – 24
Enter Burst Time for process 2 -- 3
Enter Burst Time for process 3 – 3
Enter the size of time slice – 3
OUTPUT:
PRIORITY CPU SCHEDULING ALGORITHM
#include<stdio.h>
#include<conio.h>
void main()
{
int p[20],bt[20],pri[20], wt[20],tat[20],i, k, n, temp;
float wtavg, tatavg;
clrscr();
printf("Enter the number of processes --- ");
scanf("%d",&n);
for(i=0;i<n;i++)
{
p[i] = i; printf("Enter the Burst Time & Priority of Process %d --- ",i);
scanf("%d %d",&bt[i], &pri[i]);
}
for(i=0;i<n;i++)
for(k=i+1;k<n;k++)
if(pri[i] > pri[k])
{
temp=p[i];
p[i]=p[k];
p[k]=temp;
temp=bt[i];
bt[i]=bt[k];
bt[k]=temp;
temp=pri[i];
pri[i]=pri[k];
pri[k]=temp;
}
wtavg = wt[0] = 0;
tatavg = tat[0] = bt[0];
for(i=1;i<n;i++)
{
` wt[i] = wt[i-1] + bt[i-1];
tat[i] = tat[i-1] + bt[i];
wtavg = wtavg + wt[i];
tatavg = tatavg + tat[i];
}
INPUT
Enter the number of processes -- 5
Enter the Burst Time & Priority of Process 0 --- 10 3
Enter the Burst Time & Priority of Process 1 --- 1 1
Enter the Burst Time & Priority of Process 2 --- 2 4
Enter the Burst Time & Priority of Process 3 --- 1 5
Enter the Burst Time & Priority of Process 4 --- 5 2
OUPUT:
EXPERIMENT
1 OBJECTIVE
2 DESCRIPTION
A file is a collection of data, usually stored on disk. As a logical entity, a file enables to
divide data into meaningful groups. As a physical entity, a file should be considered in
terms of its organization. The term "file organization" refers to the way in which data is
stored in a file and, consequently, the method(s) by which it can be accessed.
In this file organization, the records of the file are stored one after another bothphysically
and logically. That is, record with sequence number 16 is located just after the 15th record.
A record of a sequential file can only be accessed by reading all theprevious records.
With linked allocation, each file is a linked list of disk blocks; the disk blocks may be
scattered anywhere on the disk. The directory contains a pointer to the first and last
blocks of the file. Each block contains a pointer to the next block.
Indexed file allocation strategy brings all the pointers together into one location: an index
block. Each file has its own index block, which is an array of disk-block addresses. The ith
entry in the index block points to the ith block of the file. The directory contains the
address of the index block. To find and read the ith block, the pointer in the ith index-
block entry is used.
SEQUENTIAL FILE ALLOCATION
/* Program of Sequential File Allocation */
#include<stdio.h>
#include<conio.h>
struct fileTable
{
char name[20];
int sb, nob;
} ft[30];
void main()
{
int i, j, n;
char s[20];
clrscr();
printf("Enter no of files :");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\nEnter file name %d :",i+1);
scanf("%s",ft[i].name);
printf("Enter starting block of file %d :",i+1);
scanf("%d",&ft[i].sb);
printf("Enter no of blocks in file %d :",i+1);
scanf("%d",&ft[i].nob);
}
printf("\nEnter the file name to be searched -- ");
scanf("%s",s);
for(i=0;i<n;i++)
if(strcmp(s, ft[i].name)==0)
break;
if(i==n)
printf("\nFile Not Found");
else
{
printf("\nFILE NAME START BLOCK NO OF BLOCKS BLOCKS OCCUPIED\n");
printf("\n%s\t\t%d\t\t%d\t",ft[i].name,ft[i].sb,ft[i].nob);
for(j=0;j<ft[i].nob;j++)
printf("%d, ",ft[i].sb+j);
}
getch();
}
INPUT:
Enter no of files :3
Enter file name 1 :A
Enter starting block of file 1 :85
Enter no of blocks in file 1 :6
Enter file name 2 :B
Enter starting block of file 2 :102
Enter no of blocks in file 2 :4
Enter file name 3 :C
Enter starting block of file 3 :60
Enter no of blocks in file 3 :4
Enter the file name to be searched -- B
OUTPUT
LINKED FILE ALLOCATION
/* Program of Linked File Allocation */
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
struct fileTable
{
char name[20];
int nob;
struct block *sb;
}ft[30];
struct block
{
int bno;
struct block *next;
};
void main()
{
int i, j, n;
char s[20];
struct block *temp;
clrscr();
printf("Enter no of files :");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\nEnter file name %d :",i+1);
scanf("%s",ft[i].name);
printf("Enter no of blocks in file %d :",i+1);
scanf("%d",&ft[i].nob);
ft[i].sb=(struct block*)malloc(sizeof(struct block));
temp = ft[i].sb;
printf("Enter the blocks of the file :");
scanf("%d",&temp->bno);
temp->next=NULL;
for(j=1;j<ft[i].nob;j++)
{
temp->next = (struct block*)malloc(sizeof(struct block));
temp = temp->next;
scanf("%d",&temp->bno);
}
temp->next = NULL;
}
printf("\nEnter the file name to be searched -- ");
scanf("%s",s);
for(i=0;i<n;i++)
if(strcmp(s, ft[i].name)==0)
break;
if(i==n)
printf("\nFile Not Found");
else
{
printf("\nFILE NAME NO OF BLOCKS BLOCKS OCCUPIED");
printf("\n %s\t\t%d\t",ft[i].name,ft[i].nob);
temp=ft[i].sb;
for(j=0;j<ft[i].nob;j++)
{
printf("%d ",temp->bno);
temp = temp->next;
}
}
getch();
}
INPUT:
Enter no of files : 2
Enter file 1 : A
Enter no of blocks in file 1 : 4
Enter the blocks of the file 1 : 12 23 9 4
Enter file 2 : G
Enter no of blocks in file 2 : 5
Enter the blocks of the file 2 : 88 77 66 55 44
OUTPUT:
INDEXED FILE ALLOCATION
/* Program of Indexed File Allocation */
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
struct fileTable
{
char name[20];
int nob, blocks[30];
}ft[30];
void main()
{
int i, j, n;
char s[20];
clrscr();
printf("Enter no of files :");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\nEnter file name %d :",i+1);
scanf("%s",ft[i].name);
printf("Enter no of blocks in file %d :",i+1);
scanf("%d",&ft[i].nob);
printf("Enter the blocks of the file :");
for(j=0;j<ft[i].nob;j++)
scanf("%d",&ft[i].blocks[j]);
}
Enter no of files : 2
Enter file 1 : A
Enter no of blocks in file 1 : 4
Enter the blocks of the file 1 : 12 24 34 44
Enter file 2 : G
Enter no of blocks in file 2 : 5
Enter the blocks of the file 2 : 46 56 66 76 88
Enter the file to be searched : G
OUPUT :
Advantages Of Linux
Linux is an operating system just like Windows; Mac OS X developed by Linus Torvalds in 1991.
Operating system is the interface between the software and the hardware. It provides services for the
applications and manages computer hardware. Initially, Linux was just an operating system but now it
became the platform to run desktops, embedded systems, and servers. It was developed as an alternative
for Minix (UNIX clone developed by Andrew S. Tanenbaum).
1. Open Source
One of the main advantages of Linux is that it is an open source operating system i.e. its source code is
easily available for everyone. Anyone capable of coding can contribute, modify, enhance and distribute
the code to anyone and for any purpose.
2. Security
Linux is more secure in comparison to other operating systems such as Windows. Linux is not completely
secure as there is some malware for it also but it is less vulnerable than others. Every program in Linux
whether an application or a virus needs authorization from the administrator in the form of a password.
Unless the password is typed virus won’t execute. There is no requirement of any anti-virus program in
Linux.
4. Software Updates
In Linux we encounter a larger number of software updates. These software updates are much faster than
updates in any other operating system. Updates in Linux can be done easily without facing any major issue
or concern.
5. Customization
A feature that gives a major advantage over other operating systems is customization. We can customize
any feature, add or delete any feature according to your need as it is an open source operating system. Not
only this, various wallpapers and attractive icon themes can be installed.
6. Various Distributions
There are many distributions available also called distros of Linux. It provides various choices or flavors to
the users. We can select any bistros according to our needs. Some bistros of Linux are Fedora,
Ubuntu, Arch Linux, Debian, Linux Mint and many more. If we are a beginner we can use Ubuntu
or Linux Mint. If we are a good programmer we may use Debian or Fedora.
If we are using any major operating system we are indirectly interacting to shell. If we are
running Ubuntu, Linux Mint or any other Linux distribution, we are interacting toshell
every time we use terminal.
What is Kernel
The kernel is a computer program that is the core of a computer’s operating system, with
complete control over everything in the system. It manages following resources ofthe Linux
system –
File management Process
management I/O
management Memory
management Device
management etc.
It is often mistaken that Linus Torvalds has developed Linux OS, but actually he is only
responsible for development of Linux kernel. Complete Linux system = Kernel + GNU system
utilities and libraries + other management scripts + installation scripts.
What is Shell
A shell is special user program which provide an interface to user to use operating system services.
Shell accept human readable commands from user and convert them into something which kernel
can understand. It is a command language interpreter that execute commands read from input
devices such as keyboards or from files. The shell gets started when the user logs in or start the
terminal.
Shell is broadly classified into two categories –
Command Line Shell
Graphical shell
Graphical Shells
Graphical shells provide means for manipulating programs based on graphical user interface
(GUI), by allowing for operations such as opening, closing, moving and resizing windows, as
well as switching focus between windows. Window OS or Ubuntu OS can be considered as
good example which provide GUI to user for interacting with program. User do not need
to type in command for every actions.A typical GUI in Ubuntu system –