1. An image forming apparatus, comprising: a plurality of hardware resources provided to carry out image formation; a plurality of application programs performing respective processing of the plurality of hardware resources related to the image formation; a storage device storing rewritable shared data which is used by the plurality of application programs in common; and a shared-data control unit suspending one of a write-lock request or a read-lock request that is received from one of the plurality of application programs when acquisition and/or updating of the shared data is inhibited, and after the acquisition and/or updating of the shared data is allowed the shared-data control unit inhibiting the acquisition and/or updating of the shared data by other application programs than said one of the plurality of application programs in accordance with the suspended one of the write-lock request or the read-lock request for said one of the plurality of application programs.