A memory management unit that includes: (i) multiple data segment
descriptors, each data segment descriptor associated with a data memory
segment; (ii) multiple program segment descriptors, each program segment
descriptor associated with a program memory segment; and (iii) a
controller, adapted to replace the content of the multiple data segment
descriptors and the multiple program segment descriptors in response to a
task switch. A method for memory management, the method includes: (i)
providing multiple data segment descriptors; each data segment descriptor
associated with a data memory segment, and providing multiple program
segment descriptors, each program segment descriptor associated with a
program memory segment; (ii) receiving and storing a program task
identifier and a data task identifier; (iii) receiving a data access
request and determining how to handle the data access request in response
to a content of the multiple data segment descriptors; and (iv) receiving
a program access request and determining how to handle the program access
request in response to a content of the multiple program segment
descriptors.