发明名称 Thread synchronization by transitioning threads to spin lock and sleep state
摘要 A method, apparatus, and computer readable medium for synchronizing a main thread and a slave thread executing on a processor system are disclosed. For example, the method includes the following elements: transitioning the slave thread from a sleep state to a spin-lock state in response to a wake-up message from the main thread; transitioning the slave thread out of the spin-lock state to process a first work unit from the main thread; determining, at the main thread, an elapsed time period until receipt of a second work unit for the slave thread; transitioning the slave thread to the spin-lock state if the elapsed time period satisfies a threshold time period; and transitioning the slave thread to the sleep state if the elapsed time period does not satisfy the threshold time period.
申请公布号 US9003413(B1) 申请公布日期 2015.04.07
申请号 US200912568558 申请日期 2009.09.28
申请人 Xilinx, Inc. 发明人 Anderson Jason H.;Ahmed Taneem;Kalman Sandor S.
分类号 G06F9/46;H04L12/26 主分类号 G06F9/46
代理机构 代理人 Brush Robert M.;Chan Gerald
主权项 1. A method of synchronizing a main thread and a slave thread, comprising: obtaining an initial work unit at the main thread; dividing the initial work unit into a first work unit and another work unit; sending, via a wake-up message, the first work unit from the main thread to the slave thread; and processing the other work unit at the main thread; transitioning the slave thread from a sleep state to a spin-lock state in response to the wake-up message from the main thread; transitioning the slave thread out of the spin-lock state to process the first work unit from the main thread; determining, at the main thread that executes on a processor, an elapsed time period until receipt of a second work unit for the slave thread, wherein the act of determining the elapsed time period is performed before the receipt of the second work unit; transitioning the slave thread to the spin-lock state if the elapsed time period satisfies a threshold time period; and transitioning the slave thread to the sleep state if the elapsed time period does not satisfy the threshold time period.
地址 San Jose CA US