practical of operating system-1
practical of operating system-1
overview of single user system, network operating system and multiuser system
Single user operating is that in which one user works on one interface. In these systems
no other operating system is interrupting with the processing. Single user operating
systems work on processing that require less resources. Today we will discuss some of
advantages and disadvantages of these systems.
In this, only one user can perform a task at a time. This operating system specially
designs for cordless phones and two-way messaging devices. Some functions, such as
printing a document and downloading images and videos, are performed after the idea
is provided.
The multitasking operating system specially develops for one user, but that single user
can simultaneously perform multiple tasks. Some examples include typing any text
while browsing the Internet and downloading images while watching movies, etc.
Advantages: -
1) Therefore, this operating system does not need to support the overhead of requests
from multiple users.
2) Multiple resources do not use in a single operating system, so they are less complex.
For this reason, this operating system is only required for simple maintenance and
debugging.
3) Multiple resources do not use in a single operating system, so they are less complex.
For this reason, this operating system is only required for simple maintenance and
debugging.
4) Multiple resources do not use in a single operating system, so they are less complex.
For this reason, this operating system is only required for simple maintenance and
debugging.
5) The multitasking operating system specially develops for one user, but that single
user can simultaneously perform multiple tasks. Some examples include typing any
text while browsing the Internet and downloading images while watching movies,
etc.
Disadvantages: -
1) This system cannot optimize CPU, memory, and disk I / O to the optimum level due
to high CPU sleep group demand.
2) It has a high response time.
3) And also, it uses high downtime.
4) And also, it cannot perform multiple tasks simultaneously, so the processor waits for
execution until a job completes.
1) Peer-to-Peer: -
Peer-to-peer networks are network resources where each and every system has the
same responsibilities and capabilities, i.e., no system in this design is more functional
than the others.
2) Client-Server: -
It refers to a server-based network where clients and servers share storage.
2
Common features of network operating systems: -
Advantages: -
Disadvantages: -
In a multiuser operating system, multiple numbers of users can access different resources
of a computer at the same time. The access is provided using a network that consists of
various personal computers attached to a mainframe computer system. A multi-user
operating system allows the permission of multiple users for accessing a single machine
3
at a time. The various personal computers can send and receive information to the
mainframe computer system. Thus, the mainframe computer acts as the server and other
personal computers act as clients for that server.
Features: -
1) Time-sharing
2) Background sharing
3) Invisibility: Many functions of multi-user operating systems are invisible to the user.
4) Resource sharing: This maps to time slicing, multiple peripherals such as printers can
be shared different files or data.
Advantages: -
4
Disadvantages: -
1) It requires expensive hardware to set up a mainframe computer.
2) When multiple users log on or work on the same system it reduces the overall
performance of the system.
3) Information is shared with the public so privacy becomes a concern here.
5
Practical No: -2
User administration in Windows and Linux operating system
The User Administration tool allows you to configure a wide range of ways for users to
access the system.
The user admin tool provides a means of creating and deleting users as well as upgrading
user passwords.
In windows: -
1) Select Start > Settings > Accounts and then select Family & other users. (In some
versions of Windows, you will see other users).
2) Next to Add other user, select Add account.
3) Select I do not have this person's sign-in information, and on the next page, select
Add a user without a Microsoft account.
4) Enter a user name, password, or password hint — or choose security questions —
and then select Next.
6
In Linux: -
Linux User Administration denotes how to manage a user account or group accounts. It
deals with creating the user account, adding the user to the group, modifying it as well as
deleting the account.
Types of users: -
There are three types of users in Linux: - root, regular and service.
User creation: -
The first step in Linux user administration is knowing how to create user accounts. We
can use either user add or add user command followed by the username:
7
Account modification: -
To modify an already existing account, we use usermod command:
Have a look by using the less command, so you can scroll through the entire file:
$ less /etc/passwd.
8
Practical No: -3(a)
Write a program for the simulation of FCFS non-pre-emptive CPU scheduling algorithm to
find turnaround time and waiting time.
#include<iostream>
#include <iomanip>
using namespace std;
int main ()
{
int i, at [50] = {0}, bt [50] = {0}, sum=0, ct [50] = {0}, tat [50] = {0}, wt [50] = {0}, n;
cout<<"\nEnter the no. of processes= ";
cin>>n;
cout<<endl;
for (i = 0; i <n; i++)
{
cout<<"Enter the Arrival Time for process "<<i+1<<"=";
cin>>at[i];
}
cout<<endl;
for (i = 0; i <n; i++)
{
cout<<"Enter the Burst Time for process "<<i+1<<"=";
cin>>bt[i];
}
//Completion Time
for (int j = 0; j <n; j++)
{
sum=sum+bt[j];
ct[j]=ct[j]+sum;
}
//Turn Around Time
9
for (int k = 0; k <n; k++)
9
{
tat[k]=ct[k]-at[k];
}
//Waiting Time
for (i = 0; i <n; i++)
{
wt[i]=tat[i]-bt[i];
}
cout<<endl;
cout<<"PROCESSES ARRIVAL TIME BURST TIME COMPLITION TIME TURN
AROUND
TIME WAITING TIME";
cout<<endl;
for (int l=0; l<n; l++)
{
cout<<"PROCESS "<<l+1<<setw(8)
<<at[l]<<setw (15) <<bt[l]<<setw(15) <<ct[l]<<setw(17)<<tat[l]<<setw(17)<<wt[l]<<endl;
}
return 0;
}
Output: -
10