1. A method of operating a disk drive having a first processor and a second processor, the method comprising: performing servo-related tasks at the first processor; receiving a signal indicative of an environmental condition at the first processor; identifying code associated with the environmental condition based at least in part on the signal; causing the second processor to execute the code associated with the environmental condition; and performing a responsive task at the first processor based at least in part on the executed code associated with the environmental condition.