in Education by
How to decide whether to use threads or create separate process altogether in your application to achieve parallelism. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Threads are more light weight, and for the making several "workers" just to utilize all availabe CPUs or cores, you're better of with threads. When you need the workers to be better isolated and more robust, like with most servers, go with sockets. When one thread crashes badly, it usually takes down the entire process, including other threads working in that process. If a process turns sour and dies, it doesn't touch any other process, so they can happily go on with their bussiness as if nothing happened.

Related questions

0 votes
    How to decide whether to use threads or create separate process altogether in your application to achieve parallelism ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 30, 2022 in Education by JackTerrance
0 votes
    How to decide whether to use threads or create separate process altogether in your application to achieve parallelism ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    Why does a sorted array get processed faster than an unsorted array, even though the size of the arrays are ... processed faster. Why? Select the correct answer from above options...
asked Jan 21, 2022 in Education by JackTerrance
0 votes
    I am working on a very large scale computing library that is using STL heavily. The library is being ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 12, 2022 in Education by JackTerrance
0 votes
    I built an OCR application which reads PDF files and OCR's them. I built it using Multi-threading ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I'm trying to make sure that all my threads of Class A have finished before notify is called. At ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    When two threads access the same ArrayList object what is the outcome of the program? (a) Both are able ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    What happens if two threads simultaneously modify TreeSet? (a) ConcurrentModificationException is thrown (b) Both threads ... of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of this method can be used to make the main thread to be executed last among all the threads? ... portion Multithreading of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    I have simple PyGTK app. Since I have to run multiple periodic tasks to fetch some data and refresh ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    can anyone please help me out for this question Write a program to create two threads, so one thread will print ... between 11 to 20. Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    can anyone please help me out for this question Write a program to create two threads, so one thread will print ... between 11 to 20. Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
0 votes
    If two threads access the same hashmap at the same time, what would happen? (a) ConcurrentModificationException ... and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    When two threads access the same ArrayList object what is the outcome of the program? (a) Both are ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What happens if two threads simultaneously modify TreeSet? (a) ConcurrentModificationException is thrown (b) Both ... and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
...