1. A method, comprising: running multiple processing tasks on multiple physical processing cores in a processor that support general-purpose registers and special-purpose registers; estimating respective usage levels with which the multiple processing tasks use the special-purpose registers; in response to the estimating the respective usage levels, assigning the multiple processing tasks respective scores that are indicative of the respective usage levels of the special-purpose registers by the multiple processing tasks; in response to the assigning the multiple processing tasks the respective scores, aggregating the respective scores of the multiple processing tasks on the multiple physical processing cores to obtain sums of the respective scores of the multiple processing tasks on the multiple physical processing cores; and assigning the multiple physical processing cores to the multiple processing tasks based on the estimated usage levels of the special-purpose registers using a scheduling criterion minimizing the sums of the respective scores of the multiple processing tasks on the multiple physical processing cores to reduce a rate of context-switching between the multiple processing tasks that use the special-purpose registers.