






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
These are the lecture Slides of Advanced Operating System which includes Virtual Memory Performance, Resident Set Management, Allocating Pages, Page Fault Frequency Algorithm, Working Set Strategy, Thrashing, Replacement Policy, Multiprogramming Level etc. Key important points are: Operating System Structure, System Implementation, System Design Goals, System Components, Microkernel System Structure, Unix System Structure, Shell Interface Program, Solaris Modular Approach
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!







COMP755 Advanced OS
d
f^
d l
composed of many modules.
careful software engineering techniques.
system to failsystem to fail.
operating systems are now written inhigher level languageshigher-level languages
Is easier to understand and debug
port
(move to some other hardware) if it iswritten in a high-level language
User goals
i^
t t
t^
l^
li bl
convenient to use, easy to learn, reliable,safe, and fast
-^
System goals
be easy to design, implement, andmaintain, as well as flexible, reliable, error-maintain, as well as flexible, reliable, errorfree, and efficient
System Components
OS kernel
idi
i il
d hi h
i^
it
f^
ti
providing privileged high priority functions.– Dispatcher– Interrupt handling– I/O control– Memory management
Memory management
reside in the kernel.
Traditional UNIX System Structure
Microkernel System Structure
user
space
modules using message passing
Shell Features
interface.
Human Interface
i^
t^
t t
t
important to most users.
make the interface intuitive and easy to use
Popular Shells
Shell Outline
do forever {
print prompt;read command;if (fork()==0) { // child process
use exec() to load program;
} wait for child process to terminate;
}
execv
function
**int _execv( const char ***
cmdname
,
**const char ***
argv[ ]
);
g [ ]
where:•^
cmdname
is the name of the program file.
-^
argv
is an array of pointer to strings
containing the parameters. By conventionargv[0] = cmdname; The last argv entry mustbe NULL. The execv function causes the specified
program to overlay the calling program. Thisfunction does not return if successful.
Simple C Program
int main ( int argc,
char
*argv[]
)
{{
...return 5;
}^ The
argv
array passed to the main function when
you start a C programs is the
argv
array passed to
execv
by the shell.
Standard I/O Streams
When a program is started, it has three I/O
t streams open:0 stdin – Standard input, usually keyboard1 stdout – Standard output, usually screen2 stderr – Standard error, usually screen
Redirection
Standard I/O streams can be redirected from
th
d li
the command line
ls
myfile.txt
myprog
usualstuff.txt
cc
nogood.c
allmsg.txt
Scripts
d
d
f^
th
h ll
produce commands for the shell.
series of commands to the shell.
scriptingscripting.
Utilities
k
l th
tiliti
kernel, there are many utilities.
utilities
DOS Commands
attrib
find
set
cd or chdir
format
setver
chkdsk
help
share
cls
join
smartdrive
copy
label
sort
ctty
md or mkdir
sys
defrag
mem
time and date
del or erase
more
tree
del or erase
more
tree
deltree
move
type
dir
rd or rmdir
xcopy
echo
ren
fdisk
scandisk
Unix Commands
at
env
nice
cat
grep
ps
cd
head
rm
chmod
kill
rmdir
chown
lp
sort
cmp
make
tail
compres
man
touch
p
cp
mkdir
uncompress
date
more
who
du
mv
Windows Utilities
In Windows the user interface is
called the Explorer. It runs in
25%
25%
25%
25%
l^
d
. Kernel mode 2. High priority OS3. Low priority OS4. User mode
Kernel
mode
High
priority
OS
Low
priority
OS
User
mode
Process Management
process
is a program in execution
i^
l di
CPU i
fil
d I/O
including CPU time, memory, files, and I/Odevices, to accomplish its task
the following activities in connectionwith process management
p
g
deletion
resumption
communication
Main-Memory Management
-^
Memory
is a large array of words or
bytes, each with its own address
It loses
RAM is a volatile storage device. It losesits contents without power.
the following activities in connection withmemory management
Keep track of which parts of memory are
currently being used and by whom
memory space becomes available
needed
Priorities
t diff
t^
i^
iti
run at different priorities– Non-process– High priority– Lower priority– User level
User level
privilege.
OS Services
Supervisor Calls
ki
f^
ti
ll t
i
making a function call to an OS service.
not work since you have to change to theOS environment.
The OS gets control and executes thedesired function.
Virtual Machines
virtual machine
takes the layered
approach to its logical conclusion. It treatshardware and the operating system kernelas though they were all hardware
identical
to the underlying bare hardware
The operating s stem creates the ill sion of
multiple processes, each executing on itsown processor with its own (virtual)memory
Virtual Machines (Cont.)
h
d t
t^
th
i t
l^
hi
are shared to create the virtual machines– CPU scheduling can create the appearance
that users have their own processor
card readers and virtual line printers
the virtual machine operator’s console
Virtual Machines
Non-virtual Machine
Virtual Machine
Advantages/Disadvantages
of Virtual Machines
complete protection of system resourcessince each virtual machine is isolated fromall other virtual machines. This isolation,however, permits no direct sharing ofresources.
Pros / Cons of Virtual Machines
vehicle for operating-systems research and
p
g
y
development.
implement due to the effort required toprovide an
exact
duplicate to the underlying
machinemachine
change the real page tables. Paging issometimes handled completely by the hostOS.