160 likes | 331 Views
The Structuring of Systems Using Upcalls. David D. Clark. Presented by Mohammed S Karamathulla. Agenda. Layering and upcalls Multi-task Modules Advantages Problems Related Systems Conclusion. Layering/Upcalls.
E N D
The Structuring of Systems Using Upcalls David D. Clark Presented by Mohammed S Karamathulla
Agenda • Layering and upcalls • Multi-task Modules • Advantages • Problems • Related Systems • Conclusion
Layering/Upcalls • At the kernel level (micro kernel) each layer is implemented as a single process with its own address space • In this paper all layers in a single address space • Layer provides service to client layer (above/below) • Upcalls used to distinguish from structured view of service invocation, organized around downward flow • With procedural invocations no need to have process and interprocess communication
What is multitask module? Layer is organized as collection of subroutines Subroutines live in a number of tasks callable form above or below. Multitask module contains a collection of state variables – accessible through shared memory
Layering Architecture Swift “THE” System Single Address Space Level 5 - operator IPC Fast Threads Level 4 – user programs Processes Interprocess communication Level 3 – I/O services Slow Multitask modules Level 2 – message interpreter Interprocess communication Level 1 – segment controller Level 0 - processor allocation and synchronization Tasks
General Architecture User A User B Display Layer Transport layer (Appication Specific) Downcall downcall return - immediate upcall upcall return Network Layer- common to all (shared) does not classify TCP/UDP Interrupt
Congestion Control Data sent waiting to be acknowledged Data to be sent Congestion Window Dropped Pkt Max. BW BW Actual BW Time
Net Layer display-start() display-get- -data(packet) Display display- keyboard -hadler() display- receive(char) Transport Transport- send (port) transport- Get-port (packet) Transport- open() transport- receive (packet,port) transport-arm-for -send (port,send-handler) Net-open (receive-handler) Net-send (packet,port) Net-receive (port,hadler) Net-dispatch() Interrupt Handler
Advantages of Methodology • Flow control is by synchronous subroutines-natural. • Subroutines are cheaper than IPC – no context switches, data buffering mechanisms. • Efficient and Simplicity in implementation • One layer asks advise of other. • Only subroutines are exported • Eliminates system-wide codification • Piggybacking • Asynchrony (IPC) is used only when needed
Problems • Upcall Failures: resources to be recovered – shared variables and task • partition data and make shared data consistent and unlocked • make tasks reusable How resources are identified and freed? sol: mediate between client and layers How to distinguish between a task in a loop and a long computation? sol: timer/overseeing human
Problems Cont.. • Recursive Calls: • Put variables in consistent state and re-evaluate states on return • Prohibit recursive downcall • Queue work request if lock is set • Set flags which is identifiable by other tasks • Replace downcall by extra return arguments/another upcall to query client
Problems with Multi-task Modules • Locking • How to change the global state of a module • Signal any task in whose stack there is subroutine of this module
Related Systems • Task Scheduling • Assign dynamic priority in the scheduling requests • Monitor and scheduler interaction • Deadline promotion • Address Space management • Swift implemented in single address space • How to control propagation of errors? sol: compile/runtime checking for pointers,bound checking for arrays etc. • Garbage collector
Conclusion • Convinces methodology of upcalls and muti-task modules • Faster – no context switches, data buffering and IPC • Display window management failed. • Swift OS is portable • Layer as a process is a bad idea • Organize layer as a multi-task modules • Good for interactive and networked systems • This paper has been cited 167 times by the google scholar.
backup • A real-time memory allocator / garbage collector: • Provide a mechanism to preallocate, or bound the delay of allocation and de-allocation of memory.
Layered Systems • Advantages • Support for Abstraction: Complex problems can be partitioned into sequences of incremental steps • Enhancement: Like pipelines, a layer in a layered system interacts with only the adjacent layers – limiting impact of changes • Reuse: Different implementations of layers may be used interchangeably • Disadvantages • Not all systems can be structured in a layered fashion • Performance: Sometimes it is necessary to cross layers in order to boost performance • Abstraction Difficulties: It can be difficult to find the right levels of abstraction