How about a new button "Close PAM AND umount USB drive"?
PAM should have a flag about how many apps were launched (evidently, from PAM, if someone launch any app EXTERNALLY, it's user problem, we're talking about PAM, not magic). When a portable App is closed (need to monitor execution threads), flag value will be reduced , when an App is launched, it will be increased.
This new option should check periodically the system (how about a check every 5 secs?) when launched until our flag value is zero, and then should try to umount the drive (3 to 6 tries, not more).
There's a possible problem: if any file is open (from ANY OTHER app), umount will be imposible, because drive IS IN USE (but we can monitorize situation, using error response check), so an error message like "Umount was impossible, check your open files and CLOSE them (moron)" is needed, with options like "Ok, don't umount", "Ok, don't close" and "Keep trying 1 minute more" (about 12 checks).
I think it would be a great feature to reduce stress from a novice user trying to close the app, because steps to eject the drive are, usually
a) Umount the drive (error, drive is in use)
b) Close the P Apps
c) Umount the drive (error, drive is in use) What the f***?
d) Think about
e) Umount the drive (error, drive is in use) ARRRGGGHHHHH!!!!!
f) Close the PAM (AHA!!)
g) Umount the drive. (Success) WOOOOOAAA, 'M THE NUMBER ONE
steps c) to g) can be managed with the new button, and i'm sure about the user will be eternally thankful to developers, he only needs to push ONE buton to eject his drive now