Clemson ECE 453
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Aria Sonar using Multithreading

Go down

Aria Sonar using Multithreading Empty Aria Sonar using Multithreading

Post  bharris Mon Mar 09, 2009 11:26 pm

Multithreading in Aria using Sonar


Pros:

• The benefit to users has been smoother performance on a single-CPU system.
• A multithreaded design also means faster performance on a multiple-CPU system, because threads can run simultaneously on different CPUs.
• SONAR 3.1 has been redesigned to maximize multithreading benefits.
• Work is allocated more evenly among different threads and among multiple CPUs.
• This design allows the system to balance its workload smoothly between the graphical user interface, audio mixing/DSP, MIDI and disk streaming.

Cons:

• An error in any one thread can threaten the execution of the entire process, and threads must be synchronized using operating system-specific mechanisms.
• Synchronization incurs its own overhead, increases program size and significantly complicates the process of developing and testing software.
• Deadlocks are probably the most common problem with thread synchronization.


Multithreading Concepts
In simple terms, a computer program is a series of instructions that are executed sequentially by a central processing unit (CPU).
A program that employs threads, or is multithreaded, takes this idea and replicates it. Rather than having one sequence of instructions for all tasks that need to be done by the application a multithreaded program uses many sequences of instructions, one per thread. It’s just like having many different little sub-programs, all running simultaneously, all running in parallel.
Obviously on a uniprocessor computer these threads don’t really run simultaneously. The computer’s CPU brain can only perform one instruction at a time. But the operating system is able to provide the illusion that multiple threads are executing in parallel. It does this through a procedure known as scheduling.
The vast majority of modern operating systems are multitasking, meaning they allow multiple processes to be executed simultaneously (concurrently). Of course, if the platform has fewer processors than processes, concurrency is implemented by a time sharing scheme for the processor(s). Processes are queued for processor access by the scheduler. Multithreading is an operating system feature that allows many threads to be executed concurrently within each process. As with multitasking, concurrent multithreading is implemented by sharing processor time.
As long as threads run independently and don’t need to write to shared resources, synchronization problems don’t occur. All other sharing scenarios require mutually exclusive resource access, and synchronization is the general term used to refer to the various ways of doing this. Existing literature on concurrent and distributed programming describes what are called the classic concurrency problems, which are formulated in terms of processes, but apply equally well to threads.
Deadlocks are probably the most common problem with thread synchronization. A group of threads is said to be in deadlock when each thread in the group is waiting for an event that can only be caused by another thread from the same group. The unpredictable nature of concurrent execution makes deadlock detection a difficult task, since a specific deadlock situation need not occur for each program execution.

The pros and cons of multithreading
The most important advantage of threading is that the system resources assigned to a process are shared within it, which makes inter-thread communication much easier and faster than costly inter-process communication and allows resources to be used more efficiently. Moreover, on multiprocessor platforms threads are physically executed concurrently, significantly increasing performance.
Unfortunately, threading comes with its own pitfalls. An error in any one thread can threaten the execution of the entire process, and threads must be synchronized using operating system-specific mechanisms. Synchronization incurs its own overhead, increases program size and significantly complicates the process of developing and testing software.

bharris

Posts : 9
Join date : 2009-01-12

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum