Concurrent prototype » History » Version 3
Greg Burri, 07/07/2009 10:52 PM
1 | 1 | Greg Burri | h1. Concurrent prototype |
---|---|---|---|
2 | |||
3 | h2. Goals |
||
4 | |||
5 | * Define a strategy to read and to write the same file from different threads. |
||
6 | 2 | Greg Burri | * Test by creating many thread which will write and read in the same time the same file. |
7 | 1 | Greg Burri | |
8 | h2. Description |
||
9 | |||
10 | When a download starts the corresponding file with the final size is created. The file will be filled from different thread during the downloading. Each thread take a part of the file. |
||
11 | 3 | Greg Burri | |
12 | h2. Solution |
||
13 | |||
14 | Two descriptor are opened per file. One for write operations and an another for those of writing. Each descriptor is kept by a mutex. There can't be two read or two write in the same time but there can have a read and a write simultaneous. I think there is no gain to read simultaneous from different threads. |