Skip to main content

Posts

Java concurrency (multi-threading) - Tutorial

This article describes how to do concurrent programming with Java. It covers the concepts of parallel programming, immutability, threads, the executor framework (thread pools), futures, callables and the fork-join framework. Table of Contents 1. Concurrency 1.1. What is concurrency? 1.2. Process vs. threads 2. Improvements and issues with concurrency 2.1. Limits of concurrency gains 2.2. Concurrency issues 3. Concurrency in Java 3.1. Processes and Threads 3.2. Locks and thread synchronization 3.3. Volatile 4. The Java memory model 4.1. Overview 4.2. Atomic operation 4.3. Memory updates in synchronized code 5. Immutability and Defensive Copies 5.1. Immutability 5.2. Defensive Copies 6. Threads in Java 7. Threads pools with the Executor Framework 8. Futures and Callables 9. Nonblocking algorithms 10. Fork-Join in Java 7 11. Deadlock 1. Concurrency 1.1. What is concurrency? Concurrency is the abi...

How to find out if your computer has a virus ?

If you use the Internet, your computer is at risk of infection from viruses.  Much like biological viruses, some are harmless, some are merely annoying and some can make your life hell. Even if you only occasionally use your home computer, it is important that you understand the risks and know how to protect yourself. What is a virus? In the 1990s the public's impression of what a virus is came from the media. Newspapers reported how  programs such as Michaelangelo [1]  would could cause a financial appocalypse by infecting computers around the world and deleting vital data. If a virus announces its presence in such a melodramatic way as shutting down your PC or deleting your data, although you might find it infuriating, at least you know that you have a problem. Far more dangerous are the new breed of crimeware vir...

Top 5 Best Databases

As part of the contest we conducted recently, I got many comments from the TechProceed.com readers who choose their favorite database. Based on this data, the top spot goes to..  MySQL If you are new to any of the top 5 database mentioned here, please read the rest of the article to understand more about them. 1. MySQL MySQL is used in almost all the open source web projects that require a database in the back-end. MySQL is part of the powerful LAMP stack along with Linux, Apache and PHP. This was originally created by a company called MySQL AB, which was acquired by Sun Microsystems, which was acquired by Oracle. Since we don’t what Oracle will do with MySQL database, open source community has created several forks of MySQL including Drizzle and MariaDB. Following are few key features: Written in C and C++. MyISAM storage uses b-tree disk tables with index compression for high performance. Support for partitioning and replication....