上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: Linux 提出了 Multi-Processing 的概念,它的调度器可以将操作系统的线程均分到各个核(或硬件线程)上去执行,以此达到并行计算的目的,从而也可以极大地提高系统的性能。 实现计数器 1)自旋锁 spinlock不会导致线程的状态切换(用户态->内核态), 1, spinlock介绍 阅读全文
posted @ 2015-11-09 13:56 taek 阅读(1462) 评论(0) 推荐(0) 编辑
摘要: lock 分配内存 lock = mem_heap_alloc(trx->lock_heap, sizeof(lock_t) + n_bytes); 内存分配图 上面分配的内存是连续的,不会造成碎片 lock[0] 为 0xxx3 lock[1] 为 0xxx15 或 lock+sizeof(loc 阅读全文
posted @ 2015-11-06 15:13 taek 阅读(396) 评论(0) 推荐(0) 编辑
摘要: /*********************************************************************//** Looks for a suitable type record lock struct by the same trx on the same page. This can be used to save space when a new r... 阅读全文
posted @ 2015-11-06 15:01 taek 阅读(228) 评论(0) 推荐(0) 编辑
摘要: row代表lock HashTable的权限 column代表预加锁的权限 ulint lock_mode_stronger_or_eq( /* */ enum lock_mode mode1, /*!< in: lock mode */ //找到的lock本身锁的模式 enum lock_mode 阅读全文
posted @ 2015-11-06 12:21 taek 阅读(293) 评论(0) 推荐(0) 编辑
摘要: /*********************************************************************//** Creates a new record lock and inserts it to the lock queue. Does NOT check for deadlocks or lock compatibility! @return ... 阅读全文
posted @ 2015-11-05 18:33 taek 阅读(586) 评论(0) 推荐(0) 编辑
摘要: /*********************************************************************//**Gets the number of bits in a record lock bitmap.@return number of bits */... 阅读全文
posted @ 2015-11-05 17:19 taek 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 检查锁与锁之间的兼容性 路径:/mysql-5.5.43/storage/innobase/lock/lock0lock.c 实现:见锁的强度比较 row 可理解为 lock 的锁模式 column 可理解为 预加锁的模式 反过来也行 速记:只要包括X字符,跟谁都不兼容 阅读全文
posted @ 2015-11-05 11:25 taek 阅读(717) 评论(0) 推荐(0) 编辑
摘要: /************************************************************//** Gets the nth cell in a hash table. @return pointer to cell */ UNIV_INLINE hash_cell_t* hash_get_nth_cell( /*==============*/ ... 阅读全文
posted @ 2015-11-04 17:50 taek 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 调用 方法 这里好绕 对于下一个元素, 都习惯于使用struct 结构体名称 *next 阅读全文
posted @ 2015-11-04 17:14 taek 阅读(390) 评论(0) 推荐(0) 编辑
摘要: HASH_INSERT 详见 阅读全文
posted @ 2015-11-04 16:23 taek 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页