官术网_书友最值得收藏!

Single-core execution

If this is executed in a single core, that core will then interleave between the three threads, each time filtering some of the words before switching to the next one. This interleaving process is called context switching.

Context switching adds overhead to the overall process, because it requires saving the state of the current thread and then loading the state of the next one. This overhead makes it likely that this multi-threaded implementation of isPalindrome() will take longer in a single-core machine when compared to the sequential implementation seen before. This happens because the sequential implementation will have one core do all the work but will avoid the context switch.

主站蜘蛛池模板: 隆尧县| 万载县| 镇巴县| 建瓯市| 昌都县| 同德县| 武清区| 邯郸市| 汉沽区| 靖州| 临夏市| 临武县| 吴川市| 万载县| 衡阳市| 三门县| 汽车| 平潭县| 朝阳市| 乌什县| 册亨县| 常山县| 铁岭市| 长沙县| 枣强县| 封丘县| 通道| 武邑县| 舞阳县| 合水县| 临海市| 象州县| 越西县| 福鼎市| 都江堰市| 云林县| 长葛市| 通山县| 峨眉山市| 和政县| 石嘴山市|