Recent trends in memory sizes, combined with a demand for high-performance data management facilities, have led to the emergence of database support for managing memory-resident data as a topic of interest. In this paper we address the concurrency control problem for main memory database systems. Because such systems differ significantly from traditional database systems in terms of their cost characteristics, existing solutions to the problem are inappropriate; we present a new scheme based on two-phase locking that minimizes the overhead associated with concurrency control without overly limiting opportunities for concurrently executing transactions. We accomplish this by allowing the granularity of locking to vary dynamically in response to changes in the level of inter-transaction conflicts. Unlike hierarchical locking schemes, however, we avoid the expense of setting locks at multiple levels of a granularity hierarchy. We present a simple empirical analysis, based on instruction counts, to validate our claims.