a system includes a processor coupled to a memory through a memory controller . the memory controller includes first and second queues . the memory controller receives memory requests from the processor , assigns a priority to each request , stores each request in the first queue , and schedules processing of the requests based on their priorities . the memory controller changes the priority of a request in the first queue in response to a trigger , sends a next scheduled request from the first queue to the second queue in response to detecting the next scheduled request has the highest priority of any request in the first queue , and sends requests from the second queue to the memory . the memory controller changes the priority of different types of requests in response to different types of triggers . the memory controller maintains a copy of each request sent to the second queue in the first queue .