SlideShare a Scribd company logo
Handled By
X. IGNATIUS SELVARANI,
AP/IT
OPERATING SYSTEM
An Operating System is a set of programs that
 Functions as an virtual machine by presenting an
interface that is easier to program than the underlying
hardware
 Acts as resource management through orderly and
controlled allocation of the processors, memories,
and I/O devices among the programs competing for it.
ORGANIZATION OF UNIX
The UNIX system is functionally organized at three
levels and are:
1. The kernel, which schedules tasks and manages
storage;
2. The shell, which connects and interprets users'
commands, calls programs from memory, and executes
them; and
3. The tools and applications that offer additional
functionality to the OS
UNIX Structure
HARDWARE AND SOFTWARE REQUIREMENTS
Hardware requirements
 Processor : Pentium III / Pentium 4/M or equivalent
 RAM : 256 MB to 1GB
 Disk space : 500MB to 5GB
Software requirements
 Operating System : Windows XP /Vista/2003/2008
 Languages : C/C++
PuTTY
 PuTTY is a free and open-source terminal emulator.
 The name "PuTTY" has no official meaning. PuTTY
was originally written for Microsoft Windows, but it
has been ported to various other operating systems.
 PuTTY is the most used SSH client for the Microsoft
Windows platform.
 The SSH protocol was developed as a secure,
encrypted replacement for the RSH protocol.
 PuTTY is a very versatile tool for remote access to
another computer. It's probably used more often by
people who want secure remote shell access to a UNIX
or Linux system than for any other purpose
COURSE OBJECTIVES
 To learn Unix commands and shell programming
 To implement various CPU Scheduling Algorithms
 To implement Process Creation and Inter Process
Communication.
 To implement Deadlock Avoidance and Deadlock
Detection Algorithms
 To implement Page Replacement Algorithms
 To implement File Organization and File Allocation
Strategies
LIST OF EXPERIMENTS
1. Basics of UNIX commands
2. Write programs using the following system calls of UNIX
operating system fork, exec, getpid, exit, wait, close, stat,
opendir, readdir
3. Write C programs to simulate UNIX commands like cp,
ls, grep, etc.
4. Shell Programming
5. Write C programs to implement the various CPU
Scheduling Algorithms
6. Implementation of Semaphores
7. Implementation of Shared memory and IPC
8. Bankers Algorithm for Deadlock Avoidance
9. Implementation of Deadlock Detection Algorithm
LIST OF EXPERIMENTS (Contd..)
10. Write C program to implement Threading &
Synchronization Applications
11. Implementation of the following Memory Allocation
Methods for fixed partition
a) First Fit b) Worst Fit c) Best Fit
12. Implementation of Paging Technique of Memory
Management
13. Implementation of the following Page Replacement
Algorithms a) FIFO b) LRU c) LFU
14. Implementation of the various File Organization
Techniques
15. Implementation of the following File Allocation
Strategies
a) Sequential b) Indexed c) Linked
Basics of UNIX commands
Command Function
date Used to display the current system date and time.
date +%D Displays date only
date +%T Displays time only
date +% Y Displays the year part of date
date +% H Displays the hour part of time
cal Calendar of the current month
Cal year Displays calendar for all months of the specified year
Command Function
who
Login details of all users such as their IP, Terminal No, User
name,
who am i Used to display the login details of the user
tty Used to display the terminal name
uname Displays the Operating System
echo "txt" Displays the given text on the screen
echo $HOME Displays the user's home directory
bc Basic calculator. Press Ctrl+d to quit
mancmdname Manual for the given command. Press q to exit
history To display the commands used by the user since log on.
exit Exit from a process. If shell is the only process then logs out
Directory commands
Command Function
pwd Path of the present working directory
mkdirdir A directory is created in the given name under the current
directory
mkdirdir1 dir2 A number of sub-directories can be created under one stroke
cdsubdir Change Directory. If the subdir starts with / then path starts
from root (absolute) otherwise from current working directory.
cd To switch to the home directory.
cd / To switch to the root directory.
cd .. To move back to the parent directory
rmdirsubdir Removes an empty sub-directory.
File commands
Command Function
cat >filename To create a file with some contents. To end typing press Ctrl+d.
The > symbol means redirecting output to a file. (< for input)
catfilename Displays the file contents.
cat >>filename Used to append contents to a file
cpsrc des Copy files to given location. If already exists, it will be overwritten
cp -isrc des Warns the user prior to overwriting the destination file
cp -r src des Copies the entire directory, all its sub-directories and files.
mv old new To rename an existing file or directory. -ioption can also be used
mvf1 f2 f3 dir To move a group of files to a directory.
mv -v old new Display name of each file as it is moved.
File commands (Contd..)
Command Function
rm file Used to delete a file or group of files. -ioption can also be used
rm * To delete all the files in the directory.
rm -r * Deletes all files and sub-directories
rm -f * To forcibly remove even write-protected files
ls Lists all files and subdirectories (blue colored) in sorted manner.
lsname To check whether a file or directory exists.
lsname* Short-hand notation to list out filenames of a specific pattern.
ls -a Lists all files including hidden files (files beginning with .)
ls -xdirname To have specific listing of a directory.
ls -R Recursive listing of all files in the subdirectories
ls -l Long listing showing file access rights (read/write/execute-rwx for
user/group/others-ugo).
cmpfile1 file2 Used to compare two files. Displays nothing if files are identical.
wcfile It produces a statistics of lines (l), words(w), and characters(c).
Vi Editor
 Unix provides a versatile editor vi, a full-screen editor.
vi" stands for visual editor. A vi session begins by
invoking vi with or without a filename.
 $vi filename
 vi functions in three modes namely:
1. Input mode—Where any key depressed is entered as
text
2. Command mode—Where keys are used as
commands to act on text (initial mode)
3. ex mode—ex mode commands that can be entered in
the last line to act on text
Operating System Laboratory presentation .ppt
INPUT MODE
vi starts with command mode. To insert text any of the
following commands should be used.
Commands Function
i Inserts text to the left of the cursor.
I Inserts text at the beginning of line.
a Appends text to right of cursor
A Appends text at end of line
In Input mode the editor displays INSERT in the last
line. Press Enter key to start a fresh line of text in Input
mode and the ~ disappears. To quit input mode press
Esc key.
COMMAND MODE
EDIT COMMANDS
Command Function
s Deletes a single character to the left and switches to Input
mode.
x Deletes the character in the current cursor position
Uor u Reverses the last change made to the buffer.
dd Cuts the entire line
dw Cuts the entire word
d$ Cuts a line from cursor position to the end of the line
d0 Cuts from the cursor position to the start of the line
yy Copies (yanks) the entire line
yw Copies the entire word
p Pastes the text
NAVIGATION COMMANDS
Command Function
b Moves back to beginning of a word
w Moves forward to beginning of word
k Up one line
j Down one line
h Left one character
l Right one character
Ctrl+f Scrolls a page forward
Ctrl+b Scrolls a page backward
THE EX MODE
 The essential save and exit commands form the
features of ex mode. Press : (colon) in command
mode to switch to ex mode. The : is displayed in the
last line. Type the command and press Enter key to
execute the same.
Command Function
w Saves file, displays the number of lines & characters and returns
toInput mode. If it is an unnamed file then vi puts a message.
w file The file is saved under the given name
q Quits vi session and returns to $ prompt. vi has a safety mechanism
that warns if changes made to file are not saved.
q! Quits vi session without saving any changes made since the last save
wq Save and exit
sh Escape to shell
r file To insert another file into the current file.
new file Splits screen into multiple windows and opens the file.

More Related Content

PPT
Unix fundamentals and_shell scripting
PPTX
Unix_Introduction_BCA.pptx the very basi
DOC
58518522 study-aix
PPT
Unix tutorial-08
PPTX
Unix Shell Script - 2 Days Session.pptx
PPT
Linux Administration
PPT
Linux Administration
PPTX
Linux powerpoint
Unix fundamentals and_shell scripting
Unix_Introduction_BCA.pptx the very basi
58518522 study-aix
Unix tutorial-08
Unix Shell Script - 2 Days Session.pptx
Linux Administration
Linux Administration
Linux powerpoint

Similar to Operating System Laboratory presentation .ppt (20)

PPTX
Commands and shell programming (3)
PPT
Unix tutorial-08
PPT
Karkha unix shell scritping
PPTX
PPTX
Linux Basic commands and VI Editor
PPSX
Unix environment [autosaved]
PDF
PPTX
Unix OS & Commands
PPT
Shell_Scripting.ppt
PDF
5_File_Handling_Commands__vi_editor_and_environment_variables
PPT
PowerPoint_merge.ppt on unix programming
PPTX
UNIX.pptx
PPTX
Linux System commands Essentialsand Basics.pptx
PDF
Unix and Linux - The simple introduction
PDF
Presentation aix basic
PPTX
Chapter 2 unix system commands
PPTX
Presentation for RHCE in linux
PPTX
2. UNIX OS System Architecture easy.pptx
PPT
Linux day 1
PDF
Bozorgmeh os lab
Commands and shell programming (3)
Unix tutorial-08
Karkha unix shell scritping
Linux Basic commands and VI Editor
Unix environment [autosaved]
Unix OS & Commands
Shell_Scripting.ppt
5_File_Handling_Commands__vi_editor_and_environment_variables
PowerPoint_merge.ppt on unix programming
UNIX.pptx
Linux System commands Essentialsand Basics.pptx
Unix and Linux - The simple introduction
Presentation aix basic
Chapter 2 unix system commands
Presentation for RHCE in linux
2. UNIX OS System Architecture easy.pptx
Linux day 1
Bozorgmeh os lab
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
KodekX | Application Modernization Development
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KodekX | Application Modernization Development
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Ad

Operating System Laboratory presentation .ppt

  • 1. Handled By X. IGNATIUS SELVARANI, AP/IT
  • 2. OPERATING SYSTEM An Operating System is a set of programs that  Functions as an virtual machine by presenting an interface that is easier to program than the underlying hardware  Acts as resource management through orderly and controlled allocation of the processors, memories, and I/O devices among the programs competing for it.
  • 3. ORGANIZATION OF UNIX The UNIX system is functionally organized at three levels and are: 1. The kernel, which schedules tasks and manages storage; 2. The shell, which connects and interprets users' commands, calls programs from memory, and executes them; and 3. The tools and applications that offer additional functionality to the OS
  • 5. HARDWARE AND SOFTWARE REQUIREMENTS Hardware requirements  Processor : Pentium III / Pentium 4/M or equivalent  RAM : 256 MB to 1GB  Disk space : 500MB to 5GB Software requirements  Operating System : Windows XP /Vista/2003/2008  Languages : C/C++
  • 6. PuTTY  PuTTY is a free and open-source terminal emulator.  The name "PuTTY" has no official meaning. PuTTY was originally written for Microsoft Windows, but it has been ported to various other operating systems.  PuTTY is the most used SSH client for the Microsoft Windows platform.  The SSH protocol was developed as a secure, encrypted replacement for the RSH protocol.  PuTTY is a very versatile tool for remote access to another computer. It's probably used more often by people who want secure remote shell access to a UNIX or Linux system than for any other purpose
  • 7. COURSE OBJECTIVES  To learn Unix commands and shell programming  To implement various CPU Scheduling Algorithms  To implement Process Creation and Inter Process Communication.  To implement Deadlock Avoidance and Deadlock Detection Algorithms  To implement Page Replacement Algorithms  To implement File Organization and File Allocation Strategies
  • 8. LIST OF EXPERIMENTS 1. Basics of UNIX commands 2. Write programs using the following system calls of UNIX operating system fork, exec, getpid, exit, wait, close, stat, opendir, readdir 3. Write C programs to simulate UNIX commands like cp, ls, grep, etc. 4. Shell Programming 5. Write C programs to implement the various CPU Scheduling Algorithms 6. Implementation of Semaphores 7. Implementation of Shared memory and IPC 8. Bankers Algorithm for Deadlock Avoidance 9. Implementation of Deadlock Detection Algorithm
  • 9. LIST OF EXPERIMENTS (Contd..) 10. Write C program to implement Threading & Synchronization Applications 11. Implementation of the following Memory Allocation Methods for fixed partition a) First Fit b) Worst Fit c) Best Fit 12. Implementation of Paging Technique of Memory Management 13. Implementation of the following Page Replacement Algorithms a) FIFO b) LRU c) LFU 14. Implementation of the various File Organization Techniques 15. Implementation of the following File Allocation Strategies a) Sequential b) Indexed c) Linked
  • 10. Basics of UNIX commands Command Function date Used to display the current system date and time. date +%D Displays date only date +%T Displays time only date +% Y Displays the year part of date date +% H Displays the hour part of time cal Calendar of the current month Cal year Displays calendar for all months of the specified year
  • 11. Command Function who Login details of all users such as their IP, Terminal No, User name, who am i Used to display the login details of the user tty Used to display the terminal name uname Displays the Operating System echo "txt" Displays the given text on the screen echo $HOME Displays the user's home directory bc Basic calculator. Press Ctrl+d to quit mancmdname Manual for the given command. Press q to exit history To display the commands used by the user since log on. exit Exit from a process. If shell is the only process then logs out
  • 12. Directory commands Command Function pwd Path of the present working directory mkdirdir A directory is created in the given name under the current directory mkdirdir1 dir2 A number of sub-directories can be created under one stroke cdsubdir Change Directory. If the subdir starts with / then path starts from root (absolute) otherwise from current working directory. cd To switch to the home directory. cd / To switch to the root directory. cd .. To move back to the parent directory rmdirsubdir Removes an empty sub-directory.
  • 13. File commands Command Function cat >filename To create a file with some contents. To end typing press Ctrl+d. The > symbol means redirecting output to a file. (< for input) catfilename Displays the file contents. cat >>filename Used to append contents to a file cpsrc des Copy files to given location. If already exists, it will be overwritten cp -isrc des Warns the user prior to overwriting the destination file cp -r src des Copies the entire directory, all its sub-directories and files. mv old new To rename an existing file or directory. -ioption can also be used mvf1 f2 f3 dir To move a group of files to a directory. mv -v old new Display name of each file as it is moved.
  • 14. File commands (Contd..) Command Function rm file Used to delete a file or group of files. -ioption can also be used rm * To delete all the files in the directory. rm -r * Deletes all files and sub-directories rm -f * To forcibly remove even write-protected files ls Lists all files and subdirectories (blue colored) in sorted manner. lsname To check whether a file or directory exists. lsname* Short-hand notation to list out filenames of a specific pattern. ls -a Lists all files including hidden files (files beginning with .) ls -xdirname To have specific listing of a directory. ls -R Recursive listing of all files in the subdirectories ls -l Long listing showing file access rights (read/write/execute-rwx for user/group/others-ugo). cmpfile1 file2 Used to compare two files. Displays nothing if files are identical. wcfile It produces a statistics of lines (l), words(w), and characters(c).
  • 15. Vi Editor  Unix provides a versatile editor vi, a full-screen editor. vi" stands for visual editor. A vi session begins by invoking vi with or without a filename.  $vi filename  vi functions in three modes namely: 1. Input mode—Where any key depressed is entered as text 2. Command mode—Where keys are used as commands to act on text (initial mode) 3. ex mode—ex mode commands that can be entered in the last line to act on text
  • 17. INPUT MODE vi starts with command mode. To insert text any of the following commands should be used. Commands Function i Inserts text to the left of the cursor. I Inserts text at the beginning of line. a Appends text to right of cursor A Appends text at end of line In Input mode the editor displays INSERT in the last line. Press Enter key to start a fresh line of text in Input mode and the ~ disappears. To quit input mode press Esc key.
  • 18. COMMAND MODE EDIT COMMANDS Command Function s Deletes a single character to the left and switches to Input mode. x Deletes the character in the current cursor position Uor u Reverses the last change made to the buffer. dd Cuts the entire line dw Cuts the entire word d$ Cuts a line from cursor position to the end of the line d0 Cuts from the cursor position to the start of the line yy Copies (yanks) the entire line yw Copies the entire word p Pastes the text
  • 19. NAVIGATION COMMANDS Command Function b Moves back to beginning of a word w Moves forward to beginning of word k Up one line j Down one line h Left one character l Right one character Ctrl+f Scrolls a page forward Ctrl+b Scrolls a page backward
  • 20. THE EX MODE  The essential save and exit commands form the features of ex mode. Press : (colon) in command mode to switch to ex mode. The : is displayed in the last line. Type the command and press Enter key to execute the same. Command Function w Saves file, displays the number of lines & characters and returns toInput mode. If it is an unnamed file then vi puts a message. w file The file is saved under the given name q Quits vi session and returns to $ prompt. vi has a safety mechanism that warns if changes made to file are not saved. q! Quits vi session without saving any changes made since the last save wq Save and exit sh Escape to shell r file To insert another file into the current file. new file Splits screen into multiple windows and opens the file.