Kahn process networks

Kahn process networks

Kahn process networks ("KPNs", or "process networks") is a distributed "model of computation" ("MoC") where a group of deterministic sequential processes are communicating through unbounded FIFO channels. The resulting process network exhibits deterministic behavior that does not depend on the various computation or communication delays. The model was originally developed for modeling distributed systems but has proven its convenience for modeling signal processing systems. As such, KPNs have found many applications in modeling embedded systems and high-performance computing systems. KPNs were first introduced in the PhD thesis of Dr. Gilles Kahn.

Execution model

KPN is a common model for describing signal processing systems where infinite streams of data are incrementally transformed by processes executing in sequence or parallel. Despite parallel processes, multitasking or parallelism are not required for executing this model.

In a KPN, processes communicate via unbounded FIFO channels. Processes read and write atomic data elements or tokens from and to channels. Writing to a channel is non-blocking, i.e. it always succeeds and does not stall the process, while reading from a channel is "blocking", i.e. a process that reads from an empty channel will stall and can only continue when the channel contains sufficient data items ("tokens"). Processes are not allowed to test an input channel for existence of tokens without consuming them. Given a specific input (token) history for a process, the process must be deterministic so that it always produces the same outputs (tokens). Timing or execution order of processes must not affect the result and therefore testing input channels for tokens is forbidden.

Notes on processes

* A process need not read any input or have any input channels as it may act as a pure data source
* A process need not write any output or have any output channels
* Testing input channels for emptiness (or "non-blocking reads") could be allowed for optimisation purposes, but it should not affect outputs. It can be beneficial and/or possible to do something in advance rather than wait for a channel. For example, assume there were 2 reads from different channels. If the first read would stall (wait for a token) but the second read could be read a token directly, it could be beneficial to read the second one first to save time, because the reading itself often consumes some time (e.g. time for memory allocation or copying).

Process firing semantics as Petri nets

Assuming process "P" in the KPN above is constructed so that it first reads data from channel "A", then channel "B", computes something and then writes data to channel "C", the execution model of the process can be modeled with Petri net shown on the right. The single token in the "PE resource" place forbids that the process is executed simultaneously for different input data. When data arrives at channel "A" or "B", tokens are placed into places "FIFO A" and "FIFO B" respectively. The transitions of the Petri net are associated with respectful I/O operations and computation. When the data has been written to channel "C", "PE resource" is filled with its initial marking again allowing new data to be read.

Process as a finite state machine

A process can be modeled as a finite state machine that is in one of two states:
* Active; the process computes or writes data
* Wait; the process is blocked (waiting) for dataAssuming the finite state machine reads program elements associated with the process, it may read three kinds of tokens, which are "Compute", "Read" and "Write token". Additionally, in the "Wait" state it can only come back to "Active" state by reading a special "Get token" which means the communication channel associated with the wait contains readable data.

Properties

Boundedness of channels

A channel is "strictly bounded" by b if it has at most b unconsumed tokens for any possible execution. A KPN is "strictly bounded" by b if all channels are strictly bounded by b.

The number of unconsumed tokens depends on the execution order (scheduling) of processes. A spontaneous data source could produce arbitrarily many tokens into a channel if the scheduler would not execute processes consuming those tokens.

A real application can not have unbounded FIFOs and therefore scheduling and maximum capacity of FIFOs must be designed into a practical implementation. The maximum capacity of FIFOS can be handled in several ways:
* FIFO bounds can be mathematically derived in design to avoid FIFO overflows. This is however not possible for any KPN. It is an undecidable problem to test whether a KPN is strictly bounded by b. Moreover, in practical situations, the bound may be data dependent.
* FIFO bounds can be grown on demand (Parks, 1995)
* Blocking writes can be used so that a process blocks if a FIFO is full. This approach may unfortunately lead to an artificial deadlock unless the designer properly derives safe bounds for FIFOs (Parks, 1995). Local artificial detection at run-time may be necessary to guarantee the production of the correct output (Geilen&Basten, 2003)

Closed and open systems

A "closed KPN" has no external input or output channels. Processes that have no input channels act as data sources and processes that have no output channels act as data sinks. In an "open KPN" each process has at least one input and output channel.

Determinism

Processes of a KPN are deterministic. For the same input history they must always produce exactly the same output. Processes can be modeled as sequential programs that do reads and writes to ports in any order or quantity as long as determinism property is preserved. As a consequence, KPN model is deterministic so that following factors entirely determine outputs of the system:
* processes
* the network
* initial tokensHence, timing of the processes does not affect outputs of the system.

Monotonicity

KPN processes are "monotonic", which means that they only need partial information of the input stream in order to produce partial information of the output stream. Monotonicity allows parallelism. In a KPN there is a total order of events inside a signal. However, there is no order relation between events in different signals. Thus, KPNs are only partially ordered, which classifies them as untimed model.

References

* Kahn, G. (1974). The semantics of a simple language for parallel programming. Information Processing, pages 471-475.
* Lee, E. and Park, T. (1995). Dataflow Process Networks. In Proceedings of the IEEE, volume 83, pages 773-799.
* Josephs, M.B. (2005). [http://dx.doi.org/10.1007/11423348_6 Models for Data-Flow Sequential Processes] . In: Communicating Sequential Processes, The First 25 Years, LNCS 3525, pages 85-97.
* Parks, Thomas M. (1995). [http://ptolemy.eecs.berkeley.edu/publications/papers/95/parksThesis/ Bounded Scheduling of Process Networks]
* Geilen, Marc and Basten, Twan. [http://citeseer.ist.psu.edu/geilen03requirements.html Requirements on the Execution of Kahn Process Networks] . In P. Degano, Programming Languages and Systems, 12th European Symposium on Programming, ESOP 2003, Proc., pp. 319-334. Warsaw, Poland, 7-11 April 2003. LNCS 2618. Springer, Berlin, Germany, 2003

External links

* [http://www.pervasivedatarush.com/articles/parks-scheduling-original-paper Dr Thomas Parks' seminal paper on scheduling]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Kahn (disambiguation) — Kahn is a German derived surname, from the word for small boat .Kahn may also refer to: *Kahn (game browser), enabling online multiplayer of IPX compatible games over a TCP/IP network *Kahn s, an American meat processing and distribution company… …   Wikipedia

  • Actor model and process calculi — In computer science, the Actor model and process calculi are two closely related approaches to the modelling of concurrent digital computation. See Actor model and process calculi history.There are many similarities between the two approaches,… …   Wikipedia

  • Dataflow — This article is about software engineering. For the flow of data within a computer network see packet flow For the graphical representation of flow of data within an information system, see data flow diagram Dataflow is a term used in computing,… …   Wikipedia

  • Petri net — A Petri net (also known as a place/transition net or P/T net) is one of several mathematical modeling languages for the description of distributed systems. A Petri net is a directed bipartite graph, in which the nodes represent transitions (i.e.… …   Wikipedia

  • History of the Internet — Main article: Internet The history of the Internet starts in the 1950s and 1960s with the development of computers. This began with point to point communication between mainframe computers and terminals, expanded to point to point connections… …   Wikipedia

  • Cryptanalysis of the Enigma — enabled the western Allies in World War II to read substantial amounts of secret Morse coded radio communications of the Axis powers that had been enciphered using Enigma machines. This yielded military intelligence which, along with that from… …   Wikipedia

  • Actor model — In computer science, the Actor model is a mathematical model of concurrent computation that treats actors as the universal primitives of concurrent digital computation: in response to a message that it receives, an actor can make local decisions …   Wikipedia

  • Architecture and Civil Engineering — ▪ 2009 Introduction Architecture       For Notable Civil Engineering Projects in work or completed in 2008, see Table (Notable Civil Engineering Projects (in work or completed, 2008)).        Beijing was the centre of the world of architecture… …   Universalium

  • France — /frans, frahns/; Fr. /frddahonns/, n. 1. Anatole /ann nann tawl /, (Jacques Anatole Thibault), 1844 1924, French novelist and essayist: Nobel prize 1921. 2. a republic in W Europe. 58,470,421; 212,736 sq. mi. (550,985 sq. km). Cap.: Paris. 3.… …   Universalium

  • performing arts — arts or skills that require public performance, as acting, singing, or dancing. [1945 50] * * * ▪ 2009 Introduction Music Classical.       The last vestiges of the Cold War seemed to thaw for a moment on Feb. 26, 2008, when the unfamiliar strains …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”