source: liacs/os/assignment4/README@ 276

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 =
9File compiled on mac os x, gcc 4.0.1, and linux gcc 4.1.2.
10
11
12
13= Files =
14Makefile = Makefile to generate executables of C code
15assignment4a.c = Source code part A
16assignment4b.c = Source code part B
17assignment4c.c = Source code part C
18README.txt = Currently reading
19
20= Part A =
21
22It measurement times varies between 1 clocktick and 20000. It kind of
23depends on the OS when it swiches to a different thread and at which
24point.
25
26= Part B =
27No need for mutexes as processes will only write one variables and read
28the other ones. No variable is needed to be written by 2 threads. So
29simple checking when something is changed is suffient
30
31= Part C =
32Peterson's algoritm is very well documented at
33http://en.wikipedia.org/wiki/Peterson's_algorithm which include a rather
34advanced example of locking and editing. In our consumer/producer world
35are things way more easy. So locking/unlocking is relatively simple
36done, due the fact we are context switching between one consumer and
37one producer. There are no multiples.
38
39= Part D =
40Think of specilized threads inside a program waiting to do a difficult
41computation. 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.