In multiprocessor systems, a task is divided among the different cores of the CPU. These tasks might get switched between the core as per the OSes working process, causing some overhead that affects the SQL process. A SQL DBA can use affinity masks to designate cores to perform only SQL tasks. There is also the lock pages in memory option where the SQL process is locked into memory. This prevents paging out of SQL tasks and gives SQL more preference when it comes to disk paging. Affinity masks on the other had designate CPU cores to perform SQL tasks, and prevents swapping of these SQL tasks between the cores.