added starvation handling
refactoring
Merge branch 'uebung3' of https://github.com/stephde/BS2 into uebung3