摘要: 下图是Java里的概念,其中 Hashtable 和 SynchronizedMap 都是对整个map加锁,所以多个thread没法同时修改。 ConcurrentHashMap 则允许多个thread同时访问不同的entry,即如果thread操作的key不同,这些thread是可以同时读写的。如 阅读全文
posted @ 2019-10-26 06:00 約束の空 阅读(201) 评论(0) 推荐(0) 编辑
摘要: The reader and writer processes share the following data structures: semaphore rw_mutex = 1; semaphore mutex = 1; int read_count = 0; The semaphores m 阅读全文
posted @ 2019-10-26 04:44 約束の空 阅读(452) 评论(0) 推荐(0) 编辑
摘要: Quicksort not stable in place faster than other sorting algorithms for small data set Quickselect quickselect is a selection algorithm to find the kth 阅读全文
posted @ 2019-10-26 02:48 約束の空 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Merge Sort stable sort most common implementation does not sort in place external merge sort Time Complexity: O(nlogn) 阅读全文
posted @ 2019-10-26 02:27 約束の空 阅读(178) 评论(0) 推荐(0) 编辑