A data processing apparatus includes at least one processing unit, a main storage unit, a main storage control unit, a key storage unit and a key storage control unit. The main storage unit is divided into blocks and the key storage unit stores main storage protection keys, each of which corresponds to one of the blocks of the main storage unit. Key storage access requests are received from a processing unit or the main storage control unit by the key storage control unit whenever data is to be read from or written to a block of main storage. The key storage control unit registers the key storage access requests in a key queue, prevents duplicate access requests from being registered, and processes the queued key storage access requests. The processing of key storage access requests includes updating the contents of the key storage unit to maintain a record of accesses to the main storage unit and controlling accesses to the main storage unit by permitting or denying access thereto.