<pedrocorreia.net ⁄>
 

<Threading and Parallel Programming Constructs ⁄ >




clicks: 384 384 2009-01-25 2009-01-25 goto programacao myNews programacao  Bookmark This Bookmark This


Synchronization is an enforcing mechanism used to impose constraints on the order of execution of threads. The synchronization controls the relative order of thread execution and resolves any conflict among threads that might produce unwanted behavior. In simple terms, synchronization is used to coordinate thread execution and manage shared data.

In an environment where messages are used for communicating between a sender and a receiver, synchronization is implicit, as a message must be sent before the message can be received. On the other hand, for a shared-memory based environment, threads have no implicit interdependency unless some constraints are imposed.

Two types of synchronization operations are widely used: mutual exclusion and condition synchronization. In the case of mutual exclusion, one thread blocks a critical section -- a section of code that contains shared data -- and one or more threads wait to get their turn to enter into the section. This helps when two or more threads share the same memory space and run simultaneously. The mutual exclusion is controlled by a scheduler and depends on the granularity of the scheduler. Condition synchronization, on the other hand, blocks a thread until the system state specifies some specific conditions. The condition synchronization allows a thread to wait until a specific condition is reached. Figure 1 shows the generic representation of synchronization.



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://www.ddj.com/212902219?cid=RSSfeed_DDJ_All




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="programacao" ⁄>

Android Intents - Tutorial

Intents allow the application to request and / or provide services . For example (...)

clicks: 42 42 2010-07-30 2010-07-30 goto url (new window) vogella.de/arti... goto myNews programacao


Android Development - Hierarchy Viewer

The Android SDK comes with a wide variety of tool that are intended to help deve (...)

clicks: 43 43 2010-07-29 2010-07-29 goto url (new window) barebonescoder.... goto myNews programacao


JavaScriptSerializer - Dictionary to JSON Serialization and Deserialization

Few weeks ago I was working with the JavaScriptSerializer for serializing objec (...)

clicks: 43 43 2010-07-29 2010-07-29 goto url (new window) weblogs.asp.net... goto myNews programacao


Memoizing higher-order functions

Memoization incrementally converts functions into data structures. It pays off w (...)

clicks: 36 36 2010-07-29 2010-07-29 goto url (new window) conal.net/blog/... goto myNews programacao


20+ Required Windows Apps: Web Designer's Choice

In April, Jeffrey Way gave us a list of the "20 Mac Apps You'll Use Every Day." (...)

clicks: 56 56 2010-07-28 2010-07-28 goto url (new window) net.tutsplus.co... goto myNews programacao


Introducing ASP.NET MVC 3 (Preview 1)

This morning we posted the "Preview 1" release of ASP.NET MVC 3. You can downlo (...)

clicks: 80 80 2010-07-28 2010-07-28 goto url (new window) weblogs.asp.net... goto myNews programacao


Uploading a File (Or Files) With ASP.NET MVC

I wanted to confirm something about how to upload a file or set of files with AS (...)

clicks: 76 76 2010-07-27 2010-07-27 goto url (new window) haacked.com/arc... goto myNews programacao


Android - Multithreading For Performance

A good practice in creating responsive applications is to make sure your main UI (...)

clicks: 45 45 2010-07-27 2010-07-27 goto url (new window) android-develop... goto myNews programacao