Abstract:FAP(file allocation problem) is a very important problem in computer network and distributed system. This paper presented a new method to solve FAP based on genetic algorithms. The method can well solve optimal file allocation problem in engineering. The method can be also applied in other situations besides the FAP, in those situations resources need to be allocated.