Project

General

Profile

Actions

Concurrent prototype

Goals

  • Define a strategy to read and to write the same file from different threads.
  • Test by creating many thread which will write and read in the same time the same file.

Description

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.

Solution

Two descriptor are opened per file. One for write operations and an another for those of reading. 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.

Updated by Greg Burri almost 11 years ago · 4 revisions