In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Write a blog for the first time. Recently found that a lot of technical things quickly read and forget, hope to write through their own understanding, I think this is a way.
When I went to interview linux software some time ago, the interviewer asked me what are the advantages and disadvantages of multi-threading and multi-process, and when to use multi-process and multi-thread. In fact, I have seen this question and answer on the Internet before, and then I took a glance, but I didn't really understand it. If someone asks me how to answer this question now, I think I have my own answer.
First of all, the memory between multiple processes is isolated, so synchronization is relatively simple, but the communication between processes is more troublesome, which needs to communicate through IPC (pipes, named pipes, message queues, socket). The creation and destruction of processes consume a lot of resources.
So when to use multiprocess and when to use multithreading?
Multi-process: considering program stability
Multithreading: programs that need to be created and destroyed frequently and require a lot of operations
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.