1 / 13

Communicating Sequential Processes (CSP)

Communicating Sequential Processes (CSP). MO409 – Eng. de Software Profa. Eliane Martins Fernando J. C. de Lima F o - RA014861 Rodrigo Teruo Tomita – RA992432. CSP. Proposto em 1978 por Hoare Processos seqüenciais que “rodam” em paralelo e se comunicam entre si

kamil
Télécharger la présentation

Communicating Sequential Processes (CSP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Communicating Sequential Processes (CSP) MO409 – Eng. de Software Profa. Eliane Martins Fernando J. C. de Lima Fo - RA014861 Rodrigo Teruo Tomita – RA992432

  2. CSP • Proposto em 1978 por Hoare • Processos seqüenciais que “rodam” em paralelo e se comunicam entre si • Uso: protocolos, sistemas distribuídos, etc (diversas variantes) • Operações básicas: comandos repetitivo, alternativo e seqüencial – I/O

  3. CSP - Propostas • Comandos com guarda (Dijkstra) • [ x  y  m:=x []x  y  m:=y ] • *[ i < maxsize  i := i + 1 [] i > maxsize  i := i - 1] • Comando paralelo • [label1::ROTINA1 || label2::ROTINA2] • Processos iniciam ao mesmo tempo; comando termina quando o último termina

  4. CSP – Propostas (2) • I/O: comunicação entre processos • Input: A:: B?variável • Output: B:: A!variável • Recíproco: A nomeia B para input, B nomeia A para output • Input em guardas (alternância e repetição)

  5. Ferramentas • FDR (Failures-Divergence Refinement) • ProBE (Process Behavior Explorer) • JCSP: CSP for Java (University of Kent at Canterbury) • CCSP: ambiente de execução (University of Missouri – Rolla) • Deadlock Checker

  6. Estudo de Caso - Elevador • Controle Elevador • Mantém tabela com os andares a serem visitados • Informa paradas e sentidos aos elevadores • Sabe os andares mais altos e mais baixos a visitar • Painel Elevador • Lê o número apertado dentro do elevador • Informa o número ao controle elevador • Porta • Abrir e Fechar

  7. Estudo de Caso – Elevador (2) • Elevador • Mantém a sua direção (sobe, desce) • Pergunta ao controle se deve parar e abrir as portas a cada andar • Pergunta ao controle se não há mais chamadas (inverte seu sentido ou pára no 1o. andar) • Painel Andar • Subir e Descer • Avisa o controle elevador que o andar já foi servido

  8. Considerações Finais • Problema do elevador se mostrou mais complexo do que o previsto (casos excepcionais) • CSP é antigo e utilizado, tendo diversas variações e ferramentas • Notação (Dijkstra) é familiar, mas bastante limitada (variantes surgiram para complementar essas limitações) • Dificuldade com as ferramentas

  9. Perguntas? ? Obrigado! fernando@ic.unicamp.br rodrigo.tomita@ic.unicamp.br

  10. Referências • Hoare, C. A. R. – “Communicating Sequential Processes”, Communications of the ACM, vol. 21, num. 8, (666-677), agosto 1978 • Kieburtz, Richard B. & Silberschatz, Abraham – “Comments on ‘Communicating Sequential Processes’”, ACM Transactions on Programming Languages and Systems, vol. 1, num. 2 (218-225), outubro 1979 • Gries, David – The Science of Programming, Spring Verlag, 1981

  11. Referências (2) • The CSP archive – Oxford http://www.afm.sbu.ac.uk/csp/ • Formal Systems - Europe (FDR, ProBE, CSP Typechecker) http://www.fsel.com/ • Tools for CSP – Oxford http://web.comlab.ox.ac.uk/oucl/publications/books/concurrency/tools/ • JCSP – University of Kent at Canterbury - http://www.cs.ukc.ac.uk/projects/ofa/jcsp/

  12. Variantes do CSP • TCSP - Steve Schneider, University of London • Introduced a treatment of time into CSP. Steve has recently completed a book on timed and untimed CSP. • CSPP - A. Lawrence, Oxford University • Introduced priority into CSP, which is useful when describing resource-limited systems

  13. Variantes do CSP (2) • HCSP - A. Lawrence, Oxford University • Extends the priority model in CSPP and includes new synchronisation primitives and a modelling of state. It is useful when describing hardware systems where state & clocks etc. are unavoidable. • PCSP - Probabilistic CSP

More Related