Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
38 views
18 pages
AOS Practical File
practical file for Advanced operating system
Uploaded by
King Saabh
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save AOS practical file For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
38 views
18 pages
AOS Practical File
practical file for Advanced operating system
Uploaded by
King Saabh
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save AOS practical file For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 18
Search
Fullscreen
PROGR. AIM : To study about the basies of UNIX UNIX: 1 is a multi-user operating system Developed at AT&T Bell Industries, USA in 1969. Ken ‘Thomson along with Dennis Ritchie developed it from MLTICS (Multiplexed Information and ‘Computing Service) OS By 1980, UNIX had been completely rewritten using C language LINUX It is similar to UNIX, which is created by Linus Tonalds. All UNIX commands works in Linux, Linux is a open source software, The main feature of Linux is co-existing with other OS such as windows and UNIX STRUCTURE OF A LINUX SYSTEM It consists of three parts, i. UNIX kernel ii, Shells iii, Tools and Applications UNIX KERNEL: Kemel is the core of the UNIX OS. It controls all asks, schedule all Processes and carries out all the functions of OS .Decides when one programs tops and another stats L: Shel is the command interpreter in the UNIX OS. It accepts command from the user and analyses and interprets them.AIM Q 2 To study basies of UNIX commands CONTENT a iy ii) ») vii) viii) ix) FILE MANIP! Date : used to check data and time Syntax : Sdate Cal : used to display the calanler Symtax : Seal_{ month/year } Echo: used to print message on sereen Syntax : Secho “text used to list the files in the current directory Syntax : Sls ‘© Ist: Order by creation time + Is -u: Onder by access time + Iss: Order by size + Is-1: Reverse Order + Iss; Show file size Ip: used to take printouts Syntax : Sip {filename} ‘man : used to provide manual help on every UNIX commands Syntax: Sman {unix command} who & whoami = it displays data about all the users who have logged in in system currently. The next command displays data about current user only Syntax ; $who $whoami uptime: tells you how long have been system running sinee its last reboot or power off Symtax : Suptime it displays system information such as hardware platformsystem name uname processor OS type ete Syntax : Suname - AND!iii) iy) y) vi) vii) viii) ix) Cat: this create view and concatenate files Syntax : © Creation : Scat>filename * Viewing : Scat>filename © Concatenate : Scat file1>file2 Grep : used to search a word or pattern related to that word from the file. Syntax : Sgrep {search word} {filename} Rm: deletes a file from file system Syntax : $rm {filename} Touch : used to create a blank file Syntax : Stouch {new filename} Cp : copies the file from system Syntax : Sep {source file} {destination file} My: to rename file or a directory Syntax : $mv {old file} {new file} Head : displays first ten lines from selected file Syntax : Shead filename} Tail : displays last ten lines from selected file Syntax : $tail {filename} Chmod : used to change permission of a file or directory Syntax : $chmod -wx {filename} // remove write and execute permission for usersPROGRAM NO 3 AIM: To study of various UNIX editors such as vi ed, ex and EMACS CONCEPT: Estria program tht allows user ose prions leon he seeen nd mol characters and lines by simply ty 4 jing atthe current position UNIX supports variety of Editors, They arv: Ed ex, vi, EMACS. Vieviis stands for sual". vi is the most important and powerful editor. is a full screen editor that allows user to view and edit entire document atthe same time.vi editor was written in the University of California, at Berkley by Bill Joy, who is one of the co-founder of Sun Microsystems. Features of vi It's easy to Team and has more powerful features It works great speed and is case sensitivevi has powerful undo functions and has 3 modes: i) Command mode ii) Insert mode iii) Escape or ex mode tn command mode, no tex is displayed on the sereen. In Insert mode, it permits user to edit inset or replace text. In escape mode, it displays commands at command line. Moving the cursor with the help ofh, 1, kj, I, ete EMACS Editor Some of motion commands are : i) M-> Move toend of file Move to beginning of file ii) Move forward a sereen Move backward in a screen vy) Cen Moxe to next line vi) C-p Move to previous line Vii) C-a_— Move to the beginning of the lineviii) C-e — Move to the end of the line ix) C-f Move forward a character x) C-b_— Move backward a character xi) M-f Move forward a word xii) M-b-— Move backward a word Some of delete commands are i) DEL delete the previous character C-d_— delete the current character M-DEL delete the previous word M-d delete the next word C-x DEL deletes the previous sentence M<-k delete the rest of the current sentence C-K deletes the rest of the current line C-xu undo the lasted it change Some search and replace in EMACS i) yz Change the occurrence of the pattern ii) nzDon't changes the occurrence, but look for the other don't change. Leave query replace completely iii) | : Change this occurrence and all others in the fiPROGRAM NO 4 AIM: To write e program using following system calls of UNIX operating system fork, exe, etpid, exit, wait, close, stat, opendir, read 1. Program for system calls of UNIX OS (opendinclosedirseaddir) Finchode
include
include
struct dient *dptr; int main(int arge, char *argv()) cl char bu[100}; DIR “Airy ("isin ENTERDIRECTORY NAME"); ‘butt prin seanfl’ if (dirp = opendie(butt)) == NULL) { print("The given directory does not exis exit) while (dptr- readdin(dirp)) ‘ print("%s\n", dptr->d_name): closedir(ditp); return 0; ) Output :2. Program for system calls of UNIX OS ( Fork, getpid,exit) include
include
int main int pid, pid, pid2s pid = fork; if (pid- ‘ S CREATION\n") printf(°ERROR INPRO cexit(I); } if (pid != 9) pidl = getpid0: printf("in the parent process ID is %n" pid); else { pid2 = getpid(), print(*in the child process ID is %n", pid2); } return 0;PROGRAM NO 5 [AIM : To write simple shell programs by using conditional, branching and looping statements 1. Write a shell program to check if given number is even or odd Program : echo "Enter number" read mum if (num %2—0 yj then echo "The number Snum is eve.” else echo "The number Sum is 0 Fi Ousput Seminst 2, Write a shell program to check if given number is leap year oF not Program. echo "Enter a year: " read year if (year % 4 == 0 )); then if (year % 100 == 0 )y theni ( year % 400 == 0); then ‘echo “The year Syear isa leap year.” else ‘echo "The year Syear isnot a leap year.” fi else echo "The year Syear isa leap year fi ‘echo "The year Syear isnot a leap year.” ‘a number 43, Write a shell program to find factorial of Program, echo "Enter a number: " read number factorial=1 if ((mumber <0); then not defined for negative numbers.” echo "Factorial clit (( number = 0 )); then factorial:for (Cis; i number; i++ )); do factorial=S(( factorial * i) done fi echo "The factorial of Snumber is Sfactorial.” Output eae een e factorial of 5 is 120. \Adnin\Desktop\File> BlPROGRAM NO ¢ ‘Aim : To write a C program for implementation of priority scheduling algorithm Program include
int main) { int p{20), b(20), prif20}, we(20} ta{20}, i,k, temp; float wave, tatavE; inut"Enter the number of processes ~ for (i= 0;1< m5 +4) { pili printer he Burst Time & Priority of Process scanf{"%ed %d", &btfil, &prili)); } fori for (k= it @st> pele) t tempat vlil= ks pikl= temps temp = bi; wii} = bik simi) eijkenmkr+) prifk] = temp; } swtavg= wil0] = 0; tatavg = ta(0] = biL0}, for (i= 1; i< 1; i++) { wi} = wafi- 1) + eli Hs tat) =tafi- 1) + bulls wlayg = wlavg + wifi};tatavg = tatavg + tat{i]; } printf("inPROCESS\\tPRIORITY\ \BURST TIMEMWAITING TIME! for (i= 0;i
int main) ini, j.m, bul10}, wa 10}, tatl10},, t{10}, ma =0, att = 0, temp =o; . float a print("Enter the no of processes, seanf("%d", &n); for (i= 0:i< msi) ; printf(\nEnter Burst Time for process %d + 1; seanf("%6d", &buLil); cf] = buf; } printf("\nEnter the size of time slice ~"); scanf{"%6a", &t); max = bu{0]; for (= 1;i
» include
Hinelude
int maind) int p{20}, be(20}, w20},tat{20}, i, k,n em float wiavg,tatavg; eo ta prinf("\nEnter the number of processes scant("%d", &biLiD); } for (= 0;i
bit) { temp = bi{i]; pli] = plkl: pik) % wi{0] = wave = 0; tat{0] = tatavg = bt(0}; for i= 1;i
You might also like
OS Record Final Print
PDF
No ratings yet
OS Record Final Print
119 pages
N.balaji OS Record
PDF
No ratings yet
N.balaji OS Record
71 pages
Operating Systems
PDF
No ratings yet
Operating Systems
82 pages
Btech 2-2 O.S Lab MANUAL-1
PDF
No ratings yet
Btech 2-2 O.S Lab MANUAL-1
43 pages
R23 Lab Manual
PDF
100% (1)
R23 Lab Manual
8 pages
Os Manual
PDF
No ratings yet
Os Manual
43 pages
Aos Lab Manual - Edited
PDF
No ratings yet
Aos Lab Manual - Edited
34 pages
Opearating System LAb Files
PDF
100% (1)
Opearating System LAb Files
128 pages
Operating System Lab Manual: Basics of Unix Commands Introduction To Unix Aim
PDF
No ratings yet
Operating System Lab Manual: Basics of Unix Commands Introduction To Unix Aim
37 pages
OS Record
PDF
No ratings yet
OS Record
76 pages
Operating System Lab - Manual
PDF
No ratings yet
Operating System Lab - Manual
70 pages
Os Lab Manual
PDF
No ratings yet
Os Lab Manual
81 pages
Al3452-Operating System-259068877-Os Lab Manual Aiml
PDF
No ratings yet
Al3452-Operating System-259068877-Os Lab Manual Aiml
119 pages
OS Lab Manual Anna University Laboratory
PDF
No ratings yet
OS Lab Manual Anna University Laboratory
66 pages
1.basic Unix Commands
PDF
No ratings yet
1.basic Unix Commands
87 pages
Final Os Record New
PDF
No ratings yet
Final Os Record New
87 pages
Lab Doc Manual
PDF
No ratings yet
Lab Doc Manual
82 pages
Aakash Os
PDF
No ratings yet
Aakash Os
103 pages
OS Lab Manual 2024-25
PDF
No ratings yet
OS Lab Manual 2024-25
45 pages
Os Lab Manual - Sjcet
PDF
No ratings yet
Os Lab Manual - Sjcet
61 pages
OS Lab Manual Aditya
PDF
No ratings yet
OS Lab Manual Aditya
49 pages
R.M.K. Engineering College: Department of Computer Science and Engineering
PDF
No ratings yet
R.M.K. Engineering College: Department of Computer Science and Engineering
62 pages
AOS M Tech CS Lab Manual
PDF
No ratings yet
AOS M Tech CS Lab Manual
44 pages
Os Lab Manual
PDF
No ratings yet
Os Lab Manual
57 pages
Tushin - LAB FILE
PDF
No ratings yet
Tushin - LAB FILE
77 pages
OS Lab Manual - Student Copy 121
PDF
No ratings yet
OS Lab Manual - Student Copy 121
99 pages
Os Record Edit
PDF
No ratings yet
Os Record Edit
85 pages
CS3461-OS Labmanual
PDF
No ratings yet
CS3461-OS Labmanual
67 pages
Ii-Jcs1411 Os Lab Manual
PDF
No ratings yet
Ii-Jcs1411 Os Lab Manual
78 pages
Unit 1: Unix System Overview
PDF
No ratings yet
Unit 1: Unix System Overview
31 pages
CP Lab Manual
PDF
No ratings yet
CP Lab Manual
38 pages
CS1254 LM1
PDF
No ratings yet
CS1254 LM1
74 pages
Os Lab Manual 26-04-2023
PDF
No ratings yet
Os Lab Manual 26-04-2023
44 pages
Tushin - LAB FILE
PDF
No ratings yet
Tushin - LAB FILE
61 pages
Oslabfinal
PDF
No ratings yet
Oslabfinal
49 pages
OS Lab Manual
PDF
No ratings yet
OS Lab Manual
51 pages
Unix Unit1
PDF
No ratings yet
Unix Unit1
30 pages
Unix Fundamentals & System Programming
PDF
No ratings yet
Unix Fundamentals & System Programming
48 pages
Os Lab Manual
PDF
No ratings yet
Os Lab Manual
52 pages
Os Lab
PDF
No ratings yet
Os Lab
12 pages
OS Lab Manual RRS
PDF
No ratings yet
OS Lab Manual RRS
33 pages
Anshika New Os
PDF
No ratings yet
Anshika New Os
56 pages
Operating System Lab Manual: Ex - No:1.a Basics of Unix Commands Introduction To Unix
PDF
No ratings yet
Operating System Lab Manual: Ex - No:1.a Basics of Unix Commands Introduction To Unix
68 pages
Shell
PDF
No ratings yet
Shell
11 pages
CS8461 Os Lab Manual Print
PDF
67% (3)
CS8461 Os Lab Manual Print
58 pages
OS Syllabus
PDF
No ratings yet
OS Syllabus
7 pages
Introduction Unix
PDF
No ratings yet
Introduction Unix
11 pages
OS Lab Manual
PDF
No ratings yet
OS Lab Manual
17 pages
Operating System Lab Manual - CS2257
PDF
No ratings yet
Operating System Lab Manual - CS2257
64 pages
OS Praticals IMP Notes by Ansar Shaikh
PDF
No ratings yet
OS Praticals IMP Notes by Ansar Shaikh
9 pages
Os Lab Manual 6.2.25 Updated
PDF
No ratings yet
Os Lab Manual 6.2.25 Updated
80 pages
Operating Systems Lab: Implement The Following Using C/C++/JAVA
PDF
No ratings yet
Operating Systems Lab: Implement The Following Using C/C++/JAVA
22 pages
Unix
PDF
No ratings yet
Unix
30 pages
Os Lab Manual
PDF
No ratings yet
Os Lab Manual
37 pages
Unix Lab Manual
PDF
No ratings yet
Unix Lab Manual
56 pages