Académique Documents
Professionnel Documents
Culture Documents
MBATech 8 – IT/COMP
MBATech-
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Prof. Rahul M
Prof M. Samant
Dept. Head., Technology Management
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Prof.f Rahul
R M. Samant
Dept Head, MBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
architecture is the extent to which this basic framework has been extended
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• Rapid application development tools
Prof. Rahhul M. Sammant, HOD MMBATech
• Built-in
Built in clustering and high availability
technologies
• Worldwide enterprise support
• Large network of trained consultants
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
vendor?
– Do I need consistent, integrated, enterprise management?
– Will I require a well-defined enterprise roadmap of future
innovation and features?
• If you answer yes to any of these questions
questions, then you
may find that Linux provides a less than ideal solution.
ming
• UNIX Æ WINDOWS
Prof. Rahhul M. Sammant, HOD MMBATech
• UNIX Æ LINUX
• TPC-C benchmarks
– 2004
– 2009
11/12/2010 Mukesh Patel School of Technology Management & Engineering 11
Syste
em Architecture & Programm
2.
Evolution & architecture :
Introduction
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
family of operating systems, culminating in today's Windows XP and
Prof. Rahhul M. Sammant, HOD MMBATech
Vista
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
subsystems. These subsystems are referred to as
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
Architectures
ming
4. Virtual memory
Prof. Rahhul M. Sammant, HOD MMBATech
12. Component-based
management development
5 File
5. Fil systems
t andd 13 .NET
13. NET
networked file systems 14. Middleware
6 Security
6. 15 Shells and scripting
15.
7. Networking 16. Development
8. User interfaces environments
11/12/2010 Mukesh Patel School of Technology Management & Engineering 28
Syste
1. Kernels and APIs
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• Creating files
• Starting processes
• Managing input and output
• Managing memory
11/12/2010 Mukesh Patel School of Technology Management & Engineering 29
Syste
Cont…
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
threads. An application uses these functions to manage
Prof. Rahhul M. Sammant, HOD MMBATech
ming
consistency with the Windows shell and to
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
object. A property sheet contains information about the object in a set of
Prof. Rahhul M. Sammant, HOD MMBATech
ming
the majority of the system calls found in UNIX implementations, not
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• When you install Interix, you install a new extended subsystem that
replaces the POSIX subsystem provided with Windows and that
provides true UNIX functionality
functionality.
• Shell scripts and other scripted applications that use UNIX and
POSIX.2 utilities run under Interix. (For more information about shell
scripts see the "Shells
scripts, Shells and Scripting"
Scripting section later in this chapter
chapter.))
ming
have a user's name and vice versa. (This database replaces the
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
and state. Resources include virtual address space, files,
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• Fibers are usually used in applications that service a
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Typically, a service is a long-running Windows application that does
Prof. Rahhul M. Sammant, HOD MMBATech
not interact with users and consequently does not include a user
interface. Services may start when the system boots and they
continue running across logon sessions
sessions. Services are controlled by
the Service Control Manager (SCM), and one of the few
requirements for writing a service is that it must communicate with
the SCM to handle starting, g, stopping,
pp g, and installing.
g
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Fibers Yes No
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
communication
ming
section later in this chapter.)
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
communication
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
messages will disappear if the system fails.
Prof. Rahhul M. Sammant, HOD MMBATech
Message g q
queues were introduced in AT&T
System V UNIX. Because of this, many versions
of UNIX that are based on BSD may not have
them. POSIX has message queues but the API
is not exactly the same as in System V.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 71
Syste
Cont…
Cont
ming
message is guaranteed to be delivered, but
Prof. Rahhul M. Sammant, HOD MMBATech
there is no specific
p g
guarantee about exactly y
when it will be received. The operation is the
same as on UNIX—one application writes to the
queue and another reads from it. The API,
however, is completely different
11/12/2010 Mukesh Patel School of Technology Management & Engineering 72
Syste
DLLs and Shared Libraries
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
directly incorporated.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• Fragmented
• Lack of network support
ming
Prof. Rahhul M. Sammant, HOD MMBATech
(OLE) objects.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
if not impossible to segregate the data.
Prof. Rahhul M. Sammant, HOD MMBATech
– On Windows 9.x systems, the User.dat file for the default user is
utilized to create the User
User.dat
dat files for all new profiles
profiles.
ming
– The registry contains information that Windows continually
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
NtEnumerateValueKey(KHANDLE, int);
ming
NtQueryValueKey(KHANDLE, VarName);
Prof. Rahhul M. Sammant, HOD MMBATech
NtLoadKey(KHANDLE HiveFileName);
NtLoadKey(KHANDLE,
ming
settings
Prof. Rahhul M. Sammant, HOD MMBATech
System settings
user.dat
d t C \Wi d
C:\Windows Mostt Recently
M R tl
If there are multiple user Used (MRU) files
profiles, each user has an
User ppreference
i di id l user.dat
individual d t fil
file iin
settings
windows\profiles\user
account
Syste
em Architecture & Programm
Filename
e a e Location
ocat o Content
Co te t
ntuser.dat \Documents and Settings\user Protected storage area for user
If there are multiple user profiles, account Most Recently Used (MRU)
each user has an individual files
user.dat file in
User preference settings
windows\profiles\user
account
Default \Windows\system32\config System settings
ming
Prof. Rahhul M. Sammant, HOD MMBATech
S ft
Software \Wi d
\Windows\system32\config
\ t 32\ fi All iinstalled
t ll d programs and
d th
their
i
settings
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
em Architecture & Programm
Syste
Syste
em Architecture & Programm
Registry: Loading the Hive
Loaded at boot time by Boot Loader (NTLDR) and the
kernel (ntoskrnl.exe)
(ntoskrnl exe)
Explicitly loaded by calling NtLoadKey/RegLoad Key
- Thiss requires
equ es ‘Restore’
esto e security
secu ty privileges.
p eges
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• REG_BINARY
_ : It contains binary
y data. 0's & 1's.
ming
• REG_QWORD : This data type is a Quadruple Word. It is a 64-bit numeric
Prof. Rahhul M. Sammant, HOD MMBATech
value.
• REG_MULTI_SZ
REG MULTI SZ : Thi
This ddata type contains
i a group off zero-terminated
i d
strings assigned to a single value.
• REG_EXPAND_SZ
REG EXPAND SZ : This data type is a zero
zero-terminated
terminated string containing
an unexpanded reference to an environment variable, like say,
%SystemRoot%.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Name: World Authority
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• User ID
Prof. Rahhul M. Sammant, HOD MMBATech
– Administrator – 500
– Guest – 501
• Global Groups ID
– Administrators – 512
– Users – 513
– Guest - 514
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
– Kazaa data
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
– HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVer
sion\App Paths
– HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVer
sion\Uninstall
• If suspicious, use information from the registry to find the actual
code
• Registry time stamps will confirm the file MAC data or show them to
be altered
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\WinLogon
– Security Center Settings
• HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center
• HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Shar
edAccess\Parameters\FirewallPolicy
– If firewall logging is enabled, the log is typically at
%SystemRoot%/pfirewall.log
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
– Names have changed
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• 5 authority level (from 0 to 5)
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• Windir\win.ini
• Windir\system.ini
• Wi di \d
Windir\dosstart.bat
t tb t
• Windir\system\autoexec.nt
• Windir\system\config.nt
• Windir\system32\autochk exe
Windir\system32\autochk.exe
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
instead, writes it, to a per-user location,
Prof. Rahhul M. Sammant, HOD MMBATech
HKEY_CLASSES_ROOT\VirtualStore\Machine\
Software
• This is done discreetly. y No one gets
g to know that
this is happening ! This is, in short Registry
Virtualization, and it is a useful Security feature.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 114
Syste
Kernel Transaction Manager
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
click OK to save prompt. Changes made are directly
Prof. Rahhul M. Sammant, HOD MMBATech
incorporated.
• Mention must specifically be made of
• HKEY_LOCAL_MACHINE\System\CurrentControlSethiv
e as the keys in this particular are so essential for Vista
t start-up,
to t t th t it
that its b
backup
k iis maintained,
i t i d which
hi h you can
restore when necessary, simply by booting in Safe Mode
and selecting
11/12/2010 Mukesh Patel School of Technology Management & Engineering 116
Syste
em Architecture & Programm
Wi d
Windows API programming
i
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• These functions are implemented in dynamic-link
Prof. Rahhul M. Sammant, HOD MMBATech
libraries, or DLLs.
• These are files with the extension .DLL
DLL or sometimes
.EXE, and they are mostly located in the
\WINDOWS\SYSTEM subdirectory under Windows 98
andd th
the \WINNT\SYSTEM and d \WINNT\SYSTEM32
subdirectories under Windows NT.
ming
User, and GDI.
Prof. Rahhul M. Sammant, HOD MMBATech
ming
bit USER32.DLL) refers to the user interface, and
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
functions therein.
• When a Windows program is loaded into
memory, the calls in the program are resolved to
point to the entries of the DLL functions
functions, which
are also loaded into memory if not already there.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• User Interface
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• Common Control Library
Prof. Rahhul M. Sammant, HOD MMBATech
– Gives applications
pp access to some advanced controls
provided by the operating system. These include
things like status bars, progress
bars,, toolbars and tabs. The libraryy resides in aDLL file
called commctrl.dll on 16-bit Windows,
and comctl32.dll on 32-bit Windows. It is grouped
under the User Interface category of the API.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 136
Syste
em Architecture & Programm
• Windows
Wi d Shell
Sh ll
– Component of the Windows API allows applications to
access the functionality provided by the operating
system shell, as well as change and enhance it. The
component resides inshell.dll on 16-bit Windows,
and shell32.dll on 32-bit
32 bit Windows. The Shell
ming
Lightweight Utility Functions are in shlwapi.dll. It is
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
{
MessageBox (NULL
(NULL, TEXT ("Hello
( Hello, Windows 98!")
98! ), TEXT (("HelloMsg")
HelloMsg ),
0);
return 0 ;
}
11/12/2010 Mukesh Patel School of Technology Management & Engineering 138
Syste
em Architecture & Programm
• #i
#include
l d <windows.h>
i d h WINDOWS
WINDOWS.H H iis a master
t iinclude
l d
file that includes other Windows header files, some of
which also include other header files. The most
important and most basic of these header files are:
• WINDEF.H Basic type definitions.
ming
• WINNT.H Type definitions for Unicode support.
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• This entry point is documented in /Platform SDK/User
Prof. Rahhul M. Sammant, HOD MMBATech
Interface Services/Windowing/Windows/Window
Reference/Window Functions
Functions.
• It is declared in WINBASE.H like so (line breaks and all):
• int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR lpCmdLine, int
nShowCmd );
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• The fourth parameter to WinMain indicates how
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
identical with the ISO 10646-1 standard. The
Prof. Rahhul M. Sammant, HOD MMBATech
ming
memory as ASCII strings. (File compression
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• GetStockObject Obtains a graphic object, in this case a
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• GetMessage Obtains a message from the
Prof. Rahhul M. Sammant, HOD MMBATech
message queue.
• TranslateMessage Translates some keyboard
messages.
• DispatchMessage Sends a message to a
window procedure.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 160
Syste
em Architecture & Programm
• PlaySound Plays a sound filefile.
• BeginPaint Initiates the beginning of window painting.
• GetClientRect Obtains the dimensions of the window's
window s
client area.
• DrawText Displays a text string.
• EndPaint
E dP i t Ends
E d window
i d painting.
i ti
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
em Architecture & Programm
Hurdles
• D
Don't 't Call
C ll Me,
M I'll Call
C ll You
Y
• Programmers are well acquainted with the idea
off calling
lli on ththe operating
ti systemt tto d
do
something. For example, C programmers use
the fopen function to open a file
file. The fopen
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
window class uses this window procedure
Prof. Rahhul M. Sammant, HOD MMBATech
o p
for processing
ocess g a all messages
essages to tthee
window.
• Windows sends a message to the window
by calling the window procedure.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 163
Syste
em Architecture & Programm
• Windows calls WndProc when a window is
first created. Windows calls WndProc
when the window is eventually destroyed.
• Windows calls WndProc when the window
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• Thee window
do pprocedure
ocedu e tthen
e responds
espo ds to
this message in some way or passes the
message to DefWindowProc for default
processing.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
either the keyboard or the mouse.
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
item with the keyboard or mouse, the
Prof. Rahhul M. Sammant, HOD MMBATech
eyboa d o
keyboard or mouse
ouse message
essage is
s queued
but the eventual WM_COMMAND
message indicating that a menu item has
been selected is nonqueued.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
threads of execution, each thread's message
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Windows function.
• Upon return from that function function, can you be
assured that the variable is still the same? Not
necessarily—not
necessarily not if the particular Windows
function you call generated another message
and the window p procedure changes g the variable
while processing
11/12/2010
that second message.
Mukesh Patel School of Technology Management & Engineering 186
Syste
em Architecture & Programm
• This is one of the reasons why certain
p
forms of compiler optimization
p must be
turned off when compiling Windows
programs.
programs
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
global variables.
• Of course, you'll get a much better feel for all of
this in later chapters as the window procedures
are expanded to process more messages.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
good idea to leave your window sitting inert on
Prof. Rahhul M. Sammant, HOD MMBATech
the screen.
• It annoys users. It annoys users just as much as
bugs, nonstandard behavior, and incomplete
help files. Give the user a break, and return
quickly from all messages.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 191
Syste
em Architecture & Programm
Network File System (NFS)
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• The mechanism allows a computer to run
Prof. Rahhul M. Sammant, HOD MMBATech
a se
server
e tthat
at makes
a es so
some eo
or a
all o
of its
ts files
es
available for remote access, and allow
applications on other computers to access
those files.
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
Computers
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
stateless server crashes and reboots; the application
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
NFS mode integer is very similar to that of
Prof. Rahhul M. Sammant, HOD MMBATech
U
UNIX.
• Although NFS defines file types for devices,
it does not permit remote device access
(e.g., a client may not read or write a remote
device)
11/12/2010 Mukesh Patel School of Technology Management & Engineering 199
Syste
NFS Client and Server
ming
access to a file, the OS uses the syntax of the path
Prof. Rahhul M. Sammant, HOD MMBATech
ming
integrate remote file systems into the naming
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
receive an integer descriptor for the file exactly
ming
operation on a file descriptor, the system
Prof. Rahhul M. Sammant, HOD MMBATech
ming
file locations and server computer systems, NFS requires
Prof. Rahhul M. Sammant, HOD MMBATech
ming
name to specify a file when requesting an operation
Prof. Rahhul M. Sammant, HOD MMBATech
on that file.
• Instead, the client must obtain a handle that it can use
to reference the file file.
• Having the server provide handles for directories as
well as files permits a client to trace a path through the
server’s
11/12/2010
hierarchy.
Mukesh Patel School of Technology Management & Engineering 204
Syste
An NFS Client in UNIX
ming
• The manager creates an empty directory in the
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
an NFS NFS-mounted
mounted directory,
directory the system will
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• If the client calls lseek, the system records the new file
position in the table without sending a message to the
server.
• Any subsequent access operation extracts the file
position from the table and sends it to the server along
with
ith th
the access request. t
11/12/2010 Mukesh Patel School of Technology Management & Engineering 207
Syste
Reading a Directory Statelessly
ming
Prof. Rahhul M. Sammant, HOD MMBATech
Syste
request to specify which entries it has already
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Unix commands
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
anything:
–
mount -h
• prints
i t ah
help
l message;
–
mount -V
• prints a version string; and just
– mountt [[-l]
l] [-t
[ t type]
t ]
• lists all mounted file systems (of type type). The option -l adds the (ext2, ext3 and
XFS) labels in this listing.
ming
-n
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Networking commands in Windows
Prof. Rahhul M. Sammant, HOD MMBATech
ming
• -n Displays addresses and port numbers in numerical form.
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
hostnames. -h maximum_hops
Maximum number of hops to search for
target. -j host-list Loose source route
along host-list. -w timeout Wait timeout
py
milliseconds for each reply.
11/12/2010 Mukesh Patel School of Technology Management & Engineering 218
Syste
NBTSTAT exe
NBTSTAT.exe
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Networking commands in Unix
Prof. Rahhul M. Sammant, HOD MMBATech
• % ping burro.baylor.edu
burro baylor edu
ming
Prof. Rahhul M. Sammant, HOD MMBATech
burro.baylor.edu is alive
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• % nslookup burro.baylor.edu
Server: ccis03.baylor.edu <= Name of queried
name server
Address: 129.62.16.4 <= IP address of
queried name server
11/12/2010 Mukesh Patel School of Technology Management & Engineering 224
Syste
ifconfig
ming
inet addr:129.62.149.74 Bcast:129.62.149.255 Mask:255.255.254.0
Prof. Rahhul M. Sammant, HOD MMBATech
• % traceroute www.yahoo.com
www yahoo com
ming
Prof. Rahhul M. Sammant, HOD MMBATech
ming
Prof. Rahhul M. Sammant, HOD MMBATech
– Echo
E h (P
(Portt 7)
7)- Echo
E h bback
k what
h t you ttype
•
• molar:/etc% arp -a
a
ming
Prof. Rahhul M. Sammant, HOD MMBATech
– Network connections
ming
Prof. Rahhul M. Sammant, HOD MMBATech
% netstat -a | more
ming
Prof. Rahhul M. Sammant, HOD MMBATech
% route
ming
Prof. Rahhul M. Sammant, HOD MMBATech
• dip means Dialup IP. It was written by Fred van Kempen and has been patched very
heavily by a number of people.
• dip provides an interpreter for a simple scripting language that can handle the
modem for you,
you convert the line to SLIP mode
mode, and configure the interfaces
interfaces. The
ming
script language is powerful enough to suit most configurations.
Prof. Rahhul M. Sammant, HOD MMBATech
• To be able to configure the SLIP interface, dip requires root privilege. It would now
be tempting to make dip setuid to root so that all users can dial up some SLIP server
without having to give them root access
access. This is very dangerous
dangerous, though
though, because
setting up bogus interfaces and default routes with dip may disrupt routing on your
network. Even worse, this action would give your users power to connect toany SLIP
server and launch dangerous attacks on your network. If you want to allow your users
to fire up
p a SLIP connection, write small wrapper
pp p programs
g for each pprospective
p SLIP
server and have these wrappers invoke dip with the specific script that establishes
the connection. Carefully written wrapper programs can then safely be made setuid
to root. An alternative, more flexible approach is to give trusted users root access
to dip using a program..
ming
Prof. Rahhul M. Sammant, HOD MMBATech