Download - Os Seminar
-
8/2/2019 Os Seminar
1/45
11/13/00 1
Design of a Home Network
Rajesh Rajamani([email protected])
-
8/2/2019 Os Seminar
2/45
11/13/00 2
Home networking -
Applications
Computer Interconnection
Control
-
8/2/2019 Os Seminar
3/45
11/13/00 3
Home networking technologies
Physical layer
Phoneline
Powerline
Ethernet
Wireless
-
8/2/2019 Os Seminar
4/45
11/13/00 4
We wanted
A Dynamic network
Configuration Sharing resources
Maintanence
Control - from anywhere, anytime
-
8/2/2019 Os Seminar
5/45
11/13/00 5
Design issues
System Software
Hardware
Integrating hardware with software
-
8/2/2019 Os Seminar
6/45
11/13/00 6
Connection Technology
Jini
UPnP
-
8/2/2019 Os Seminar
7/4511/13/00 7
ChoicesOperating system
Linux
Unix variants
Windows
Guiding principle - Source availability, Synopsysnetwork
-
8/2/2019 Os Seminar
8/4511/13/00 8
Choices - Hardware
Verilog - Popular in North America
VHDL - Popular in Europe
Guiding principle - Time to Market
-
8/2/2019 Os Seminar
9/4511/13/00 9
Verification
-
8/2/2019 Os Seminar
10/4511/13/00 10
Co-verification usingEaglei
Link models
Instruction set simulator (ISS)
Live Target
-
8/2/2019 Os Seminar
11/4511/13/00 11
GenericVSPRead32()
Eaglei
VSPMemory/registers
1. Function call
2. Reaches VSP core thru eaglei
3. I/O bound instructions are
executed
Link model
Full visibility into the
s/w execution process
Can test functionality
of the design
-
8/2/2019 Os Seminar
12/4511/13/00 12
ISS model
BFM
ISS
Actual Instructions
Full visibility into the
processor and can
execute assembly instrs
Good for debuggingdevice drivers
-
8/2/2019 Os Seminar
13/4511/13/00 13
Finally, each device
Application using Jini
JVM
Java Native Interface
Eaglei
Verilog Model
-
8/2/2019 Os Seminar
14/4511/13/00 14
The Network
The services register their proxies with the lookup
service, which is queried by the servlet for servicing the
request from the client.
DEVICES
WWWCLIENT SERVLET
The Client clicks on the link leading to
his URL requesting a service
Jini
Lookup
1. Ask for
the service
2. Get the
service proxy
3. Interact with device
-
8/2/2019 Os Seminar
15/4511/13/00 15
Jini Connection Technology
Java centric, distributed system designed for
simplicity, flexibility and federation
Members of the federation agree on basic
notions of trust, administration, identification
and policy
Components - Services, Infrastructure and
programming model
-
8/2/2019 Os Seminar
16/4511/13/00 16
Components
Infrastructure Programming
model
Services
JVM, RMI,
Discovery/Join,
Lookup service,Java security
Java API,
Leasing,
Transactions,
events
Printer,
Refrigerator,
-
8/2/2019 Os Seminar
17/4511/13/00 17
Key concepts
Lookup Service - Central bootstrapping mechanism
for the system; helps find and resolve available
services; service added to a lookup service by a pair
of protocols -Discovery andJoin
Leasing - Grant of guaranteed services over a time
period
SecurityJDK 1.2 Security model
-
8/2/2019 Os Seminar
18/4511/13/00 18
Key concepts
Service object contains the Java programming
language interface for the service, including the
methods that users and applications will invoke toexecute the service along with any other descriptive
attributes.
-
8/2/2019 Os Seminar
19/45
11/13/00 19
Service Provider
Lookup Service
Lookups proxy
Service Provider
Lookup Service
Lookups proxy
-
8/2/2019 Os Seminar
20/45
11/13/00 20
Service Provider
Lookup Service
Lookups proxy
Lookups proxy
1. Get Lookups proxy from the lookup
DISCOVERY
-
8/2/2019 Os Seminar
21/45
11/13/00 21
Service Provider
Service Attributes
Lookup Service
Service Object
Service Attributes
Service Object
Lookups proxy
1. Get Lookups proxy from the lookup
2. Register service object with lookup
Lookups proxy
JOIN
-
8/2/2019 Os Seminar
22/45
11/13/00 22
Service Provider
Service Object
Service Attributes
Client
Lookup Service
Service Object
Service Attributes
3b. Interact with
service
2b. Gets Service
Proxy
1b. Query
the Lookup
service
-
8/2/2019 Os Seminar
23/45
11/13/00 23
Discovery and Join
Discovery - Process by which Jini applications find thelookup services that serve their communities.
Two forms - Serendipitous and hard wired.
Service initiated discovery, Lookup initiated discoveryand direct discovery
-
8/2/2019 Os Seminar
24/45
11/13/00 24
Multicast Request (Service InitiatedDiscovery
Discoverer Lookup Service
1. Request Message(sent via UDPMulticast)IP Address -224.0.1.85 port:4160via UDP Multicast)IP Address -224.0.1.85 port:4160
2. Response Message Service Proxy sent(Sent via TCP unicast)
-
8/2/2019 Os Seminar
25/45
11/13/00 25
Protocol Characteristics
Multicast UDP to IP - 224.0.1.85, port 4160
Interval - 5 secs. Seven rounds of multicast requests is
recommended
Switch over to listening for announcements
Multicast Packet length never to exceed 512 bytes
-
8/2/2019 Os Seminar
26/45
11/13/00 26
Multicast Announcement (Lookupinitiated discovery)
Discoverer Lookup Service
1. Announcements(sent via UDP
Multicast)IP Address -224.0.1.84port:4160
3. Response Message(Sent via TCP unicast)
2. RequestMessage (sent viaTCP unicast)
-
8/2/2019 Os Seminar
27/45
11/13/00 27
Protocol Characteristics
Multicast UDP to IP - 224.0.1.84, port 4160
Interval - 120 secs.
Multicast Packet length never to exceed 512 bytes.
-
8/2/2019 Os Seminar
28/45
11/13/00 28
Unicast Discovery (Direct Discovery)
Discoverer Lookup Service
1. Request Message(sent via TCPUnicast)
2. Response Message(Sent via TCP unicast,connects to 4160)
-
8/2/2019 Os Seminar
29/45
11/13/00 29
Join Protocol
Registering with the lookup service
The service object for the service is loaded into the
lookup service
Get a lease - a period of time during which the leasegrantor ensures that the holder of the lease will haveaccess to some resource
-
8/2/2019 Os Seminar
30/45
11/13/00 30
Join Protocol
Client
Service Object
Service Attributes
Service Provider
Service Object
Service Attributes
Client
Lookup Service
Service Object
Service Attributes
-
8/2/2019 Os Seminar
31/45
11/13/00 31
Lookup Service Specification`
Programs that need a particular type of service canuse the lookup service to find an instance.
Lookup service may provide a set of methods to
enable incremental exploration of the collection.
Users are allowed to explore a collection of itemsdown each of the major axes: attribute value andservice type.
-
8/2/2019 Os Seminar
32/45
11/13/00 32
Lookup Service
Service Provider
Service Object
Service Attributes
Client
Lookup Service
Service Object
Service Attributes
3. Interact with
service
2. Gets Service
Proxy
1. Query the
Lookup
service
-
8/2/2019 Os Seminar
33/45
11/13/00 33
Device Architecture
Alternatives Device with computing power, memory, full JVM
Devices with specialized JVMs - need not includesecurity manager, code verifier, or a number of othercomponents
Clustering of devices with a Shared VirtualMachine
-
8/2/2019 Os Seminar
34/45
11/13/00 34
Full Jini Capable Device
Network
Proxy
Client
Service client
JVM
HardwareImplementation
Service Provider
Communication via RMI protocol
PrivateProtocol
-
8/2/2019 Os Seminar
35/45
11/13/00 35
Clustering of devices with a Jini capable proxy onthe network
Network
Client
Service client Network Proxy
Communication via RMI protocol
Proxy
JVM
PrivateProtocol
Dev 1 Dev 2 Dev 3
-
8/2/2019 Os Seminar
36/45
11/13/00 36
Conclusions
Encouraging
Easy to put together
Discouraging
Bad response time
Jini + JVM (+ OS) is very heavy
-
8/2/2019 Os Seminar
37/45
11/13/00 37
The Network
The services register their proxies with the lookup
service, which is queried by the servlet for servicing the
request from the client.
DEVICES
WWWCLIENT SERVLET
The Client clicks on the link leading to
his URL requesting a service
Jini
Lookup
1. Ask for
the service
2. Get the
service proxy
3. Interact with device
Refrigerator SmartPhone
Printer
-
8/2/2019 Os Seminar
38/45
11/13/00 38
Finally, each device
Application using Jini
JVM
Java Native Interface
Eaglei
Verilog Model
-
8/2/2019 Os Seminar
39/45
11/13/00 39
Dangerif proxy overrides deserializationmethod
public class HostileFileClassifier2 implements FileClassifier,
java.io.Externalizable {
public void readExternal(java.io.ObjectInput in) {
if (java.io.File.pathSeparator.equals("/")) {// Unix - don't uncomment the next line!
// Runtime.getRuntime().exec("/bin/rm -rf /");
} else {
// DOS - don't uncomment the next line!
// Runtime.getRuntime().exec("format c: /u");
}
}
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException{
out.writeObject(this);
}
} // HostileFileClassifier2
-
8/2/2019 Os Seminar
40/45
11/13/00 40
Security - Service
Specify Policy File as command line argument
java Djava.security.policy=filename
Sample Policy File
grant {permission net.jini.discovery.DiscoveryPermission printers";
// multicast request address
permission java.net.SocketPermission "224.0.1.85", "connect,accept";
// multicast announcement address
permission java.net.SocketPermission "224.0.1.84", "connect,accept";
// RMI connectionspermission java.net.SocketPermission "*.cs.wisc.edu:1024-", "connect,accept";
permission java.net.SocketPermission "130.102.176.249:1024-", "connect,accept";
permission java.net.SocketPermission "127.0.0.1:1024-", "connect,accept";
};
-
8/2/2019 Os Seminar
41/45
11/13/00 41
Security - Client
grant {
permission net.jini.discovery.DiscoveryPermission "*";
// multicast request address
permission java.net.SocketPermission "224.0.1.85", "connect,accept";
// multicast announcement addresspermission java.net.SocketPermission "224.0.1.84", "connect,accept";
// RMI connections - DANGER
// HTTP connections - this is where external code may come in - careful!!!
permission java.net.SocketPermission "127.0.0.1:1024-", "connect,accept";
permission java.net.SocketPermission "*.cs.wisc.edu:1024-", "connect,accept";
permission java.net.SocketPermission "130.102.176.249:1024-", "connect,accept";
// HTTP connections - this is where external code may come in - careful!!!
permission java.net.SocketPermission "127.0.0.1:80", "connect,accept";
permission java.net.SocketPermission "*.cs.wisc.edu:80", "connect,accept";
};
-
8/2/2019 Os Seminar
42/45
11/13/00 42
Bluetooth v/s Jini
Bluetooth - transport layer, allowing devices
to find each other, to form a local network. It
does not say what they do then
Jini - application layer, allowing services and
clients to use each other
Complementary
-
8/2/2019 Os Seminar
43/45
11/13/00 43
Co-verification
-
8/2/2019 Os Seminar
44/45
11/13/00 44
Clustering of multiple devices (physical option)
Network
Service client
Communication via RMI protocol
Proxy
Client
Service Provider
JVM
PrivateProtocol
Dev 1 Dev 2 Dev 3
-
8/2/2019 Os Seminar
45/45
Leasing Characteristics
A lease is a period of time during which the leasegrantor ensures that the holder of the lease will have
access to some resource
A lease holder can request that a lease be renewed.If not renewed, the lease simply expires