小小程序媛  
得之坦然,失之淡然,顺其自然,争其必然
上一页 1 2 3 4 5 6 ··· 34 下一页

2015年12月23日

摘要: 1. epoll技术 epoll是Linux内核为处理大批量文件描述符而作了改进的poll,是Linux下多路复用IO接口select/poll的增强版本,它能显著提高程序在大量并发连接中只有少量活跃的情况下的系统CPU利用率。另一点原因就是获取事件的时候,它无须遍历整个被侦听的描述符集,只要遍历那 阅读全文
posted @ 2015-12-23 17:40 Coding菌 阅读(482) 评论(0) 推荐(0) 编辑
 
摘要: 1. poll技术 poll函数起源于SVR3,最初局限于流设备。SVR4取消了这种限制,允许poll工作在任何描述符上。poll提供的功能与select类似,不过在处理流设备时,它能够提供额外的信息。 poll的机制与select类似,与select在本质上没有多大差别,管理多个描述符也是进行... 阅读全文
posted @ 2015-12-23 17:39 Coding菌 阅读(300) 评论(0) 推荐(0) 编辑
 
摘要: 1. I/O复用 我们学习了I/o复用的基本知识,了解到目前支持I/O复用的系统调用有select、pselect、poll、epoll。而epoll技术以其独特的优势被越来越多的应用到各大企业服务器。(后面将有poll & epoll单独学习笔记) 基本概念 IO多路复用是指内核一旦发现进程指... 阅读全文
posted @ 2015-12-23 17:15 Coding菌 阅读(427) 评论(0) 推荐(0) 编辑
 
摘要: 1. I/O模型简介 最近一直在学习Unix网络编程,被Unix下各种I/O模型搞得头昏脑涨,结合《Unix网络编程 - 卷一》第六章 并参考了网上各牛们的分析,稍稍厘清了一些。因此记录下来,方便以后复习! 阅读全文
posted @ 2015-12-23 16:51 Coding菌 阅读(151) 评论(0) 推荐(0) 编辑
 
摘要: 1. Socket简介 Socket是进程通讯的一种方式,即调用这个网络库的一些API函数实现分布在不同主机的相关进程之间的数据交换。 几个定义: (1)IP地址:即依照TCP/IP协议分配给本地主机的网络地址,两个进程要通讯,任一进程首先要知道通讯对方的位置,即对方的IP。 (2)端口号:... 阅读全文
posted @ 2015-12-23 15:24 Coding菌 阅读(295) 评论(0) 推荐(0) 编辑

2015年12月22日

摘要: 题目 Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given “25525511135”, return 阅读全文
posted @ 2015-12-22 15:39 Coding菌 阅读(153) 评论(0) 推荐(0) 编辑
 
摘要: 序项目简介:采用I/O复用技术select实现socket通信,采用多线程负责每个客户操作处理,完成Linux下的多客户聊天室!OS:Ubuntu 15.04IDE:vim gcc makeDB:Sqlite 3Time:2015-12-09 ~ 2012-12-21项目功能架构:... 阅读全文
posted @ 2015-12-22 11:39 Coding菌 阅读(5296) 评论(0) 推荐(2) 编辑

2015年12月21日

摘要: 题目 Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the h 阅读全文
posted @ 2015-12-21 15:34 Coding菌 阅读(338) 评论(1) 推荐(0) 编辑
 
摘要: 题目Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example, S ... 阅读全文
posted @ 2015-12-21 13:09 Coding菌 阅读(125) 评论(0) 推荐(0) 编辑

2015年12月16日

摘要: 题目Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justifie... 阅读全文
posted @ 2015-12-16 17:28 Coding菌 阅读(913) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 ··· 34 下一页