Last change
on this file since 276 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
File size:
1.3 KB
|
Line | |
---|
1 | # Rick van der Zwet
|
---|
2 | # 0433373
|
---|
3 | # OS Assigment 4
|
---|
4 | # Licence: BSD
|
---|
5 | # $Id: README.txt 540 2008-04-01 20:51:39Z rick $
|
---|
6 |
|
---|
7 |
|
---|
8 | = Intro =
|
---|
9 | File compiled on mac os x, gcc 4.0.1, and linux gcc 4.1.2.
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 | = Files =
|
---|
14 | Makefile = Makefile to generate executables of C code
|
---|
15 | assignment4a.c = Source code part A
|
---|
16 | assignment4b.c = Source code part B
|
---|
17 | assignment4c.c = Source code part C
|
---|
18 | README.txt = Currently reading
|
---|
19 |
|
---|
20 | = Part A =
|
---|
21 |
|
---|
22 | It measurement times varies between 1 clocktick and 20000. It kind of
|
---|
23 | depends on the OS when it swiches to a different thread and at which
|
---|
24 | point.
|
---|
25 |
|
---|
26 | = Part B =
|
---|
27 | No need for mutexes as processes will only write one variables and read
|
---|
28 | the other ones. No variable is needed to be written by 2 threads. So
|
---|
29 | simple checking when something is changed is suffient
|
---|
30 |
|
---|
31 | = Part C =
|
---|
32 | Peterson's algoritm is very well documented at
|
---|
33 | http://en.wikipedia.org/wiki/Peterson's_algorithm which include a rather
|
---|
34 | advanced example of locking and editing. In our consumer/producer world
|
---|
35 | are things way more easy. So locking/unlocking is relatively simple
|
---|
36 | done, due the fact we are context switching between one consumer and
|
---|
37 | one producer. There are no multiples.
|
---|
38 |
|
---|
39 | = Part D =
|
---|
40 | Think of specilized threads inside a program waiting to do a difficult
|
---|
41 | computation. The UI detects difficult program, passes the formula into
|
---|
42 | 'worker' thread and get the result when done.
|
---|
43 |
|
---|
44 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.