摘要: 1、在Linux2.2内核中,并不存在真正意义上的线程。当时Linux中常用的线程pthread实际上是通过进程来模拟的,也就是说Linux中的线程也是通过fork()创建的“轻”进程,并且线程的个数也很有限,最多只能有4096个进程/线程同时运行。 2、Linux2.4内核消除了这个线程个数的限制,并且允许在系统运行中动态地调整进程数上限。当时采用的是LinuxThread线程库,它对应的线程... 阅读全文
posted @ 2011-08-18 20:41 浪里飞 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 查看SUSE版本信息 1、cat /proc/version 内核版本 #cat /proc/version 2、uname -a 内核版本 3、lsb_release -a 发行版本 4、cat /etc/SuSE-release 可以看到补丁版本 查看mysql版本信息 ~]$ mysql -V mysql> status; ~]$ mysql --help | grep Distrib m... 阅读全文
posted @ 2011-08-18 20:07 浪里飞 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 今天写了个简单的mysql程序,通过C语言。示例代码View Code #include "stdio.h"#include "mysql.h"#include <pthread.h>#include "stdlib.h"#include "string"#include "iostream"using namespace std;typedef struct SqlInfo{ string server; string user; string passwd; string db; 阅读全文
posted @ 2011-08-18 18:52 浪里飞 阅读(1992) 评论(1) 推荐(0) 编辑