1. A method of executing a task, comprising: executing a first task in which garbage is collected using a garbage collector; and executing a second task, said garbage collector being preemptable by said second task.