Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structuring of Systems using Upcalls

Similar presentations


Presentation on theme: "Structuring of Systems using Upcalls"— Presentation transcript:

1 Structuring of Systems using Upcalls
David D.Clark Presented by Madhura S Rama

2 Agenda Goal Layers and Upcalls Multitask Modules
Control Flow in a N/W Protocol routine Advantages of Upcalls Advantages of Multitask Modules Issues Other Features Conclusion My View

3 Goal Propose a design methodology suitable for operating system programs which Permits synchronous procedure call between layers in both upward and downward direction. Provides runtime support for highly interactive parallel software packages Swift OS built to implement this methodology

4 Layered Architecture Traditionally, layer below provides services to layer above. Flow of control – Top-down Each layer is usually implemented as a process Uses asynchronous message passing for communication between layers Inefficient – requires context switches, inter process communication and data buffering.

5 Swift Layered Architecture
Layer provides service to layer above or below depending on the flow of control – called Upcalls Each layer is an encapsulated multitask module Implemented using a single address space For storing variables For efficient passing of data between layers

6 Multitask Modules Each layer defined as a collection of subroutines – called multitask modules Subroutines live in number of tasks in a layer Layers communicate through subroutine calls Each layer contains private state which are accessible through shared memory Various tasks in a layer communicate using state variables

7 Layering and Upcalls Swift Layer TCP/IP Layer FTP Client TCP IP
Process Multitask Modules TCP Inter-process Communication IP Thread / task Ethernet Driver Subroutine Calls Ethernet Tasks

8 Ex: Control Flow in a N/W Protocol routine
Display_start receive Get_data Keyboard_ handler Display Layer wakeup Transport_open receive Get_port send Arm_send Transport Layer wakeup Net_open Net_receive Net_dispatch Net_send Network Layer Create task wakeup Interrupt Handler

9 Advantages Of Upcalls: Of Multitask Modules:
Efficient - Subroutine call cheaper than IPC Simplicity of implementation Piggybacking achieved effectively Of Multitask Modules: Easier to understand and less threatening Decisions about how tasks are used need not be defined until late in design time

10 Issue 1 Lower layer left in inconsistent state when upper layer fails during upcall Solution: Partition the data Make that task non-essential and throw it away Mediate the resources used between the client and the layers and run a cleanup procedure

11 Issue 2 How to distinguish between a task in a loop and the one running for a long time? Solution: Use timers Make a human oversee it

12 Issue 3 Violation of trust between lower layers Solution:
Programmers need to be skilled enough to organize the resources properly

13 Issue 4 Indirect Recursive Call Solution:
Put variables on a consistent state and reevaluate on call return Prohibit an upcall from making any recursive downcall Queue the work request for later execution Make the recursive call set flags for later examination Replace the downcall by extra return arguments to upcall/ another upcall to query the client

14 Issue 5 Modules failing to use monitor locks properly Solution:
Requires programming discipline

15 Other Features Task Scheduling Address Space Management
Associate dynamic priority to tasks scheduled Deadline promotion Address Space Management Use CLU to avoid propagation errors in a single address space Garbage Collection

16 Conclusion Realizing a layer as a process is a bad idea
Upcalls are simple and efficient Swift OS is portable Suitable for Network protocols and text editors Not suitable for large applications like compilers Efficiency of the system depends on the skill level of the programmer

17 My View If efficiency is one of the goals then, garbage collection should not be used as it is inefficient System cannot be tested layer by layer as the call flow is in both direction. Makes debugging difficult. As calls are in both direction, order of acquiring the locks cannot be enforced – Might lead to deadlocks. Selecting the correct layered architecture is a tradeoff between “Safety and Performance”

18 Questions????


Download ppt "Structuring of Systems using Upcalls"

Similar presentations


Ads by Google