For instance, a spreadsheet can have a background calculation thread and a foreground user-interface thread that intercepts taps and other forms of input. Each thread has a base priority, set by the application, and a current priority, set by the kernel. This mode is useful for programs that have lengthy operations - the interface remain active while the background tasks are computing. Additionally, an application developer can add more threads to a program. All extra threads are categorized as either event-driven, responding to messages places in that thread's event queue, or procedural.
Memory is allocated from a global heap space in blocks which can be moved as needed.
Block sizes range from 16 to 64K bytes. You can also declare fixed blocks and reference them using pointers. The system automatically manages loading and unloading VM segments, writing changed segments to disk and the appropriate locking and unlocking. Like real memory, VM files can be allocated in blocks of 16 to 64K bytes. There is a third type of memory store called local memory.