百度空间 | 百度首页 
 
文章列表
 
您正在查看 "Bsd" 分类下的文章

2008-06-05 21:30

所谓预编译头,就是把头文件事先编译成一种二进制的中间格式,供后续的编译过程使用。GCC编译头文件后的中间文件是*.gch。

如何将头文件编译为.gch文件呢?用g++编译,格式:

g++ xxx.h

把.h文件当成.cpp文件一样来编译。如果需要控制编译细节,比如常量定义之类,可加上其它选项。运行之后,会在同个目录里生成一个名叫xxx.h.gch的文件。

注意在编译.gch的过程中,GCC并没有使用环境变量或 -I 选项来查找被编译的头文件,被编译的头文件必须在当前目录下。然而,被编译的头文件所进一步包含的其它

类别:Bsd | 评论(0) | 浏览()
 
2007-11-23 00:58
摘要
本文介绍了如何利用流水线和一些锁的技巧提高服务器吞吐量,以及新兴的Lock Free技术。

Pipe Line
流水线是已经在大搜索中广泛应用的技术。流水线解决4个问题:充分利用多CPU,尽量按照FIFO的原则处理用户请求,防止长请求阻塞短请求,提高磁盘I/O效率。
在第一篇技术通讯中讲到用epoll等技术在单线程中调度socket I/O才能达到最高的效率。单线程的epoll类方法有一个前提是对每个用户请求,都不能占用太多的CPU来处理应用逻辑。否则很容易出现一个CPU被占满,其它CPU空闲的情况。
总耗
类别:Bsd | 评论(0) | 浏览()
 
2007-07-27 14:33
by Julio M. Merino Vidal
03/31/2005

A package maintainer, or packager, is a person who creates packages for software projects. He eventually finds common problems in these projects, resulting in a complex packaging process and a final package that is a nightmare to maintain. These little flaws exist because in most cases the original developers are not packagers, so they are not aware of them.

类别:Bsd | 评论(0) | 浏览()
 
2007-07-27 14:26

by Julio M. Merino Vidal

NetBSD inherited the Memory File System (MFS), a filesystem that uses virtual memory pages to store its contents, from 4.4BSD. MFS implements the on-disk Fast File System-s lower layer to store blocks into memory. This is inefficient because the same algorithms used to lay out data on disk are used for memory, introducing redundancy and complex data treatment. Despite that, the worst problem with MFS is that, once it has mapped a page, it never releas

类别:Bsd | 评论(0) | 浏览()
 
2007-07-27 13:34
   by Julio M. Merino Vidal

The i386 architecture is full of cruft required to maintain compatibility with old machines that go back as far as the 8086 series. Technically speaking, these features aren't necessary anymore because any recent computer based on this architecture uses a full 32-bit operating system that could work perfectly fine without the legacy code

类别:Bsd | 评论(0) | 浏览()
 
2007-07-27 01:06
  1. Create the src/sys/fs/egfs directory.

  2. Create a minimal src/sys/fs/egfs/files.egfs file:

    deffs fs_egfs.h EGFS
    file fs/egfs/egfs_vfsops.c egfs
    file fs/egfs/egfs_vnops.c egfs
  3. Modify src/sys/conf/files to include

类别:Bsd | 评论(0) | 浏览()
 
2007-07-23 21:29

list_head结构的介绍
list_head结构定义在 里,它是一个double linked list的结构。 底下是它的结构宣告:


struct list_head {
struct list_head *next, *prev;
};

类别:Bsd | 评论(0) | 浏览()
 
2007-07-23 21:28

File结构
在Linux里, 每一个档案都有一个file结构和inode结构, inode结构是用来让Kernel做管理的, 而file结构则是我们平常对档案读写或开启,关闭所使用的。 当然, 从user的观点来看是看不出什么的。 在Linux里, 档案的观念应用的蛮广泛的, 甚至是写一个driver你也只要提供一组的file operations就可以完成了。 我们现在来看看File结构的内容。

类别:Bsd | 评论(0) | 浏览()
 
2007-07-23 21:28

Inode 结构
inode在Linux里 算是一个蛮大的结构, 跟super_block比起来可是不惶多让,基本上, 跟super_block结构一样, 我们一样可以把inode结构分成几部分来看: 串行管理栏位, 基本资料, 用来做inode synchronization的资料, 跟记忆体管理有关的资料, Quota管理栏位, 跟file lock有关的栏位, 以及一组用来操作inode的函式。 以下我们分别来说明这些栏位的意义。

  1. 串行管理栏位
类别:Bsd | 评论(0) | 浏览()
 
2007-07-23 21:26

Super block结构
super_block结构定义在 里, 整个结构可分为基本资料, 一组用来使用super block结构的函式, 一组跟quota管理有关的函式, 管理super block所属档案系统inode的资讯,一些栏位用来做super block的synchronization, 以及各个档案系统本身所特有的资料。

  1. 基本资料


类别:Bsd | 评论(0) | 浏览()
 
     
 
 
文章分类
 
     
 
文章存档
 
 
 
 
 
 
 
 
 
 
 
     
 
最新文章评论
   

真有才呀
 

失事5d6d的免费论坛,速度不错
 
 

摇钱树怎么添加到自选呢? 实在找不到方法啊。 目前长江的能用
 

楼主失踪了?
 
     


©2009 Baidu