A multithreaded processor for executing multiple instruction streams, each of said multiple instruction streams may contain a special instruction to change a priority level of the corresponding instruction stream, the multithreaded processor provided with a plurality of functional units for executing instructions, a plurality of instruction decode means for respectively decoding an instruction fetched from an instruction cache means and outputting an instruction issue request to a designated functional unit, and the same number of register sets as the instruction decode means, which executes the same number of instruction streams as the instruction decode means simultaneously and independently of each other, the multithreaded processor comprising:
- holding means for holding the priority levels of each instruction stream that can be set by an instruction in each instruction stream, wherein the priority level of each instruction stream is independent of the priority levels of the other instruction streams;
- and
- control means for arbitrating between two or more instruction streams sharing the same resource, in accordance with the priority levels,
- the shared resource being one functional unit for which instruction issue request from two or more instruction decode means compete, one instruction cache for which fetch request from two or more instruction decode means compete, or one register set for which access request from two or more functional units competes;
- wherein one of the functional units receives the special instruction from one of the instruction streams for individually and independently changing the priority level of the corresponding instruction stream designated by the priority designation means.