1. A method for managing a processor of a computer system, comprising: obtaining an online request of a processor, the online request requesting an online status of the processor; collecting lock contention information of the computer system if a lock contention status flag of the computer system indicates a non-lock thrashing status; determining whether the computer system is in a lock thrashing status according to the lock contention information; and accepting the online request of the processor and the processor is in an available status in the computer system when it is determined that the computer system is in the non-lock thrashing status.