..... it sometimes takes me a few days to finish an answer :-) .... but see
linux memory leak monitor ... where i fork a Tk window off..... to monitor a process's memory usage..... you can easily use the idea to run your task..... follow the recipe closely though..... you cannot access Tk widgets or methods across process boundaries.....you can have 2 separate Tk instances (event loops) running under the same parent process....but they act as entirely separate programs..... i use the MeM.pm on any perl script.... but it must be run under an X server of course