As MultiProcessor System-on-a-Chip (MPSoC) designs become more common, hardware/software codesign engineers face new challenges involving operating system integration. To speed up operating system/MPSoC codesign, this article presents recent research in hardware/software partitioning of a Real-Time Operating System (RTOS). After a brief overview of the ¤ hardware/software RTOS design framework, we focus on new results in deadlock detection and avoidance. Among various configured RTOS/MPSoC designs in this research, we show an example where a system with the Deadlock Detection hardware Unit (DDU) achieves a 46% speed-up of application execution time over a system with deadlock detection in software. Similarly, we show another example where a system with the Deadlock Avoidance hardware Unit (DAU) not only automatically avoids deadlock but also achieves a 44% speed-up of application execution time over a system avoiding deadlock in software; furthermore, in our example, the DAU only co...