Presentation is loading. Please wait.

Presentation is loading. Please wait.

Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.

Similar presentations


Presentation on theme: "Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling."— Presentation transcript:

1 Middleware Services

2 Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling

3 Core OS Components Process Manager Thread Manager Communication Manager Memory Manager Supervisor

4 Protection From illegitimate access –Read Or Write Protection by cryptographic techniques Another type is by FilePointer variable Protection by using a type safe language

5 Kernel and Protection Kernel process in supervisor mode Arranges others to be run in user mode Protection by address space Transfer between address spaces via –Interrupt –Sytem call trap Cost is extra processor cycles

6 Processes and threads A process may contain execution environment An Execution environment –An address space –Thread synch and communication resources –Open Files and Windows Threads can share Execution environment

7 Address Space Is a unit of management of a process’s virtual memory Can consists of one or more regions Each region is specified by –Its extent –Read/write/execute permissions for threads –Whether it can be grown upward or downward

8 Motivation for different regions Provide a stack for each thread Can detect attempts to exceed stack limits Attempt to access unallocated memory can be detected Files to be mapped into the address space

9 Shared regions Libraries Kernel Data sharing and communication

10 Creation of a new process Choice of process host –Location policy –Transfer policy Policies can be Static Deterministic Probabilistic Adaptive Apply Heuristics

11 Load sharing algorithm Sender initiated Receive initiated Migratory

12 Creation of a new Execution Environment Statically defined format –Text, stack and heap Defined with respect to an existing Execution environment –Copy on write –Page frames shared between two address spaces

13 Threads If a single thread can do the processing in n milli seconds a server can handle 1/ (n millisecond) client requests / second

14 Architecture for mutithreaded architecture Worker pool architecture Server creates a fixed pool of worker threads to process the requests when it starts up The module ‘receipt and queing’ which receives requests from a collection of sockets and places them on a shared queue for retrieval by workers

15 Architecture contd. Thread per request architecture Thread per connection architecture Thread per object architecture

16 Thread within clients Threads can be used for –Processing within Clients –And communication with remote objects in servers

17 Process and threads Cost of creating a new thread is less Switching Threads share data efficiently Threads within one process are not protected from one another –By type safe language

18 Thread programming setPrority start run sleep yeild – invoke the scheduler destroy

19 Thread Synchronization synchronized keyword wait notify -unblock notifyall-unblock join- block the caller until target thread’s termination interrupt – prematurely waking a waiting thread

20 Thread scheduling Preemptive Non preemptive Critical section yeild()

21 Communication Communication primitives –getRequest –sendReply –doOperation Middleware –RPC/RMI –Group communication –Event Notification

22 Protocols and Openness Communication between MW in different computers Amoebo RPC, VMTP, Sprite RPC Wireless –IrDA, Bluetooth Dynamic protocol composition –A protocol stack can be composed on the fly To meet reqmts of a particular appln.

23 Invokation performance Network bandwidth Network latencies

24 Invocation contd Making a system call Sending a message RPC RMI –Synchronous –Asynchronous

25 Invocation over the network A null RPC An RPC without parameters that executes a null procedure and return no values Little system data and no user data Total call time –Kernel action –User level RPC

26 Invocation costs Marshalling Data Copying Packet Initialization Thread Scheduling and Context Switching Memory Sharing Choice of protocol


Download ppt "Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling."

Similar presentations


Ads by Google