Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Synchronization



  Difference between ConcurrentHashMap and Hashtable

Both ConcurrentHashMap and Hashtable are Collection classes for storing key value pairs and they both provide fast element search with a supplied key. They have much in common. However, we will not discuss the similarities between them here, instead we will focus on the differences between them. ConcurrentHashMap and Hashtable are both thread safe. But the mechanism for thread safe is different between them. Hashtable is synchronized, it utilizes the synchronization mechanism; while ConcurrentHa...

   ConcurrentHashMap,Hashtable     2013-11-18 08:06:54

  Mastering Go Channels: How to Build Concurrent Applications Like a Pro

Introduction In the world of concurrent programming, Go channels have quickly become a popular tool for building fast and efficient applications. Utilizing channels can help you take full advantage of the power of Go's lightweight threads, or goroutines, and enable you to easily and effectively manage data sharing and synchronization. In this article, we'll dive deep into the world of Go channels and show you how to build concurrent applications like a pro. Understanding Go Channels To start, le...

   GOLANG,CHANNEL,CONCURRENCY     2023-04-21 14:47:47

  Deep Understanding of ReentrantLock: Unlocking the Mysteries of Java Concurrent Programming

ReentrantLock introduction ReentrantLock is a class in the Java concurrent package, java.util.concurrent.locks, and is an implementation of the Lock interface. As its name suggests, it is a reentrant mutual exclusion lock. A mutual exclusion lock is a synchronization tool used to protect shared resources, ensuring that only one thread can access the resource at a given time. Reentrant means that a thread can acquire the same lock multiple times without causing a deadlock. This lock provides some...

   JAVA,REENTRANTLOCK,CONCURRENCY,MULTITHREADING     2023-05-22 08:01:13

  Java SynchronizedList and Iterator

While reading some material about concurrency, I come up with some writing about using SynchronizedList wrap about normal List to enable synchronization.   But one interesting thing is http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList%28java.util.List%29   It says     It is imperative that the user manually synchronize on the returned list when iterating over it:     1   List list = Collections.synchronizedList(new A...

       2015-12-03 03:04:08

  Samsung will build its own mobile browser

According to the Korean IT News, Samsung is developing its own brand mobile browser based on WebKit, make its the default browser for future Gaxlaxy products.Samsung has posted recruitment advertisements for recruiting Webkit developers in its Advanced Software Platform Lab located in the Silicon Valley. Webkit is an open-source browser engine, Apple's Safari and Google's Chrome are based on this open source engine.For many users, the phone's built-in default browser is still the most used, so S...

   Samsung,Browser,Webkit     2012-09-24 22:32:00

  Linux Clock : CST,UTC and NTP setup

1. There is an option when you set up clock on installing Linux: system clock users UTC, so what does UTC mean? It's Universal Time Coordinated(UTC), there are two different times in GPS system: one is UTC , the other one is LT(Local Time). The difference between these two is just the timezone difference, UTC is the time in timezone 0. If the local time in Beijing is 8 o'clock in the morning, then UTC time is 0 o'clock, which is a 8 hour difference. 2. In Linux, when we use date to check the tim...

   Linux,Clock,UTC     2013-03-21 12:19:30

  Amazon unveils 8.9" Kindle Fire HD

Amazon today unveiled 7 products of Kindle family, including the $69 new Kindle; Kindle Paperwhite WiFi/3G, priced at $119 / $179; 7-inch Kindle Fire regular edition/HD version, $159/$ 199; 8.9inch Kindle Fire HD with WiFi/4G Edition at $299 /$499. However, the Amazon phone did not show up. The 8.9-inch Kindle Fire HD is today's highlight, because it looks real similar to iPad. Kindle Fire HD has the following features: 1920 x 1200 resolution, 254PPI Texas Instruments OMAP 4470 proce...

   Amazon,Kindle Fire HD,tablet     2012-09-06 19:12:05

  Multithreading interview questions in Java

Multithreading as a widespread programming and execution model allows multiple threads to exist within the context of a single process. These threads share the process' resources but are able to execute independently. The threaded programming model provides developers with a useful abstraction of concurrent execution. However, perhaps the most interesting application of the technology is when it is applied to a single process to enable parallel execution on a multiprocessor system.Many programme...

   Multithreading,Java,Interview     2012-05-28 06:33:25

  Deep Dive into Spin Locks in Golang

In concurrent programming, a Mutex is a commonly used synchronization mechanism to protect critical resources and prevent data races. However, in certain specific scenarios, especially when the lock-holding time is short and the number of threads is limited, a more lightweight lock known as a Spin Lock can provide higher performance. What is a Spin Lock A Spin Lock is a form of busy-wait lock. When a thread attempts to acquire a lock held by another thread, it continuously checks the lock's stat...

   SPINLOCK,MUTEX,GOLANG     2024-01-10 05:53:28

  Go channel explained

In Go, a channel is a type of concurrent data structure that allows two or more goroutines (Go's term for lightweight threads) to communicate with each other. Channels provide a way for goroutines to send and receive values, and they are an essential part of Go's concurrency model. Here's a simple example that demonstrates how to use channels in Go: package main import ( "fmt" ) func main() { // Create a new channel with the `make` function ch := make(chan int) // Start a new ...

   GOLANG,CHANNEL     2022-12-10 22:24:26