Resource-monopolizing Denial-of-Service (DoS) is one form of malicious code attack. An attacking code exclusively uses shared resources and attempts to drop the responsiveness of the machine so low that it is practically useless. Resource-monopolizing DoS is difficult to prevent in commodity operating systems, because they allow every process to compete for shared resources in an uncontrolled manner. This paper presents preemptive resource management, a scheme we developed to defend against resource-monopolizing DoS. Preemptive resource management extensively applies priority and preemption to every type of resource. It controls resource allocation based on priority, and preempts resources allocated to lower-priority processes based on the availability of shared resources. The experimental results we obtained suggest that preemptive resource management prevents resource-monopolizing DoS from impinging on the responsiveness of other innocent processes.