Looking for answers? Westonci.ca is your go-to Q&A platform, offering quick, trustworthy responses from a community of experts. Ask your questions and receive precise answers from experienced professionals across different disciplines. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

in the lectures, there is an example of web server using multi-threading. it creates a new thread to serve every request. suppose you like to limit the resource consumption by allowing no more than 100 active threads simultaneously, how do you modify the code to realize this limit? (hint: use semaphore(s). pseudo code is enough.)