SRL Archive - Discussions & Debates

parallel programming vs serialized programming!


toxjq

2013-06-05 18:47:20

So what are you guys take on this? Lately I found my self wondering the web and taking a Parallel programming course(free). With the advancement in hardware, I feel like it is getting more and more important we start to focus on learning about parallel and distributed system. So what you guys think about this.

Brandon

2013-06-05 19:29:17

From: toxjq
So what are you guys take on this? Lately I found my self wondering the web and taking a Parallel programming course(free). With the advancement in hardware, I feel like it is getting more and more important we start to focus on learning about parallel and distributed system. So what you guys think about this.


Parallel programming won't truly be parallel until Q-Bits and Quantum processors are released publicly. Before that can happen though, advanced encryption algorithms and ciphers as well as new hashes would need to be created because it'd destroy the current algo's.

That all being said, the concept is a good one and I advice you to stick with it until you learn it to an amazing level. Diving right into it tend to mess up a lot of programmers (well especially in low level language).

Serial programming is still just as useful but the difference is that you can't run things at the same time. The difference between Non-Blocking vs. Asynchronous vs. Synchronous/Serialized. These are what you should look for in your Programming course or w/e it is.


Non-Blocking is where you use a function to poll whether a blocking operation succeeded or not. Ex: Poll, Select, EventSelect are all Socket polling functions and can be used to make RecV and Send functions non-blocking so they don't make your program hang.

Asynchronous is like threading. Two operations can be ran at the same time without having to worry about polling or blocking. The downside is that you should make sure that you lock a resource when accessing it from multiple threads unless inherently multi-threaded. Eventually at some point it has to synchronize with main or "notify" main through some event that an operation completed unless its a detached thread. Joining would be different.

Synchronous/Serialized would require that all operations go through just main alone and are ran in the order they are called. No parallelism or anything. That doesn't mean that you can't run things on multiple cores. However, multiple threads make multi-core programming easier. DirectX isn't threaded but it is able to run on multiple graphic cores while taking info from the CPU.


So yeah, each one of these have advantages and ALL of them should be learned whether its for Simba or for some other language, its good to have it under your belt because then you have choices. Choices/Options are what you need the most as a programmer.

toxjq

2013-06-05 20:05:16

yes agree with the quantum processor not being public but, you can possible run practice on your GPU's (decent to good ones). Also it is a good thing to practice on when you are working with large database right?