1. An apparatus for managing access of RAS (Row Address Strobe) memory pages by looking ahead to a next task representing a next device requesting access to memory in determining whether to open or close a RAS memory page after an initial access, comprising: a two-stage memory pipeline, wherein a first stage comprises a priority encoding and decoding sub-stage and an arbitration sub-stage, and wherein a second stage comprises a memory controller which controls memory functions and timing.