自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

BPC's Domain

A Geek's Perspective On Life...

  • 博客(10)
  • 资源 (4)
  • 收藏
  • 关注

转载 二叉树集锦

1. 求二叉树第K层的节点个数递归解法:(1)如果二叉树为空或者k(2)如果二叉树不为空并且k==1,返回1(3)如果二叉树不为空且k>1,返回左子树中k-1层的节点个数与右子树k-1层节点个数之和参考代码如下:[cpp] view plaincopyint GetNodeNumKthLevel(BinaryTreeNode *

2013-09-29 20:32:19 1191

转载 为什么中断上下文不可以休眠

先把中断处理流程给出来1.进入中断处理程序--->2.保存关键上下文---->3.开中断(sti指令)--->4.进入中断处理程序的handler--->5.关中断(cli指令)---->6.写EOI寄存器(表示中断处理完成)---->7.开中断。复制代码硬中断:对应于上图的1、2、3步骤,在这几个步骤中,所有中断是被屏蔽的,如果在这个时候睡眠了,操作系统不

2013-09-24 22:08:21 1412

转载 自旋锁的实现

(1) linux上的自旋锁有三种实现:          1. 在单cpu,不可抢占内核中,自旋锁为空操作。          2. 在单cpu,可抢占内核中,自旋锁实现为“禁止内核抢占”,并不实现“自旋”。          3. 在多cpu,可抢占内核中,自旋锁实现为“禁止内核抢占” + “自旋”。(2) 关于抢占式内核与非抢占式内核:          在非抢占式内核中

2013-09-24 21:52:33 1060

转载 IRQ line number vs Interrupt vector number

On the mainbord we have an interrupt controller (IRC) which acts as a multiplexer between the devices which can raise an interrupt and the CPU: |--------| |----

2013-09-11 18:57:04 2007

转载 linux字符设备驱动总结之:全自动创建设备及节点

/***************************************************************************************************                         linux字符设备驱动总结之:全自动创建设备及节点看了LDD3,深入浅出LDD,以及各个博文,还是需要总结下的。张永辉 2012年10月9

2013-09-08 21:46:43 625

转载 class_create() & device_create

本章节将介绍 class_create class_destroy 使用下一章介绍“device_create device_destroy 使用==mknod及通过class_create自动创建设备节点”========================================================================struct cla

2013-09-08 21:13:38 1243

转载 dev、devfs、 udev和sysfs之间的关系

一、/dev存储的是linux可以认识的所有的文件设备名,无论这个设备有没有在系统里。为了解决/dev目录过大的问题,就 产生了devfs,但devfs是基因内核的,有很多无法解决的问题(参考前面的文章),所以就出现了udev。而udev对设备在/dev目录下的命名 依赖于sysfs所提供的规则信息,这些规则信息由用户提供。sysfs是在2.6内核时加进linux内核的。sysfs就是我们系统加载

2013-09-08 20:58:59 1927

转载 linux中的 IO端口映射和IO内存映射

CPU地址空间(一)地址的概念1)物理地址:CPU地址总线传来的地址,由硬件电路控制其具体含义。物理地址中很大一部分是留给内存条中的内存的,但也常被映射到其他存储器上 (如显存、BIOS等)。在程序指令中的虚拟地址经过段映射和页面映射后,就生成了物理地址,这个物理地址被放到CPU的地址线上。        物理地址空间,一部分给物理RAM(内存)用,一部分给总线用,这是由硬件设计来

2013-09-08 19:56:22 6146

转载 Why Memory Barrier?

要了解如何使用memory barrier,最好的方法是明白它为什么存在。CPU硬件设计为了提高指令的执行速度,增设了两个缓冲区(store buffer, invalidate queue)。这个两个缓冲区可以避免CPU在某些情况下进行不必要的等待,从而提高速度,但是这两个缓冲区的存在也同时带来了新的问题。要仔细分析这个问题需要先了解cache的工作方式。目前CPU的cache的

2013-09-08 16:26:45 573

转载 对Linux内核中进程上下文和中断上下文的理解

作者:杨硕,华清远见嵌入式学院讲师。内核空间和用户空间是操作系统理论的基础之一,即内核功能模块运行在内核空间,而应用程序运行在用户空间。现代的CPU都具有不同的操作模式,代表不同的级别,不同的级别具有不同的功能,在较低的级别中将禁止某些操作。Linux系统设计时利用了这种硬件特性,使用了两个级别,最高级别和最低级别,内核运行在最高级别(内核态),这个级别可以进行所有操作,而应用程序运行在较

2013-09-05 10:06:22 504

The design of design

Making Sense of Design Effective design is at the heart of everything from software development to engineering to architecture. But what do we really know about the design process? What leads to effective, elegant designs? The Design of Design addresses these questions. These new essays by Fred Brooks contain extraordinary insights for designers in every discipline. Brooks pinpoints constants inherent in all design projects and uncovers processes and patterns likely to lead to excellence. Drawing on conversations with dozens of exceptional designers, as well as his own experiences in several design domains, Brooks observes that bold design decisions lead to better outcomes. The author tracks the evolution of the design process, treats collaborative and distributed design, and illuminates what makes a truly great designer. He examines the nuts and bolts of design processes, including budget constraints of many kinds, aesthetics, design empiricism, and tools, and grounds this discussion in his own real-world examples—case studies ranging from home construction to IBM's Operating System/360. Throughout, Brooks reveals keys to success that every designer, design project manager, and design researcher should know.

2011-08-22

NS中文手册精美版.pdf

当参考书文档不错 ns方面的中文资料太少。。

2010-04-14

Inside the C++ object model

Inside the C++ Object Model focuses on the underlying mechanisms that support object-oriented programming within C++: constructor semantics, temporary generation, support for encapsulation, inheritance, and "the virtuals"-virtual functions and virtual inheritance. This book shows how your understanding the underlying implementation models can help you code more efficiently and with greater confidence. Lippman dispells the misinformation and myths about the overhead and complexity associated with C++, while pointing out areas in which costs and trade offs, sometimes hidden, do exist. He then explains how the various implementation models arose, points out areas in which they are likely to evolve, and why they are what they are. He covers the semantic implications of the C++ object model and how that model affects your programs.

2008-09-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除