Index of /perry/os/ostep/homework/threads-bugs

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]Makefile2021-03-01 13:09 800  
[TXT]README.html2021-05-31 14:59 7.1K 
[TXT]README.md2021-03-01 13:09 3.3K 
[TXT]common.h2021-03-01 13:09 341  
[TXT]common_threads.h2021-03-01 13:09 1.9K 
[TXT]main-common.c2021-03-01 13:09 2.9K 
[TXT]main-header.h2021-03-01 13:09 233  
[TXT]vector-avoid-hold-and-wait.c2021-03-01 13:09 770  
[TXT]vector-deadlock.c2021-03-01 13:09 548  
[TXT]vector-global-order.c2021-03-01 13:09 790  
[TXT]vector-header.h2021-03-01 13:09 210  
[TXT]vector-nolock.c2021-03-01 13:09 643  
[TXT]vector-try-wait.c2021-03-01 13:09 718  

ostep-homework/threads-bugs

Overview

This homework lets you play around with a number of ways to implement
a small, deadlock-free vector object in C. The vector object is quite
limited (e.g., it only has add() and init() functions) but is just
used to illustrate different approaches to avoiding deadlock.

Some files that you should pay attention to are as follows. They, in
particular, are used by all the variants in this homework.

The variants of this homework are found in the following files. Each takes a
different approach to dealing with concurrency inside a "vector addition"
routine called vector_add(); examine the code in these files to get a sense of
what is going on. They all use the files above to make a complete runnable
program.

The relevant files:

Type make (and read the Makefile) to build each of five executables.

prompt> make

Then you can run a program by simply typing its name:

prompt> ./vector-deadlock

Each program takes the same set of arguments (see main-common.c for details):