In a multitasking computer system, data is preloaded into cache memory
upon the occurrence of a context switch. To this end, processing
circuitry stops executing a computer program during a first context
switch in response to a first context switch command. Later, the
processing circuitry resumes executing the computer program during a
second context switch in response to a second context switch command. The
memory control circuitry, in response to the second context switch
command, identifies an address of computer memory that is storing a data
value previously used to execute an instruction of the computer program
prior to the first context switch. The memory control circuitry then
retrieves the data value from the computer memory and stores the
retrieved data value in the cache memory. Accordingly, the retrieved data
value is available to the processing circuitry for use in executing
instructions of the computer program after the second context switch
without the processing circuitry having to request retrieval of the
foregoing data value.