Multiprogramming with a Variable number of Tasks