Professional Documents
Culture Documents
Os 1
Os 1
OPERATING SYSTEM
COMPUTER
HARDWARE
Mobile OS
Attributes Cloud OS
Cloud OS typically
has web-based
Mobile OS has a user interface
interface that can be
that is optimized for smaller
User interface accessed throughT
screens and touch input.
web browser on any
device.
CloudOS stores data Mobile OS typically stores
Storage and applications on
data and applications on the
remote servers in the
device.
cloud.
Cloud OS provides
Mobile OS provides security
security features to
features to protect against
Security protect data and
and other
theft, malware,
applications stored
threats to the device.
on remote SserverS.
Cloud OS requires
an internet Mobile OS is designed to work
Connection to access with cellular networks and
Connectivity Wi-Fi for internet
the cloud based
applications and connectivity.
services.
Cloud OS
Comparison of CloudMe, Amoeba OS, and Slap Os.
Slap OS
Attributes CloudMe AmoebaOS
graphical user
Amoeba OS is
designed to be
CloudMe is also
scalable acrosS Slap OS
scalable platform multiple computers, scalable and can run
that can handle large making it suitable for on a variety of
Scalability
amounts of data and high-performance hardware platforms.
users. computing
applications.
also open
Slap OS is
Amoeba OS is open free to
SOurce and
CloudMe is Source and free
to users mnay
use, but
Cost subscription-based but additional need to pay for
use,
service with varying security tools may additional support
plans and pricing. purchased. and services.
need to be
Mobile OS
" Windows Mobile OS.
Differentiate betweeen Android S, BlBlackberry OS and
Windows
Attributes Android OS Blackberry OS Mobile OS
Androjd OS has a
customizable user Mobile OS
BlackberTy OS has a Windows
interface, which traditional interface has tile-based
compatible with
development.
Blackberry OS has Windows Mobile OS
Android has
more limited also has robust
robust multitasking
capabilities, allowing multitasking
multitasking
Multitasking users to switch capabilities due to its capabilities, allowing
hardware limitations users to switch
between apps
and limited app between apps
seamlessly. ecosystem. seanlessly.
foxpuimnd -2
Conmas
knel. os
Tenvalds bu scplemby I1991. t is a
beercially le t
eonmerially uims
en-
1. Qutly , inr
GNU [Gennt Publie
ed n h macin iko
was cemputer etr
man fooume cemtus, usl
alee wed n embediol
vide eeden,matuth
ete. ekatiy ygtm hat
a cellstien ) bas
made libiw and
tho
4. Ubuntin
1: Mx linus
5. debian
Manjare
Miit k. Solus
RCHITEe TURE
(INUX
tho
coumen haaluse
Vlual
that de
tto
LINUX COMMAUDS
Qutpt
rooteip-172-31-8-51 ec2-user]i pwd
/home/ec2-user
olit.
k din: beate
shiva
[root&ip-172-31-8-51 ec2-user] # mkir
Erooteip-172-31-8-51 ec2-user] # ls
kartik shiva
eelpud:
diuley
(root@ip-172-31-8-51 ec2-user# mdir shiva
(Toot®ip-172-31-8-51 ec2-user] ls
|kartik
cd:
clang
(rootip-172-31-8-51
bash: cd: ec2-userl! cd Documents
Documents: No such file or directory
(rooteip-172-31-8-51 ec2-user]
[rooteip-172-31-8-51~]#
Iroot pwd cd
(rootlip-172-31-8-51]!/] pwd
[root@ip-172-31-8-51 cd .
(root@ip- 172-31-8-51 /)
cd/
(rootlip-172-31-8-51 /1 pwd
5. touehi
te a
cuteut
[root@ip-172-31-8-51 /] cat >£ile3. txt
line 1
1ine 2
line 3
line 4
line 5
(rooteip-172-31-8-51 /) cat file3.txt
line 1
line 2
ine 3
line 4
line 5
7:
Qetput -
root0ip-172-31-8-51)E cat: S£ileltext
New Filel,
[rooteip-172-31-8-51
m cemove
reqular
{1mfilel.text y
filefile1.text'?
ut
rooteip-172-31-8-51 /# cp tile3. txt dirl
[rooteip-172-31-8-51 /1,cp file3.txt filez.txt dirl
FP overwrite dic1/file3.txt'? yes
9. tig
amth
6
7
6
[ec2user@ip-172*31-8-51 ]$ more file2.txt
7
6
14. as
winlude
tumina
total4
rw-rW-I 1 ec2--user ec2-user 16 Mar 27 14:17. file2. txt
r w - r - 1 root rOot 0 Mar 2513:26 kartik
ESC
The
7
6
6
rec2-sereip-172-31-85RNS grep 9 file2: txt
29Ybeam
thes colins fut
both column
(ec2-user@ip-172-31-8-51 ]_ cat fl.txt
10
20
30
40
40
[ec2-usereip-172-31-8-51 ~]_ cat f2.txt
30
40
50
60
70
(ec2-userip-172-31-8-51)s comm fl.txt f2.tXt
10
20
30
40
40
50
60
70
[ec2-user@ip-172-31-8-54-]$
17: : Ta danalete
348!
ehatrs in
(ec2-userlip-172-31-8-51 ~]$ wc file2.txt
8816 file2: txt N
rec2usereip-172-31-8-51~J$ wc -l file2. txt
B file2.txt
rec2-userip-172-31l-8-51 J$ WC-c file2. txt
16ec2-usereip-172-31-8-51
file2.txt -]$ W -W file2. txt
8tec2-usereip-172-31-8-51-15
file2.txt, |
partiulas fito wthin
fid oqlisn lofd
dupocu vaniw dat
als
name f2.txt
(ec2-user@ip-172-31-8-51 +1$ find
./t2.txt
(ec2-usereip-172-31-8-51 1$
lonan
20. fud tt
pdalas
(ec2-usereip-172-31-8-51 ~]$ touch file3.txt
lec2-user@ip-172-31-8-51]$ touch file3.txt
[ec2-usereip-172-31-8-511$
[ec2-user@ip-172-31-8-511s
[ec2-user@ip-172-31-8-51,-]$
[ec2-usereip-172-31-8-51 -15 locate file3. txt
/Eile3.txt
/dir1/£ile3.txt
(ec2-user@ip-112-31-8
(al: ti ued
92. calenoleL with
ec2-usereip-172-1K-blocks
Eitmpfs
lesystem
devtmpfs 31-495088
8-51 -)^ df Used Available Use% Mounted on
tmpfs 502916 495088 0% /dev
tmpfs 502916 502916 0% /dev/shm
Idev/xvdal
trmpfs 502916
8376300 4013512
428 502488
502916
1% /run
0% /sys/Es/cgroup
(ec2-inetulink/loopback
13 l0:
seOOPBACK,
reip-172-31-00:8LOWER-5010:00:0000:00
UR 1$ ip addr
u 65536 gdisc
nogueue:state UNKNONN group default glen 1000
12,0.01/83cope host lo brd
valid 1tt torever 00:00:00:00:00:00
net6 :1/128 scopehost
yalid ltt torever
preferred 1ft forever
U BROADCAST, preferred
MULTICAST, lft
UP,LOHER torever
UP mu
link/ether 02:c4A:32:a11c:34 brd go01ddisc pfifo fast state UP groUP k
net
17231.8.51/20
valid brd ff:ff:ff:ff:£f:ff
172.3115.255
1ft 2669sec preferred scope
lft 2669sec global.dynamic etho,
net6-fe80:c4325E
ylidTEt toreve Led1:1c34/64scope link
PeferEed 1ftEorever
ec2-usereip-172-31-8-51JSi
d te ek t
bitweon
Cenneld
tue edu Lhethu
Packd
[ec2-user®ip-172--31-8-51 -1$
[ec2-user@ip 172--31-8-511$
[ec2-usereip-172-31-8-51-19s
ec2-usereip-172-31-8-51-)$ ping www.google.com
RING WWM, googlecom (172.217.2.36) 56(84), bytes of data.
64bvtes from ord37s52=in f4le100.net
A 12,217.2.36) : icmp seg1 ttl46
a hutesfromiord31352-in-f4 net22:2172.36)
1e100 :icmp seg2 ttl=46 times171
hutefromord37s52-1nf4lel00.net (172:217.236) :
Fromord37s52-in-£4le100.net (172.217.2.36) : icicmp seg=3 ttl46 tÉne=17:5
mp seg=4 ttl=46 time-17
imes17 Sn
5
ns
Autes trom ord31552-in
ues f41e100.net172.2112.30)3 icupcup seq=S ttl=46 tme-175mE
ms
Q8. uued do
oloan mame
fec2-user@ip-172-31-8-517)$ cal
Su No March 2023
Tu We Th
1 2
Er Sa
5 6 4
12 13 14 B9 10 11
19 20 21 1S 16 17 18
22 23 24 25
26 27 28 29 30 31
tec2-user@ip172-31-8-51
Su November
MoTu Ne.
2000 -1_ cal 11 2000
Th ErSa
234
67089 1011
12 1314 15 16 17
18
19 2021 22 23 24.25
26 27 28 2930
[ec2-user@ip172-31-8-51-1_
bash: ncal: commànd nÍt foundncal
[ec2-userip-172 31-8 51 NS cal3
Februa|y 2029 March2023 April 2023
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Er Sa Su Mo Tu We Th F Sa
3 1 2 3 4 1
567. 8 9 10 s 6 78 9 10 1 1 2 3 4 5 6 28
12 1314 15 16 17 18 12 13 14 1516 17 18 9 10 11 12 13 14,15.
16 17 18 19 20 21 22
19 20.21 24 25 19. 20 21 22 23 24 25
26 2728 26 27 28 29 30 31 23 24 25 26 27 28 29
30
[ec2-user@ip+172-31-8-51 -1s
3 elup the
tun.
[ec2-user@ip-172-31-8-51~)$ sleep 10
[ec2-userip-172-318-51~]s
ten
dip y tho cliik pace
tec2usereip-172-31-0-51
google, com
google,ccom
google. om has address 1-1^ host google.com
142)250.191.142
has IPV6 address
mail is handled 2607:1Ob0:4009:81a;:200e
(ec2-user@lp-172-31-9-51-19
by 10 smtp.google.còm.
to
eltablih
a teghna ln machine
hes C teset
edito
test edton.
login as: ec2-user
R Authenticat
ating with public key "imported-openssh-key"
Amazon Linux 2023
https:Ilaw_.amazon.com/linux/amazon-linùux-2023
nt aito
totlasg cade
ec2-user@ip-172-31-9-42:
GNU nano S.8R
include <stdio, h>
int main() {
printf("Hello World!!\n):
return 0;
5. lae eoiten
[Runec2-uthserlip-172-31-9-42
hello
~]$ gcC hello.c -0
eneutate ey
[ec2-user@ip-172-31-9-42 -1$ /hello
Hello World!!
lec2-user@ip-172-31-9-42 ~15
Viva Quutios
wnslo.0s ii
e pimisnen in linus?
omnals?
(w) mkdi
GIpwd:
(V) moli
ts Cemnena
Guep clenstu
te oaeh tor tesct
n
malshg
te Ak!
()) Meut t teoppy duk,
diuk.
EXPERIMENT-3
AIM: - Implementation of FCFS using
Linux.
THEORY: -
Frst COme First Serve (FCES) is an onerating system scheduling algorithm that automatically
ueued requests and processes in order of their arrival. It is the casiest and simplest CPU
SCheduling algorithm, In this tyne of algorithm, processes that requests the CPU first get the CPU
alocat1on first. This is managed with a FIEO aueue. The full form of FCFS 1s First Come First
Serve.
s tne process enters the ready gueue, its PCB (Process ControlBlock) is linked with the tailof
the queue and, when the CPU becomes free, it should be assigned to the process at the beginning
of the queue.
Characteristics of the FCES method
It supports non-pre-emptive and pre-emptive scheduling algorithms.
Jobs are always executed on a first-come, frst-servebasis.
It is easy to implement and use.
Thismethod is poor in performance, and the general wait time isquite high.
CODE:
1. #include <stdio.h>
2. int main)
3. {
4. int pid[15];
5. int bt[15];
6. int n;
A1.
15. forint =is
16.
17.
18.
Scanik:
19. int i. wa[n]:
20. w[O:
21. for i=l: in;
22.
23.
24.
39,
40. att = tat/n:
41.
42.
printf("Avg. waiting time=%fAn",awt);
printf("Avg. turnaround time= %f",att);
43.}
OUTPUT: -
|[ec2-user@ip-112-31-42-186
[Enter
ec2-user@inumber
nter the p-l72-31-42-186~1_
o
gcc
-J$ /fcfsfcfs.c-o
processes: 3.
fcfs
process id of all the
Enter burst time of all processes:111 11,23
PrOcess proçesses:5
BurstTime Waiting Time TurnAround Tne
5
11 16
Avg 16
waitingtime 1 000000 27
ec2-usereip 112-31-42-1861S
of SJF EXPERIMENT-4
AIM: -
Impl
THEORY: -ementation Non-Pre-emptive using Linux operating system.
The
shortest job first (SJF) or
procesS with the
(SJN), can be Smallest executionshortesttimejobto next, is a scheduling policy that selects the waiting
prc-cmptive or execute next. SJN, also known as Shortest Job Next
It
Greedy Algorithm.
may cause
starvation
using the concept if
of ageing.shorter processes keep conming. This problem can be solved
It is
practicallythem.
may not sort infeasible as
be used to While it is Operating System may not know burst times and
not possible to predict therefore
estimate the execution time for a iob, execution time, several methods can
execution times. such as a weighted
average of previous
SJF can be used in
are available, specialized environments where accurate
estimates of running time
Algorithm:
Sort all the
processes according to the arrival time.
Then select a process that
has minimum
After completion of the arrival time and
process make
minimum Burst time.
completion the previous process and processes that arrives
of a pool of
among theafterward
having minimun Burst time. select that process till the
pool which is
CODE:
1. #include<stdio.h>
2. int main()
3. {
4. int bt{201,p[20],wt[20],tat[20],1j,n,total-0,pos,temp;
5. float
6.
avg_wt,avg_ tat;
printf("Enter number of process:");
7. scanf("%d",&n);
8. printf("nEnter Burst Time:n");
9. for(i-0;i<n;i++)
10. {
11. printf("p%d:",i+l);
12. scanf("%d",&bt[i]);
13. p[i]=it1;
14. }
15. l/sorting of
burst times
16. for(i-0;i<n;i++)
17. {
18. posF0;
19. for(j=itl;j<n;j++)
20. {
if(bt[j]<bt[pos])
b. pos=j;
21. }
22. temp-bt[i];
23. bt[i]=bt[pos];
24. bt[pos]=temp;
25. temp-p[i];
26. p[i]p[pos];
27. p[pos]=temp;
28. }
29. wt[0]-0;
30. for(i=1;i<n;i++)
31. {
32. wt[i]=0;
33. for(j-0;j<i;j++t)
a. wt[i]+=bt[j];
34. total+=wt[i];
35. }avg_ wt-(float)total/n;
36.
TimetTurnaround Time"):
37. total-0; tWaiting
printf("nProcesst Burst Time
38.for(i-0;i<n;it+)
39.
40. tat[i]=bt[i]twt[i];
41. {
42. total+-tat[i]; %dttVodttt%d"p[i],b{[i], wt[i],tat/i):
printf("np%dtt
43.
44.} tat-(float)total/n; Time-%",avg wt):
avg Waiting Time-9%fn",avg tat);
45. printf("nnAverage Turnaround
46. printf("nAverage
47.
48. }