: I want to use multi-thread,but I have some questions.
: 1. If read one large file(500G) with multi-thread,can it accelerate
: the speed?
Assuming that you are working with a multi-core CPU and lock the critical location of what is being read, but if you are reading one file in a concurrent manner are you really able to process the file? Unless the file is created to have X size bytes read concurrently and processed reading a single file on multiple threads might be pointless.
: 2.If read many files and each thread read one,can it accelerate the
Yes, reading one file per thread could speed up the processing of the files. Given either a single-core or multi-core threading system.
: 3.If the multi-thread program would accelerate the speed,Must it run
: on multi-CPU? what about on multi-kernel?
Multi-threading on a single core uses the concept of time-slicing to fake multiple-threads, so it can potentially speed up the program depends on what's going on.
Multi-kernal - I don't know how to answer that question.