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