Asynchronous Readers and Writers A Half-Synchronous Operator
Overview Introduction of the ó together with the ¡ and ¿ ! and ? versus ¡ and ¿ ✌ ¡ and ¿ using ♥ Design Level Semantics of ó , ¡ and ¿ Example Application The Future AsynchronousReaders and Writers August 23, 2016 2 / 22
Introduction, system overview AsynchronousReaders and Writers August 23, 2016 3 / 22
➓ ➓ ➓ ➓ Introduction ➓ Purpose: Asynchronous Writing and Reading. AsynchronousReaders and Writers August 23, 2016 4 / 22
➓ ➓ ➓ Introduction ➓ Purpose: Asynchronous Writing and Reading. ➓ In CSP writing over a channel is restricted to two processes interacting synchronously via an action containing the ! and the ? . AsynchronousReaders and Writers August 23, 2016 4 / 22
➓ ➓ Introduction ➓ Purpose: Asynchronous Writing and Reading. ➓ In CSP writing over a channel is restricted to two processes interacting synchronously via an action containing the ! and the ? . ➓ Proposal: a half-synchronous action which allows a process to write a value x over a channel c , AsynchronousReaders and Writers August 23, 2016 4 / 22
➓ Introduction ➓ Purpose: Asynchronous Writing and Reading. ➓ In CSP writing over a channel is restricted to two processes interacting synchronously via an action containing the ! and the ? . ➓ Proposal: a half-synchronous action which allows a process to write a value x over a channel c , ➓ without the requirement that the reading processes must be in a state where they can read the value x over a channel c . AsynchronousReaders and Writers August 23, 2016 4 / 22
Introduction ➓ Purpose: Asynchronous Writing and Reading. ➓ In CSP writing over a channel is restricted to two processes interacting synchronously via an action containing the ! and the ? . ➓ Proposal: a half-synchronous action which allows a process to write a value x over a channel c , ➓ without the requirement that the reading processes must be in a state where they can read the value x over a channel c . ➓ Together with a half-synchronous parallel alphabetised operator. AsynchronousReaders and Writers August 23, 2016 4 / 22
➓ ➓ ➓ Introduction Advantages of the half-synchronous operator ó with half- synchronous actions containing ¡ or ¿ : AsynchronousReaders and Writers August 23, 2016 5 / 22
➓ ➓ Introduction Advantages of the half-synchronous operator ó with half- synchronous actions containing ¡ or ¿ : ➓ it eases the complexity of the design eliminating arguably complex process specifications: AsynchronousReaders and Writers August 23, 2016 5 / 22
➓ ➓ Introduction Advantages of the half-synchronous operator ó with half- synchronous actions containing ¡ or ¿ : ➓ it eases the complexity of the design eliminating arguably complex process specifications: - it is not necessary to use a buffer process in the model to achieve asynchronous writing and reading, AsynchronousReaders and Writers August 23, 2016 5 / 22
➓ ➓ Introduction Advantages of the half-synchronous operator ó with half- synchronous actions containing ¡ or ¿ : ➓ it eases the complexity of the design eliminating arguably complex process specifications: - it is not necessary to use a buffer process in the model to achieve asynchronous writing and reading, - the writes ( ¡ ) and reads ( ¿ ) are asynchronous, which makes it possible to have an order of writes and reads that, if synchronous ( ! , ? ), would lead to a deadlock, AsynchronousReaders and Writers August 23, 2016 5 / 22
➓ Introduction Advantages of the half-synchronous operator ó with half- synchronous actions containing ¡ or ¿ : ➓ it eases the complexity of the design eliminating arguably complex process specifications: - it is not necessary to use a buffer process in the model to achieve asynchronous writing and reading, - the writes ( ¡ ) and reads ( ¿ ) are asynchronous, which makes it possible to have an order of writes and reads that, if synchronous ( ! , ? ), would lead to a deadlock, ➓ by reducing the number of actions involved in this asynchronous writing and reading of the processes, improves the performance of the periodic hard real-time application, AsynchronousReaders and Writers August 23, 2016 5 / 22
Introduction Advantages of the half-synchronous operator ó with half- synchronous actions containing ¡ or ¿ : ➓ it eases the complexity of the design eliminating arguably complex process specifications: - it is not necessary to use a buffer process in the model to achieve asynchronous writing and reading, - the writes ( ¡ ) and reads ( ¿ ) are asynchronous, which makes it possible to have an order of writes and reads that, if synchronous ( ! , ? ), would lead to a deadlock, ➓ by reducing the number of actions involved in this asynchronous writing and reading of the processes, improves the performance of the periodic hard real-time application, ➓ in a distributed computing system, for example a processor-coprocessor combination, the waiting time of the processor-coprocessor can be reduced. AsynchronousReaders and Writers August 23, 2016 5 / 22
Overview Introduction of the ó together with the ¡ and ¿ ! and ? versus ¡ and ¿ ✌ ¡ and ¿ using ♥ Design Level Semantics of ó , ¡ and ¿ Example Application The Future AsynchronousReaders and Writers August 23, 2016 6 / 22
✏ Ñ Ñ Ñ Ñ ✏ Ñ Ñ Ñ Ñ ✏ ó Ñ Ñ Ñ Ñ Ñ Ñ Ñ Ñ ! and ? versus ¡ and ¿ Listing 1: Deadlock due to synchronous writing and reading A ✏ c ! x 1 Ñ c ! y 1 Ñ d ? x 2 Ñ d ? y 2 Ñ SKIP B ✏ c ? x 1 Ñ d ! x 2 Ñ c ? y 1 Ñ d ! y 2 Ñ SKIP AB ✏ A ⑤⑤ B AsynchronousReaders and Writers August 23, 2016 7 / 22
✏ Ñ Ñ Ñ Ñ ✏ Ñ Ñ Ñ Ñ ✏ ó Ñ Ñ Ñ Ñ Ñ Ñ Ñ Ñ ! and ? versus ¡ and ¿ Listing 1: Deadlock due to synchronous writing and reading A ✏ c ! x 1 Ñ c ! y 1 Ñ d ? x 2 Ñ d ? y 2 Ñ SKIP B ✏ c ? x 1 Ñ d ! x 2 Ñ c ? y 1 Ñ d ! y 2 Ñ SKIP AB ✏ A ⑤⑤ B trace: c . x 1 AsynchronousReaders and Writers August 23, 2016 7 / 22
Ñ Ñ Ñ Ñ Ñ Ñ Ñ Ñ ! and ? versus ¡ and ¿ Listing 1: Deadlock due to synchronous writing and reading A ✏ c ! x 1 Ñ c ! y 1 Ñ d ? x 2 Ñ d ? y 2 Ñ SKIP B ✏ c ? x 1 Ñ d ! x 2 Ñ c ? y 1 Ñ d ! y 2 Ñ SKIP AB ✏ A ⑤⑤ B trace: c . x 1 Listing 2: No deadlock due to asynchronous writing and reading A ✏ c ¡ x 1 Ñ c ¡ y 1 Ñ d ¿ x 2 Ñ d ¿ y 2 Ñ SKIP B ✏ c ¿ x 1 Ñ d ¡ x 2 Ñ c ¿ y 1 Ñ d ¡ y 2 Ñ SKIP AB ✏ A ó B AsynchronousReaders and Writers August 23, 2016 7 / 22
! and ? versus ¡ and ¿ Listing 1: Deadlock due to synchronous writing and reading A ✏ c ! x 1 Ñ c ! y 1 Ñ d ? x 2 Ñ d ? y 2 Ñ SKIP B ✏ c ? x 1 Ñ d ! x 2 Ñ c ? y 1 Ñ d ! y 2 Ñ SKIP AB ✏ A ⑤⑤ B trace: c . x 1 Listing 2: No deadlock due to asynchronous writing and reading A ✏ c ¡ x 1 Ñ c ¡ y 1 Ñ d ¿ x 2 Ñ d ¿ y 2 Ñ SKIP B ✏ c ¿ x 1 Ñ d ¡ x 2 Ñ c ¿ y 1 Ñ d ¡ y 2 Ñ SKIP AB ✏ A ó B many possible traces, for example: c ¡ x 1 Ñ c ¡ y 1 Ñ c ¿ x 1 Ñ d ¡ x 2 Ñ c ¿ y 1 Ñ d ¡ y 2 Ñ d ¿ x 2 Ñ d ¿ y 2 Ñ SKIP AsynchronousReaders and Writers August 23, 2016 7 / 22
Overview Introduction of the ó together with the ¡ and ¿ ! and ? versus ¡ and ¿ ✌ ¡ and ¿ using ♥ Design Level Semantics of ó , ¡ and ¿ Example Application The Future AsynchronousReaders and Writers August 23, 2016 8 / 22
✌ ¡ and ¿ using ♥ G 1 c ¡ x 1 c ¡ y 1 d ¿ x 2 d ¿ y 2 G 2 c ¡ y 1 c ¡ x 1 c ¿ x 1 c ¿ x 1 c ¿ x 1 c ¡ y 1 d ¡ x 2 d ¡ x 2 d ¡ x 2 c ¡ y 1 d ¿ x 2 c ¿ y 1 c ¿ y 1 c ¿ y 1 d ¿ x 2 ✌ G 1 ♥ G 2 d ¡ y 2 d ¡ y 2 d ¡ y 2 d ¿ x 2 d ¿ y 2 AsynchronousReaders and Writers August 23, 2016 9 / 22
Overview Introduction of the ó together with the ¡ and ¿ ! and ? versus ¡ and ¿ ✌ ¡ and ¿ using ♥ Design Level Semantics of ó , ¡ and ¿ Example Application The Future AsynchronousReaders and Writers August 23, 2016 10 / 22
Ñ Ñ Ñ Ñ ⑤⑤ ⑤⑤ Ñ Ñ ó Design Level Separation of write/read actions in time AsynchronousReaders and Writers August 23, 2016 11 / 22
Ñ Ñ Ñ Ñ ⑤⑤ ⑤⑤ Ñ Ñ ó Design Level Separation of write/read actions in time Needs a Buffer AsynchronousReaders and Writers August 23, 2016 11 / 22
Ñ Ñ ó Design Level Separation of write/read actions in time Needs a Buffer A = write . x Ñ SKIP B = read . x Ñ SKIP Buffer = write . x Ñ read . x Ñ SKIP AB = A ⑤⑤ B ⑤⑤ Buffer AsynchronousReaders and Writers August 23, 2016 11 / 22
Design Level Separation of write/read actions in time Needs a Buffer A = write . x Ñ SKIP B = read . x Ñ SKIP Buffer = write . x Ñ read . x Ñ SKIP AB = A ⑤⑤ B ⑤⑤ Buffer A = c ¡ x Ñ SKIP B = c ¿ x Ñ SKIP = A ó B AB AsynchronousReaders and Writers August 23, 2016 11 / 22
Overview Introduction of the ó together with the ¡ and ¿ ! and ? versus ¡ and ¿ ✌ ¡ and ¿ using ♥ Design Level Semantics of ó , ¡ and ¿ Example Application The Future AsynchronousReaders and Writers August 23, 2016 12 / 22
Recommend
More recommend