摘要: 同步条件(Event) An event is a simple synchronization object;the event represents an internal flag, and threads can wait for the flag to be set, or set or 阅读全文
posted @ 2018-10-11 20:55 Roygood 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 程序运行分两部分: 1、I/O操作部分,此时CPU处于空闲状态 2、计算部分,此时CPU处于工作状态 很多情况下程序中I/O操作相当费时,这就造成了CPU使用率低下,那能不能在这个空闲时间去执行别的程序?这就出现了多道程序设计技术 在当前作业执行I/O操作时,切换另一个程序使用CPU,提高CPU使用 阅读全文
posted @ 2018-10-11 18:00 Roygood 阅读(110) 评论(0) 推荐(0) 编辑
摘要: TCP下粘包问题 两种情况下会发生粘包。 1、发送端需要等缓冲区满才发送出去,造成粘包(发送数据时间间隔很短,数据了很小,会合到一起,产生粘包) 发送方:AB #其实放在缓存里没发送 发送方:B #其实放在缓存里没发送 发送方:CD #缓存满了,发一波 接收方:ABBCD #及时从缓存里接收信息,我 阅读全文
posted @ 2018-10-11 16:58 Roygood 阅读(136) 评论(0) 推荐(0) 编辑