cp-tests's People
cp-tests's Issues
Resposta ao teste 1 2013
cp-tests/t1-13-14/question-1.tex
Line 22 in b55ca85
Não compreendo como poderá ser possível este x = 4.
Bom trabalho e obrigado pela partilha destes docs para o teste.
6 15-16
Line 75 in 541e303
If only two threads deadlock or livelock, shouldn't a third, doing a completely different computation, be able to progress?
If all threads do a simultaneous compare&swap, it will fail for all, I think. That's why you need to add backoffs.
Also, what is busy-waiting?
Thanks again for taking the time to help everyone out.
Missing atomic
Line 45 in 541e303
This solution does not have into account "y=3" is atomic.
So it needs to be completely remade.
T1 | T2 | T3 | T1 | T2 | T3 | T1 | T2 | T3 | T1 | T2 | T3 | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
read x=0 | read x=0 | read x=0 | read x=0 | |||||||||||
read y=0 | read y=0 | write y=3 | write y=3 | |||||||||||
write y=1 | write y=1 | read y=3 | read y=3 | |||||||||||
write y=3 | write y=3 | write y=4 | write y=4 | |||||||||||
read y=3 | write x=1 | read y=4 | read y=4 | |||||||||||
write x=4 | read y=3 | write x=5 | write x=1 | |||||||||||
write x=1 | write x=4 | write x=1 | write x=2 |
T1 | T2 | T3 | T1 | T2 | T3 | T1 | T2 | T3 | T1 | T2 | T3 | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
read y=0 | write y=3 | |||||||||||||
write y=1 | read y=3 | |||||||||||||
write y=3 | write y=4 | |||||||||||||
read y=3 | read y=4 | |||||||||||||
write x=4 | write x=5 | |||||||||||||
read x=4 | read x=5 | |||||||||||||
write x=5 | write x=6 |
X = 1,2,4,5,6
Y = 3,4
(X,Y) = (1,3), (1,4), (2,4), (4,3), (6,4), (5,3)
Missing marks
Sample test question 26
Line 65 in 541e303
Don't we need to prove there is a common correlation for a high-level data race to exist? How do we go about doing this?
Deadlock
cp-tests/t1-13-14/question-8.tex
Line 10 in b55ca85
Acho que pode dar um deadlock quando fazes:
transferTo(acc[2], acc[1]);
acc[0].credit(interest(0.01);
No transferTo, vais tentar ter o lock da acc[1] que já tá bloqueada, e no interest vais tentar ter o lock acc[2] que já está bloqueado.
Teria de ser a ordem:
interest lock acc[1] -> transfer2 lock acc[2] -> Deadlock?
cumps
Compreendo
cp-tests/t1-13-14/question-4.tex
Line 10 in b55ca85
Apesar de um pouco semelhantes, julgo que esta será a E.
Question 11
Line 29 in bef0892
It's B. RAR's do not.
Question 27
Valor errado?
Line 40 in 541e303
Aqui só consegui obter: 3, 5, 6. Não consigo obter o 4.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.