Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OO design patterns for multi-threaded synchronisation

Are there any generalisations of object and data and thread interactions given design pattern names?

Obviously what goes on a lot is synchronisation on an object, passing messages through a queue and also reference counts in memory management systems.

But are there any more OO-oriented names for multithreading design patterns and systems that cleanly embody best practice?

like image 617
martinr Avatar asked Dec 21 '09 12:12

martinr


People also ask

Is multi threading a design pattern?

In software engineering, concurrency patterns are those types of design patterns that deal with the multi-threaded programming paradigm. Examples of this class of patterns include: Active Object. Balking pattern.

What is multi threading in OOP?

Multithreading is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilization of CPU. Each part of such program is called a thread. So, threads are light-weight processes within a process. Threads can be created by using two mechanisms : Extending the Thread class.

How many OOP design patterns are there?

As per the design pattern reference book Design Patterns - Elements of Reusable Object-Oriented Software , there are 23 design patterns which can be classified in three categories: Creational, Structural and Behavioral patterns.

Can multiple threads run at the same time?

Within a process or program, we can run multiple threads concurrently to improve the performance. Threads, unlike heavyweight process, are lightweight and run inside a single process – they share the same address space, the resources allocated and the environment of that process.


1 Answers

"Pattern-oriented Software Architecture Vol 2: Patterns for Concurrent and Networked Objects" by Schmidt, Stal, Rohnert and Buschmann lists some. Douglas Schmidt is also the author of the ACE C++ framework which brings those patterns into practice.

like image 156
Dimitri C. Avatar answered Nov 15 '22 09:11

Dimitri C.