加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

好书推荐

发布时间:2020-12-15 20:49:54 所属栏目:大数据 来源:网络整理
导读:推荐参考书籍: ============ 《UNIX操作系统设计》 http://www.china-pub.com/computers/common/info.asp?id=34 *《UNIX环境高级编程》 http://www.china-pub.com/computers/common/info.asp?id=30 《操作系统:设计与实现》(MINIX) http://www.china-pub

推荐参考书籍:
============
《UNIX操作系统设计》
http://www.china-pub.com/computers/common/info.asp?id=34
*《UNIX环境高级编程》
http://www.china-pub.com/computers/common/info.asp?id=30
《操作系统:设计与实现》(MINIX)
http://www.china-pub.com/computers/common/info.asp?id=2033
《IBM PC 汇编语言程序设计》
http://www.china-pub.com/computers/common/info.asp?id=7721
*《深入理解计算机系统》
http://www.china-pub.com/computers/common/info.asp?id=18133
《Linux权威指南》
http://www.china-pub.com/computers/common/info.asp?id=1174
《Linux Assembly Language Programming》
ftp://plinux.org/pub/linux/docs/ ... age_Programming.pdf
*《Intel 80386 Programmer';s Reference Manual》
ftp://plinux.org/pub/linux/docs/Intel_80386_Manual.pdf
*《The C Programming Language》
ftp://plinux.org/pub/linux/docs/The_C_programming_Language.rar
加星号“*”者为重点推荐读物!
============================================
如果有些忘了,就请先花哪怕一天时间将这些基础知识先浏览一遍,在看本书。
硬件方面可参考教科书。
Intel 32 mode 可见Intel 386 manual;

内核代码中用到的汇编程序(as86和AT&T语法)可参照以下一些文档。
-------------------------------------------------------------
MINIX 汇编手册: http://www.oldlinux.org/oldlinux/viewthread.php?tid=291
NASM 汇编手册: http://www.oldlinux.org/oldlinux/viewthread.php?tid=877
as86? ?在线手册: http://www.oldlinux.org/oldlinux/viewthread.php?tid=1895
ld86? ?在线手册:http://www.oldlinux.org/oldlinux/viewthread.php?tid=1428

/*****************************************/
/* 本站资源:? ?? ?? ?? ?? ?? ?? ?? ?? ? */
/* http://oldlinux.org/Linux.old/? ?? ???*/
/*****************************************/
===============================================
如果你具有大学计算机本科或以上学历,那么你可以在适当复习以上知识后就能顺利看懂本书。
如果你是在读本科计算机系的学生,那么在学习过操作系统课程或者正在学习时,只要复习一些有关Intel PC机组成原理,就应该很顺利地理解本书,并能很好地帮助你理解操作系统的基本原理。
如果你是其它专业在读本科学生,那么你可以首先自学一些有关操作系统的理论知识和计算机微机原理课程(如果没有学过的话),了解一些操作系统的基本术语,再继续学习本书。
如果你是一个专科学生,那么你首先需要准备的知识与一个非计算机本科生所要做的一样。
如果你是一个中学毕业的学生,那么你可以先自学一些《计算机原理》、《微机原理》、《C语言》、《英语》等基本课程,然后再继续阅读本书。当然也可以把摊子铺开,同时阅读:)
注意: 无论你现在的学位或学历怎样,这都不是主要问题。关键在于努力和刻苦。而兴趣是学习的最好动力之一。即使你没有任何学位,只要识字能上网,那么你面前的道路还是宽广的。
“世上无难事,只要肯登攀”。



---------------------------------------------------------------------------------------------

源代码浏览工具介绍
http://www.oldlinux.org/oldlinux/viewthread.php?tid=1470

============================
  在本机上阅读源代码,可以使用redhat 的snavigator或Source Dynamics的Source Insight软件。snavigator是免费的,source Insight可以去www.sourceInsight.com去下载。或者在此处下载:
http://oldlinux.org/download/tools/si350.rar (3.2MB)
http://oldlinux.org/download/tools/Release-SN51E-win32.zip (7.8MB)
http://oldlinux.org/download/tools/src2html/

Source Insight的使用方法可参见文章:
http://www-900.ibm.com/developer ... t/tip17/index.shtml
  也可以使用本站网页上提供的再线交叉引用阅读程序:
http://oldlinux.org/lxr/http/source/
在阅读本书时,最好在计算机中安装这两个软件之一,边阅读书中注释边浏览代码。




------------------------------------------------------------------------------------------------
lxr设置方法介绍(1)
======================
How to make your own Cross Reference
By qhshang at 163.com

It is a long long time to gen xref for it,a not so long time to glimpse-index it.
If you are lucky enough to make lxr.conf done like it on this host in half an hour,do NOT drop me a mail:-)
----------------------------------------
Install lxr
Modify Makefile to customize the PERLBIN and INSTALLPREFIX,to indicate the perl program and where you install lxr.
then
$ make install

To generate your reference for files in Your_dir:
$ genxref Your_dir
while genxref is in lxr/bin
In my practice using genxref,locale should be set to C,en_US.utf-8 is not ok.
I don';t know why,because I don';t read the perl script throughly.
----------------------------------------
Install glimpse:
First make??glimpse,then cp bin/{glimpse,glimpseindex} to /bin or /usr/bin
Generate index using glimpse:
$ glimpseindex -H . Your_dir
here -H means where to put the generated index files.
Test your index:
$ glimpse Your_string
----------------------------------------
Web server configuration
To make lxr viewable in web pages,add lines for xrefs in apache conf 文件:
<Directory /Your_path_to_lxr>
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
To make sure perl script can be executed:
make a file .htaccess in??your lxr perl script dir:
Options Indexes
<Files ~ (search|source|ident|diff|find)&#36;>
? ?SetHandler cgi-script
? ?Options ExecCGI
</Files>

NOTE: some said only one line is OK:
? ?SetHandler cgi-script
I don';t know if it works.
----------------------------------------
Make your files browsable from browsers:
First you should make sure the lxr dir can be accessed via web server.
then
&#36; chmod 755 xref fileidx
&#36; chmod 755 .glimpse_*
&#36; chmod 755 Your_Dir_To_WWWROOT -R
&#36; chmod 755 Your_Dir_To_LXR -R
----------------------------------------
Configuration 文件: xrefs.conf
My file is only for example use.
Your can modify your conf file according to your own condition.
&#35; Define typed variable "v",read valueset from file.
variable: v,Version,[/Your_web_server_root/xrefs/src/versions],[/Your_web_server_root/xrefs/src/defversion]
&#35; here variable v is for Version,read from file,and defversion is for
&#35; default version,which will be shown to you by default.
&#35; Define typed variable "a".??First value is default.
variable: a,Architecture,[/Your_web_server_root/xrefs/src/archs]
&#35; and a is for Arch,the first one will be shown by default.
&#35; Define the base url for the LXR files.
baseurl: http://Your_web_server_root/xrefs/
&#35; this url variable can be refered in template-head

&#35; These are the templates for the HTML heading,directory listing and
&#35; footer,respectively.
htmlhead: /Your_web_server_root/xrefs/template-head
htmltail: /Your_web_server_root/xrefs/template-tail
htmldir:??/Your_web_server_root/xrefs/template-dir
&#35; The source is here.
sourceroot: /Your_web_server_root/xrefs/src/linux-&#36;v/linux
srcrootname: Linux-&#36;v
&#35; because I have more then one Linux kernel version,so I put them like the
&#35; above for clear reference
&#35; I make a linux subdir to hold the original kernel source here
&#35; "&#35;include <foo.h>" is mapped to this directory (in the LXR source
&#35; tree)
incprefix: /usr/include
&#35; I don';t know what is this mean,who can tell qhshang?
&#35; The database files go here.
dbdir: /Your_web_server_root/xrefs/src/linux-&#36;v
&#35; here is where you put the fileidx and xref file db.
&#35; the location can be various according to your operation.
&#35; Glimpse can be found here.
glimpsebin: /usr/local/bin/glimpse
&#35; for freetext search
&#35; The power of regexps.??This is pretty Linux-specific,but quite
&#35; useful.??Tinker with it and see what it does.??(How';s that for
&#35; documentation?)
map: /include/asm[^//]*/ /include/asm-&#36;a/
map: /arch/[^//]+/ /arch/&#36;a/
----------------------------------------
To provide the cross reference with Green-colored comments for C/C++,
there is a patch for lxr.(I am sorry that I forgot the url of this patch.)
It should be put to lxr/lib/LXR.

--- Common.pmWed Mar??7 15:34:24 2001
+++ Common.pmSat Jan 27 12:42:41 2001
@@ -18,8 +18,8 @@

@cterm = (';atom';,';////.';,';';,
-??';comment';,';//*';,';/*/';,';//';,"/n",
+??';comment1';,
+??';comment2';,
';string';,';"';,"';",
';include';,';&#35;include';,"/n");
@@ -179,12 +179,17 @@
while (defined(&#36;frag)) {
? ?&markspecials(&#36;frag);
-? ? if (&#36;btype eq ';comment';) {
-&#35; Comment
+? ? if (&#36;btype eq ';comment1';) {
+&#35; C++-style comment ';//';
&#35; Convert mail adresses to mailto:
&freetextmarkup(&#36;frag);
-&#36;frag = "<b><i>&#36;frag</i></b>";
-&#36;frag =~ s&#35;/n&#35;</i></b>/n<b><i>&#35;g;
+&#36;frag = "<font color=/"&#35;00AA00/"><i>&#36;frag";
+&#36;frag =~ s&#35;/n&#35;</i></font>/n&#35;g;
+? ? } elsif (&#36;btype eq ';comment2';) {
+&#35; C-style comment ';/* ... */';
+&freetextmarkup(&#36;frag);
+&#36;frag = "<font color=/"&#35;00AA00/"><i>&#36;frag</i></font>";
+&#36;frag =~ s&#35;/n&#35;</i></font>/n<font color=/"/&#35;00AA00/"><i>&#35;g;
? ?} elsif (&#36;btype eq ';string';) {
&#35; String
&#36;frag = "<i>&#36;frag</i>";
----------------------------------------
Some misc questions:
开始lxr作perl查询的时候出错,有时侯能工作,但是有警告:
? ?? ? /** Warning: Use of uninitialized value in subroutine entry at
? ?? ? /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DB_File.pm line 259./
于是找到这个文件中的相应行,不知是错什么了:
DoTie_(&#36;tieHASH,@arg) ;
觉得是mod_perl问题。
下载一个mod_perl-1.99_10,照别人曾经写的作:
解压到/root:
&#36; perl Makefile.PL EVERYTHING=1 APACHE_SRC=../httpd.x.x.x /src
USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1
结果是:
[root@secteam mod_perl-1.99_10]&#35; perl Makefile.PL EVERYTHING=1
APACHE_SRC=../httpd-2.0.47/ USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1
Reading Makefile.PL args from &#64;ARGV
!!! Unable to determine server version,aborting.
!!! Please specify MP_APXS or MP_AP_PREFIX.

不行,我猜测是版本不同导致的问题
于是按照mod_perl 的INSTALL 文件作:
% perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
make没有问题,make test 有很多错:
/usr/bin/perl -Iblib/arch -Iblib/lib /
t/TEST -clean
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE= APXS= /
/usr/bin/perl -Iblib/arch -Iblib/lib /
t/TEST -verbose=0
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -verbose=0
*** root mode: changing the files ownership to ';nobody'; (99:99)
*** sudo -u ';&#35;99'; /usr/bin/perl -e ';print -r "/root/mod_perl-1.99_10/t"
&& -w _ && -x _ ? "OK" : "NOK"';
*** result: NOK
!!! You are running the test suite under user ';root';.
Apache cannot spawn child processes as ';root';,therefore
we attempt to run the test suite with user ';nobody'; (99:99).
The problem is that the path:
/root/mod_perl-1.99_10/t
must be ';rwx'; by user ';nobody';,so Apache can read and write under that
path.
There several ways to resolve this issue. For example move
';/root/mod_perl-1.99_10/t'; to ';/tmp/'; and repeat the ';make test'; phase.
You can test whether the location is good by running the following test:
% sudo -u ';&#35;99'; /usr/bin/perl -e ';print -r "/root/mod_perl-1.99_10/t" &&
-w _ && -x _ ? "OK" : "NOK"';

make: *** [run_tests] Error 29
原来是解tar gz包到root路径的原因,先不理会,make install也可以安装,重启
apache,
查询警告依旧。
于是重新解到tmp下,
% perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs
% make && make test
还是同样的错,
突然看到错误中还有: /root/mod_perl-1.99_10/t,可是我已经解到/tmp下作的
呀,很不解,(:-)没有深究)
只有删掉/root下的,重新解到/tmp,
make test的时候巨多的OK。。。
然后就一路顺风成功install。
于是启动apache:
[root@secteam apache2]&#35; ./bin/apachectl start
Syntax error on line 235 of /usr/local/apache2/conf/httpd.conf:
Invalid command ';AddModule';,perhaps mis-spelled or defined by a module
not included in the server configuration
现在注释掉下面的
[root@secteam apache2]&#35; vi /usr/local/apache2/conf/httpd.conf
&#35;AddModule mod_perl.c
启动
[root@secteam apache2]&#35; ./bin/apachectl start
[Thu Oct 09 10:00:34 2003] [error] Can';t locate Apache.pm in @INC (@INC
contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .
/usr/local/apache2/ /usr/local/apache2/lib/perl) at (ev&#97;l 1) line 3.
[Thu Oct 09 10:00:34 2003] [error] Can';t load Perl module Apache for
server 192.9.200.102:80,exiting...
奇怪,怎么没有Apache.pm呢,locate Apache.pm出来好几个,
因为不知道哪里修改@INC,所以我找到一个Apache.pm拷贝到@INC中的一个位置。
启动[root@secteam apache2]&#35; ./bin/apachectl start,可以,但是查询的时候
警告仍然如初
这样认为是pm问题,需要perl5.8.1,于是make,make install
启动apachectl,发现libperl.so找不到,连vim都不能用了:
vim: error while loading shared libraries: libperl.so: cannot open
shared object 文件: No such file or directory
于是从别的地方找了一个拷贝到/usr/lib,可以了。
然后去掉perl5.8.0的内容,这次启动apache,发现又有很多pm找不到,
觉的是mod_perl的配置决定了perl相关程序的位置。
于是重新把mod_perl make,make install,
此时执行lxr发现错误:
The server encountered an internal error or misconfiguration and was
unable to complete your request.
分析了一下,觉的是perl的路径问题,修改lxr的以下文件的perl路径:
diff,find,ident,search,source,
OK(或者把perl链接到/usr/bin因为大多perl脚本都是)
这样lxr的标识符索引也没有警告了,但是freetext搜索还不可以,
认为是glimpse的问题。(freetext有glimpse支持)
然后把glimpse的属性搞定,freetext搜索就好了
现在默认是Linux-2.5.72-lsm1/

其他问题
apachectl的问题:
我是ssh到server上的,执行
/usr/local/apache2/bin/apachectl restart
每次都使得我的ssh链接关闭,不得其解,
到server本机终端执行
/usr/local/apache2/bin/apachectl restart
每次都退出一层shell,奇怪。(没有仔细读apachectl script)
只好到apache 所在路径下执行。
各位可否给点指点? 而且apachectl不给出成功与否,
[root@secteam apache2]&#35; ./bin/apachectl stop
httpd (pid 20453?) not running



------------------------------------------------------------------------------------------------
Lxr设置方法介绍(2)
==========================
0. 假设你把lxr安装在你的web主目录中(也即,例如,http://oldlinux.org/lxr/),那么:
1. web目录下建立文件“.htaccess”,其内容如下:
-----------------开始(不包括本行)
&#35; Web Access script permission
<Files ~ (search|ident|diff|find|source|ident1)&#36;>
SetHandler cgi-script
</Files>
------------------结束

2. 编辑配置文件: lxr/http/lxr.conf 例如oldlinux.org的配置文件内容为:
--------------------开始
&#35; Configuration file.
&#35; Define typed variable "v",版本,[/var/www/oldlinux.org/lxr/source/versions],[/var/www/oldlinux.org/lxr/source/defversion]
&#35; Define typed variable "a".??First value is default.
variable: a,体系结构,(i386)
&#35; Define the base url for the LXR files.
baseurl: http://oldlinux.org/lxr/http/&#35; These are the templates for the HTML heading,directory listing and&#35; footer,respectively.htmlhead: /var/www/oldlinux.org/lxr/http/template-headhtmltail: /var/www/oldlinux.org/lxr/http/template-tailhtmldir:??/var/www/oldlinux.org/lxr/http/template-dir&#35; The source is here.sourceroot: /var/www/oldlinux.org/lxr/source/&#36;v/linux/srcrootname: Linux&#35; "&#35;include <foo.h>" is mapped to this directory (in the LXR source&#35; tree)incprefix: /include&#35; The database files go here.dbdir: /var/www/oldlinux.org/lxr/source/&#36;v&#35; Glimpse can be found here.glimpsebin: /usr/local/bin/glimpse&#35; The power of regexps.??This is pretty Linux-specific,but quite&#35; useful.??Tinker with it and see what it does.??(How';s that for&#35; documentation?)map: /include/asm[^//]*/ /include/asm-&#36;a/map: /arch/[^//]+/ /arch/&#36;a/----------------------------结束。3. 建立源文件内容。对每一个想要浏览的内核版本,按以下步骤进行(若要使用第5,6选项步骤,你要首先安装glimpse软件):&#35; Source install procedures1. mkdir a subdirectory with the code version number;2. chdir into the subdirectory;3. tar -zxvf the compressed soucecode(this will generate a ';linux'; subdir);4. /var/www/html/lxr/bin/genxref linux5. [ Optional ] glimpseindex -H . linux6. [ Optional ] chmod 644 .glim*7. Edit the ';versions'; file to contain this new code version number;8. done!Example: To Install the linux kernel code version 2.1.33:The compressed code packet is : linux-2.1.33.tar.gz----------------------------------------------------------1. mkdir /var/www/html/lxr/source/2.1.332. chdir /var/www/html/lxr/source/2.1.333. tar -zxvf linux-2.1.33.tar.gz4. /var/www/html/lxr/bin/genxref linux5. [ Optional ] glimpseindex -H . linux6. [ Optional ] chmod 644 .glim*7. Insert the line ';2.1.33'; into the ';versions'; file.8. Done! =======================================================================

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读