1. A context switching device which is used in a parallel processing system having: N processors which execute multiple programs while switching the programs to be executed; and a shared memory which has M, where M<N, access ports and holds context data which are used by the processors to execute the programs and obtained from the processors; and said context switching device which switches the context data, when these context data are transferred at the same time between the shared memory and each of the processors, said context switching device comprising: a transfer unit operable to transfer context data, according to one of (i) a first transfer mode in which the contexts data is transferred continuously through cycles by a processor, and (ii) a second transfer mode in which plural pieces of the context data are transferred alternately per cycle by switching respective processors of the context data; and a control unit operable to (i) decide the processor to be used in the first transfer mode and the processors to be used in the second transfer mode, and (ii) control said transfer unit based on the decision, when there is a conflict in requests of the processors for switching context data, the number of processors being more than M.