CGI Servlet
It is a process based.For every request a new process will be created and i.e responsible to generate required response. It is a thread based.For every request a new thread will be created and i.e responsible to generate required response.
Creating and destructing a new process for every request is costly,If no.of requests are increases the response time will be increased and effects performance.Hence CGI technology fails to deliver scalable applications. creating and destructing a new thread for every request is not costly.There is no change in the response time even though no.of requests increases.Hence servlet technology succeeds to deliver scalable applications.
Two processes never share common address space,hence there is no chance of raising concurrency problems. All threads share same address space,hence we should compulsory handle concurrency problems.
CGI programs can be written in verity of languages.But most popular is perl Servlet programs can be written only in JAVA
Most of CGI languages are not object oriented hence we may miss key benefits of oops Java it self is object oriented, hence we can get all benefits of oops
CGI programs are mostly platform dependent. Servlet programs are platform independent.