The allocation of CPU time and memory resources is a familiar problem in organizations with a large number of users and a single mainframe. Usually the amount of resources allocated to a single user is based on the user's own statistics not on the statistics of the entire organization, therefore patterns are not well identified and the allocation system is prodigal, A fuzzy-logic-based algorithm to optimize the CPU and memory distribution among users based on their history is suggested. The algorithm works on heavy and light users separately since they present different patterns to be observed. The result is a set of rules generated by the fuzzy-logic inference engine that will allow the system to use its computing ability in an optimized manner. Test results on data taken from the Faculty of Engineering of Tel Aviv University demonstrate the capabilities of the new algorithm.