Abstract
BitTorrent is a popular file distribution system based on emerging peer-to-peer communication model. Files are partitioned into pieces and can be downloaded from multiple peers in parallel in order to shorten the downloading process. However, due to dynamics of peer joining and leaving, the last block problem may occur when some rare pieces cannot be found among existing peers. BitTorrent employs a rarest-first piece selection algorithm for alleviating the last block problem, but its efficiency is limited due to a local view of peers. In this thesis, we proposed an interest-intended piece selection (IIPS) algorithm to select pieces that, if downloaded, would increase the availability of those pieces in the system while also increase the probability that the downloading peer to be selected for cooperation by its neighboring peers. This is done by a lightly-weighted vector exchanging process which enlarges the scope of piece rareness. Simulation results show that the proposed scheme effectively prevents the last block problem and outperforms the rarest-first algorithm in terms of system robustness, average file download time and the occurrences of the last block problem.