While I was reading the book – O’Reilly Java Servlet Programming. There was a statement that I couldn’t understand, the text is as below:
Servlets may also be allowed to persist between requests as object
instances, taking up far less memory than full-fledged processes.
May I know how could I know whether Servlet is taking far less memory than full fledged processes?
Hard to tell what is this fragment about without more context but I guess this is a comparison between servlets and cgi. Basically in a single JVM/servlet container you can deploy several singleton servlets. This means one servlet (occupying very little memory) is capable of handling unlimited number of requests (hardware limitations put aside).
With CGI you had to create a single process per request, which might cause more latency and mentioned high memory usage.