Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
For some reason I cannot find the answers to this. Multiple threads can be associated with the same process. It's called a multithreaded process. One of the good things about multithreaded processes is that they share resources. But what resources do they share, and what resources do they not share?
I know there are both shared resources among threads of the same process, and there are resources that may not be shared among threads of the same process.
They share a common view of memory. A pointer created in one thread is useable in another. Similarly, a value set in one thread will, with caveats, be visible in another thread.
They do not share a stack. Their stacks are located at different addresses in memory.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
In the Micro service architecture , I was reading the concepts the orchestration and choreography. Is any guidelines/suggestions for choosing the Choreography and Orchestration?
Orchestration can be linked with how Orchestra performs i.e when you have control over all the actors in a process - when they're all in one domain of control and you can control the flow of activities. This is ofcourse most often when you're specifying a business process that will be enacted inside one organisation that you have control over.
Choreography is a way of specifying how two or more parties - none of which has any control over the other parties' processes, or perhaps any visibility of those processes - can coordinate their activities and processes to share information and value. Use choreography when coordination across domains of control/visibility is required. You can think of choreography, in a simple scenario, as like a network protocol. It dictates acceptable patterns of requests and responses between parties.
You can choose between Orchestration and Choreography in your Microservices based on what fits best for your use case based something similar lines of above mentioned explanation.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
With multicores now more common, game developers are now leaning toward the use of threads, which is discussed in this question:
Why don't large programs (such as games) use loads of different threads?
To me, this idea seems analogous to the idea having multiple machines running things in clusters, or parallel computing.
Some games run on dedicated servers.
My question is: Can you use clusters to maximize parallel power, in the same way threading does on a multi-core system? Will it give the same benefit? Why/why not?
You can do that. But sharing the computation of a Game engine between clusters will introduce more bottleneck to the system. Because clusters will us the network and it is way slower than CPU and main memory.
Some games use simulation clients to share large computing loads. But they need to be pretty careful about the synchronization issues caused by the network delays.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
How many I/O paths would a virtual machine -- like an EC2 instance or a Linode instance -- have available? I'm interested in learning more about this because I don't know an appropriate value for PostgreSQL's effective_io_concurrency setting. Thanks!
You don't know what's behind the mountpoints of your virtual machines. So the best thing you can and, actually, should do: test the performance of the disks alone and then testing it with different values of effective_io_concurrency.
I would took each /dev/* device that is used in your mountpoints as a separate IO path, at least this can be a good start.
I also think, that this configuration parameter has more value on the dedicated physical servers, rather then virtual ones (provided externally of course).
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm trying to periodically check out if several linux machines are alive.
My idea is to have a main computer that receives a periodic message from every machine, so if any of them stops messaging, the main one will know something's going wrong with that particular equipment.
I want to make it as "lite" as possible, I mean, using the less data transmission possible, because some of the machines I want to look after are placed on installation with a not so good internet connection. So, if it's possible, I'll prefer not to use email or ftp.
Any idea?
Thanks in advance.
You should use a dedicated piece of software for monitoring your infrastructure. Inventing something from scratch will probably take longer and be much less powerful than such a product. nagios for example is something that is commonly used for this purpose.
Well, you could connect to the main machine on a specific port and keep sending one byte periodically. Is that "lite" enough? :)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I would like to know why we prefer to make web servers multi-threaded
instead of make it multi-process web servers ....
Is it because of legacy issues.....
I would like to hear practical reasons as well as theoretical reasons
On *nix, to start up a process you need duplicate all the resources of the parent process. All the parents file descriptors are dup'ed, for example, and a new memory space is created to contain the new process. When the process terminates everything has to be torn down.
A thread, on the other hand, is essentially just a stack. Very quick to start and stop.
Early web servers didn't use threads for a simple reason: they weren't implemented yet.
Threads are usually cheaper than processes.