Automatic Resolution of Deadlocks in Concurrent Programs

Detalhes bibliográficos
Autor(a) principal: Almeida, Afonso José Figueiras Ribeiro Simões de
Data de Publicação: 2022
Tipo de documento: Dissertação
Idioma: eng
Título da fonte: Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
Texto Completo: http://hdl.handle.net/10362/138810
Resumo: It is no longer possible to improve CPU performance by increasing clock speeds and cache sizes, at the rate it once was, due to heat generation becoming too high. Thus, CPU manufacturers resorted to improving performance through others means such as hyper- threading and multi-core architectures. The use of concurrent programming has been on a steady rise to make full use of modern hardware. However, concurrent program- ming is considerably harder to grasp than its sequential counterpart. Humans naturally think sequentially, which makes this method of programming notoriously difficult. At a sufficiently large scale, it is hard to reason about interaction between processes, often leading to the introduction of errors that are hard to detect. This results in programs being unknowingly unsafe. A particular case of concurrency errors are deadlocks, which occur when a program reaches a state where two or more threads prevent each other from accessing a shared resource, effectively blocking the program permanently. Deadlocks are hard to debug because their cause may not be easily identified, and because it is difficult to reliably reproduce them, due to the wide range of execution possibilities. Despite being difficult to develop and debug concurrent programs, there is a lack of tools and mechanisms to help the user detect and fix deadlocks. Go, a programming language that employs a message passing concurrency model, in addition to a shared memory model, can detect, at runtime, cases where all the threads are blocked. However, it does not auto- matically fix the error or provide a suggestion of a solution. To the best of our knowledge, there are no automatic deadlock resolution tools for Go, despite there being multiple deadlock detection tools. As such, to bridge this gap, this work proposes a proof of con- cept tool that statically detects deadlocks in Go and automatically fixes some of them. It uses another existing tool to extract the communication protocol of a Go program, which is then translated to CCS processes and solved. To do this, existing deadlock detection and resolution algorithms were extended and implemented.
id RCAP_05f7b9d1e9f10f4cf9aaf282e6e3b981
oai_identifier_str oai:run.unl.pt:10362/138810
network_acronym_str RCAP
network_name_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository_id_str 7160
spelling Automatic Resolution of Deadlocks in Concurrent ProgramsDeadlock detectionDeadlock resolutionStatic analysisDomínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e InformáticaIt is no longer possible to improve CPU performance by increasing clock speeds and cache sizes, at the rate it once was, due to heat generation becoming too high. Thus, CPU manufacturers resorted to improving performance through others means such as hyper- threading and multi-core architectures. The use of concurrent programming has been on a steady rise to make full use of modern hardware. However, concurrent program- ming is considerably harder to grasp than its sequential counterpart. Humans naturally think sequentially, which makes this method of programming notoriously difficult. At a sufficiently large scale, it is hard to reason about interaction between processes, often leading to the introduction of errors that are hard to detect. This results in programs being unknowingly unsafe. A particular case of concurrency errors are deadlocks, which occur when a program reaches a state where two or more threads prevent each other from accessing a shared resource, effectively blocking the program permanently. Deadlocks are hard to debug because their cause may not be easily identified, and because it is difficult to reliably reproduce them, due to the wide range of execution possibilities. Despite being difficult to develop and debug concurrent programs, there is a lack of tools and mechanisms to help the user detect and fix deadlocks. Go, a programming language that employs a message passing concurrency model, in addition to a shared memory model, can detect, at runtime, cases where all the threads are blocked. However, it does not auto- matically fix the error or provide a suggestion of a solution. To the best of our knowledge, there are no automatic deadlock resolution tools for Go, despite there being multiple deadlock detection tools. As such, to bridge this gap, this work proposes a proof of con- cept tool that statically detects deadlocks in Go and automatically fixes some of them. It uses another existing tool to extract the communication protocol of a Go program, which is then translated to CCS processes and solved. To do this, existing deadlock detection and resolution algorithms were extended and implemented.Já não é possível melhorar o desempenho de CPU através do aumento de velocidades de clock e tamanho de caches ao ritmo que anteriormente era possível, devido à geração de calor se tornar demasiado elevada. Assim, os fabricantes de CPU recorreram à melho- ria de desempenho por outros meios, como hyperthreading e arquiteturas multi-core. O uso de programação concorrente tem sido preeminente para aproveitar ao máximo o hard- ware moderno. No entanto, programação concorrente é consideravelmente mais difícil de compreender do que o homólogo sequencial. Os humanos pensam sequencialmente por natureza, o que torna este método de programação especialmente difícil. Numa es- cala suficientemente grande, é difícil perceber a interação entre processos, o que leva a que erros difíceis de detetar sejam introduzidos. Isto resulta em programas inadvertida- mente inseguros. Um caso particular de erros de concorrência são bloqueios, que ocorrem quando um programa chega a um estado em que dois ou mais threads não permitem que os outros acedam a um recurso partilhado, efetivamente bloqueando o programa permanentemente. Bloqueios são difíceis de depurar por a sua causa não ser facilmente identificável, e porque é difícil de os reproduzir consistentemente, devido à variedade de caminhos de execução. Apesar de ser difícil de programar e depurar programas con- correntes, há uma falta de ferramentas e mecanismos que ajudem o utilizador a detetar e resolver bloqueios. Go, uma linguagem de programação que emprega um modelo de concorrência de passagem de mensagens, para além de um modelo de memória parti- lhada, consegue detetar situações em que todas as threads estão bloqueadas, em tempo de execução. No entanto, não consegue automaticamente resolver o erro ou sugerir uma solução. Tanto quanto sabemos, não existe nenhuma ferramenta de resolução automática de bloqueios para Go, apesar de haver várias ferramentas de deteção de bloqueios. Para endereçar esta situação, este trabalho propõe uma ferramenta que deteta bloqueios em Go e automaticamente resolve alguns. Esta usa outra ferramenta para extrair o protocolo de comunicação de um programa Go, que é traduzido para processos CCS e resolvido. Para isso, algoritmos de deteção e resolução de bloqueios existentes foram modificados.Ravara, AntónioRUNAlmeida, Afonso José Figueiras Ribeiro Simões de2022-05-27T16:56:00Z2022-022022-02-01T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10362/138810enginfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2024-03-11T05:16:12Zoai:run.unl.pt:10362/138810Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-20T03:49:14.159554Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse
dc.title.none.fl_str_mv Automatic Resolution of Deadlocks in Concurrent Programs
title Automatic Resolution of Deadlocks in Concurrent Programs
spellingShingle Automatic Resolution of Deadlocks in Concurrent Programs
Almeida, Afonso José Figueiras Ribeiro Simões de
Deadlock detection
Deadlock resolution
Static analysis
Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática
title_short Automatic Resolution of Deadlocks in Concurrent Programs
title_full Automatic Resolution of Deadlocks in Concurrent Programs
title_fullStr Automatic Resolution of Deadlocks in Concurrent Programs
title_full_unstemmed Automatic Resolution of Deadlocks in Concurrent Programs
title_sort Automatic Resolution of Deadlocks in Concurrent Programs
author Almeida, Afonso José Figueiras Ribeiro Simões de
author_facet Almeida, Afonso José Figueiras Ribeiro Simões de
author_role author
dc.contributor.none.fl_str_mv Ravara, António
RUN
dc.contributor.author.fl_str_mv Almeida, Afonso José Figueiras Ribeiro Simões de
dc.subject.por.fl_str_mv Deadlock detection
Deadlock resolution
Static analysis
Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática
topic Deadlock detection
Deadlock resolution
Static analysis
Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática
description It is no longer possible to improve CPU performance by increasing clock speeds and cache sizes, at the rate it once was, due to heat generation becoming too high. Thus, CPU manufacturers resorted to improving performance through others means such as hyper- threading and multi-core architectures. The use of concurrent programming has been on a steady rise to make full use of modern hardware. However, concurrent program- ming is considerably harder to grasp than its sequential counterpart. Humans naturally think sequentially, which makes this method of programming notoriously difficult. At a sufficiently large scale, it is hard to reason about interaction between processes, often leading to the introduction of errors that are hard to detect. This results in programs being unknowingly unsafe. A particular case of concurrency errors are deadlocks, which occur when a program reaches a state where two or more threads prevent each other from accessing a shared resource, effectively blocking the program permanently. Deadlocks are hard to debug because their cause may not be easily identified, and because it is difficult to reliably reproduce them, due to the wide range of execution possibilities. Despite being difficult to develop and debug concurrent programs, there is a lack of tools and mechanisms to help the user detect and fix deadlocks. Go, a programming language that employs a message passing concurrency model, in addition to a shared memory model, can detect, at runtime, cases where all the threads are blocked. However, it does not auto- matically fix the error or provide a suggestion of a solution. To the best of our knowledge, there are no automatic deadlock resolution tools for Go, despite there being multiple deadlock detection tools. As such, to bridge this gap, this work proposes a proof of con- cept tool that statically detects deadlocks in Go and automatically fixes some of them. It uses another existing tool to extract the communication protocol of a Go program, which is then translated to CCS processes and solved. To do this, existing deadlock detection and resolution algorithms were extended and implemented.
publishDate 2022
dc.date.none.fl_str_mv 2022-05-27T16:56:00Z
2022-02
2022-02-01T00:00:00Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv http://hdl.handle.net/10362/138810
url http://hdl.handle.net/10362/138810
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.source.none.fl_str_mv reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron:RCAAP
instname_str Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron_str RCAAP
institution RCAAP
reponame_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
collection Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository.name.fl_str_mv Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
repository.mail.fl_str_mv
_version_ 1799138091565318144