发明名称 System and method for supporting a self-tuning locking mechanism in a transactional middleware machine environment
摘要 A lock mechanism can be supported in a transactional middleware system to protect transaction data in a shared memory when there are concurrent transactions. The transactional middleware machine environment comprises a semaphore provided by an operating system running on a plurality of processors. The plurality of processors operates to access data in the shared memory. The transactional middleware machine environment also comprises a test-and-set (TAS) assembly component that is associated with one or more processes. Each said process operates to use the TAS assembly component to perform one or more TAS operations in order to obtain a lock for data in the shared memory. Additionally, a process operates to be blocked on the semaphore and waits for a release of a lock on data in the shared memory, after the TAS component has performed a number of TAS operations and failed to obtain the lock.
申请公布号 US8782352(B2) 申请公布日期 2014.07.15
申请号 US201213414593 申请日期 2012.03.07
申请人 Oracle International Corporation 发明人 Shen Xugang;Li Xiangdong
分类号 G06F12/12;G06F9/52 主分类号 G06F12/12
代理机构 Meyer IP Law Group 代理人 Meyer IP Law Group
主权项 1. A system for supporting a locking mechanism in a transactional middleware machine environment, comprising: a semaphore provided by an operating system running on a plurality of processors, wherein the plurality of processors operate to access data in a shared memory; a test-and-set (TAS) assembly component that is associated with one or more processes, wherein each said process operates to use the TAS assembly component to perform one or more TAS operations in order to obtain a lock for data in the shared memory, wherein a process operates to be blocked on the semaphore and waits for a release of a lock on data in the shared memory, after the TAS component has performed a specified number of TAS operations and failed to obtain the lock wherein the lock mechanism uses a spin count, which is the specified number of maximum rounds of TAS operations allowed, wherein the spin count is periodically determined using a special process, wherein the spin count is dynamically determined using an algorithm, wherein the algorithm specifies that the spin count is increased from the spin count of a previous period, if a number of spin failures in the previous period exceeds a spin failure limit and a CPU idle ratio in the previous period is below a CPU idle ratio limit, and the spin count is decreased from the spin count of a previous period, if the CPU idle ratio exceeds a CPU idle ratio limit.
地址 Redwood Shores CA US