上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 109 下一页

2015年5月24日

1014. Waiting in Line (30)

摘要: 题目如下: Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts... 阅读全文

posted @ 2015-05-24 14:15 张大大123 阅读(400) 评论(0) 推荐(0) 编辑

2015年5月23日

linux下使用异步通知

摘要: 阻塞式I/O是一直等待直到设备可以访问,非阻塞式I/O是定期轮询设备是否可以访问。 异步通知则是当设备可以访问时才主动通知应用程序,有点像设备的硬中断。 并不是所有的设备都支持异步通知,应用程序通常假设只有套接字和终端才有异步通知的能力。 异步通知存在一个问题,当进程收到SIGIO信号时,它... 阅读全文

posted @ 2015-05-23 22:47 张大大123 阅读(206) 评论(0) 推荐(0) 编辑

Socket层实现系列 — connect()的实现

摘要: 主要内容:connect()的Socket层实现、期间进程的睡眠和唤醒。 内核版本:3.15.2 我的博客:http://blog.csdn.net/zhangskd 应用层 int connect(int sockfd, const struct sockaddr *serv_addr... 阅读全文

posted @ 2015-05-23 22:29 张大大123 阅读(679) 评论(0) 推荐(0) 编辑

Socket层实现系列 — I/O事件及其处理函数

摘要: 主要内容:Socket I/O事件的定义、I/O处理函数的实现。 内核版本:3.15.2 我的博客:http://blog.csdn.net/zhangskd I/O事件定义 sock中定义了几个I/O事件,当协议栈遇到这些事件时,会调用它们的处理函数。 struct sock { ... 阅读全文

posted @ 2015-05-23 22:25 张大大123 阅读(664) 评论(0) 推荐(0) 编辑

Socket层实现系列 — 信号驱动的异步等待

摘要: 主要内容:Socket的异步通知机制。 内核版本:3.15.2 我的博客:http://blog.csdn.net/zhangskd 概述 socket上定义了几个IO事件:状态改变事件、有数据可读事件、有发送缓存可写事件、有IO错误事件。 对于这些事件,socket中分别定义了相应的事... 阅读全文

posted @ 2015-05-23 22:24 张大大123 阅读(503) 评论(0) 推荐(0) 编辑

Socket层实现系列 — 睡眠驱动的同步等待

摘要: 主要内容:Socket的同步等待机制,connect和accept等待的实现。 内核版本:3.15.2 我的博客:http://blog.csdn.net/zhangskd 概述 socket上定义了几个IO事件:状态改变事件、有数据可读事件、有发送缓存可写事件、有IO错误事件。 对于这... 阅读全文

posted @ 2015-05-23 22:24 张大大123 阅读(656) 评论(0) 推荐(0) 编辑

1013. Battle Over Cities (25)

摘要: 题目如下: It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/to... 阅读全文

posted @ 2015-05-23 10:03 张大大123 阅读(135) 评论(0) 推荐(0) 编辑

2015年5月11日

1006. Sign In and Sign Out (25)

摘要: 题目如下: At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will loc... 阅读全文

posted @ 2015-05-11 19:19 张大大123 阅读(157) 评论(0) 推荐(0) 编辑

2015年5月8日

1004. Counting Leaves (30)

摘要: 题目如下: A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Each input... 阅读全文

posted @ 2015-05-08 18:22 张大大123 阅读(153) 评论(0) 推荐(0) 编辑

2015年5月5日

关于标签系统的又一点想法。

摘要: 前段时间,写过一篇《关于标签系统的一点想法。》。但其实没有谈到里面的内容,是有一部分来自与刘鑫老师的聊天,当时他给了我许多肯定,也是让我觉得记录下来很有必要的原因。前一篇里没有提到,我跟刘老师谈到一个更加深入一点的、关于标签系统的想法。主要原因是因为我尚不肯定这是否也属于标签系统。... 阅读全文

posted @ 2015-05-05 18:25 张大大123 阅读(150) 评论(0) 推荐(0) 编辑

上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 109 下一页

导航