Amazon Interview Question
Testing / Quality AssurancesI agree that my first guess would be memory leak. However, could there be other causes too?
One that comes to mind is the following: what if the test or application being tested spawns a daemon? If I recall correctly, Java daemons all die when there are no user processes running and the JVM shuts down. However, for a C application or Perl script, there could be a daemon spawned and then not properly terminated. Is this a reasonable thing to look for?
It could be any of the following:
1. Memory leak
2. CPU processor time not freed up after task execution
3. Tasks going into infinite loop
4. Denial of service attack being created on the server
5. Not enough space on the server and huge no of tasks/threads running on it.
What I can think of is, its taking up too much memory, in that case the system will get slower. I can test this, by taking an initial snapshot of the memory of the system, run the code several times and then take a snapshot again. If there is an increase in the memory size, then the code needs to ensure that it frees the memory of variables that are not being used in the code. This will make sure that the system is not slow due to unnecessary memory usage
- ganges January 27, 2008