hns - 日記自動生成システム - Version 2.19.9

先月 2010年12月 来月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2010年12月10日(金) 旧暦 [n年日記] [更新:"2010/12/10 17:24:12"]

#1 [無題] エピソード記憶は金物・紙物 ? CPU の設計方式と関係する ?

エピソード記憶という文字をつぶやいたら、いろいろ思い着いた。
人間の記憶にはエピソード記憶 (episodic memory) と論理記憶があると言われている。 これは金物(hardware) なのか紙物 (software)なのかなと考えたら、 では、人間の脳には金物と紙物という差があるのだろうか。 エピソード記憶を担う部分と論理記憶を担う部分では、 神経細胞の接続に違いがあるのか、ないのか。 少なくとも、それぞれを担っている脳の部位があると思っている。

どうもエピソード記憶が得意な人と、 論理記憶の方が得意な人がいるような気がしている。一番簡単な図式化は、 エピソード記憶(文科系)、論理記憶(理科系)ではないかと思っている。

ちなみにエピソード記憶とは、この前、こういうような出来事があった、 誰さんと誰さんがね、あるところで、... というようなこと。
論理記憶とは、例えば地球は丸くて、太陽の回りを回っていて、それは何故かと言うと 重力というものがあって、引張っていて、... というような記憶

(いま Wiki Pedia を見たら、エピソード記憶と意味記憶となっている、そちらが正しいか)

そこで話は変って CPU の話。最初の半導体 1 Chip CPU は 4004 かと思うが、これは全て random logic というか、構成は全て配線で作られていた。 機能は配線で実現されているということになる。(Wired Logic という方が正しいかな)。

Motorola で言えば 6809 まではこの配線による構成だった。 その配線というのは人間が手作業で図面を作る。 それも最初の頃は紙の上に配線図を書いて、 それを人間が手作業で半導体マスクに変換(書直し)する

ところが CPU の規模が大きくなると、 この配線による構成では配線図を書いてからマスクにするまでに作業量が大きく、 期待される時間内に作業が完了しない。また配線誤りが入るすきも多い。

そこで、マイクロプログラムと言う方法が考案される。 金物的にはなるべく単純な構成にしておき、 それにプログラムを 1 か 0 の並べた形で配置(書く)ようにして、 設計工程を短縮する試みだ。これも Motorola で言えば 68000 がそれで作られた。 プログラムというのは、フローチャート(流れ図)とも言う。 CPU の動作をレジスタ、ALU をどう、どの順でつなぐか、という流れ図で書いておき、 それをプログラムにして、後から 1 か 0 を置くだけで良いようにしておく。

Motorola で言えば、この方法は、ある意味で成功し、M68030 まではそれなりの成果 を上げる。この方法では、レジスタ構成や一つの命令で実行する動作を高度にすることで性能を稼ぐ。 CISC Complex Instruction Set Computer という訳だ。 また、性能を稼ぐには Pipeline というものも使う。一つの動作(命令)を完了するの に、何段階かの動作が必要で、それを一つ一つ順次に実行していては、時間がかかる。 そこで、これらを並列に、行う方法をとるようになった。簡単に言って、 少なくとも、命令の取得、解析、実行、という三段階があり、また実行にはメモリからの読出、 メモリへの書込もあるので、これで四段階になる。 これを工場のべルトコンべア方式のように、 各工程は、その段階が終ると、すぐ次の命令に取りかかるようにして、見かけ上の(結果的な) 実行時間を短くする (実のところ、マイクロプログラム方式とパイプライン方式は、設計する上で、直接には連動しない。 それぞれを独立に採用、不採用することが可能である)。

マイクロプログラムで実装する方式は結果的には大変良い性能のものが作れる。しかし大きな問題があった。 構想してから実際に出荷出来るようなものを 作るまでに大変時間がかかる。二三年とかあるいはそれ以上というような話だ。

では、この設計作業の多くをしめる部分は何かという分析から、じゃもっと簡単に作れば、 出来たものがずうっと高速に動作すれば、後はプログラム(紙物)側でがんばった方が、 世の中に早く形として出せるのでは、という話になって、 RISC Reduced Instruction Set Computer が作られる。SPARC は、この形で最初に成功した 商品だ。ここで「プログラムでがんばる」と書いたが、実際には 「(人間が書くプログラムを機械に読める形にする)コンパイラにがんばってもらう」 ということになる。

さてこのマイクロプログラム方式は性能の良いものが作れると書いたが、この方式の CPU は、実は実行時間がかかる。 命令を解析して、分類したりするのに、 内部の (マイクロプログラム ROM) を参照する訳だが、それには内部の一段階の時間(クロック) が必要で、それがいくつかあると、その分の時間が必要になる。 ROM も大きくなると、それなりに読出までの時間がかかるということだ。

ここで大切な話が一つあって CAD とか EDA というようなことだけれど、大昔に人間がやって いた配線図からマスク生成の作業は計算機がやってくれるようになって、 もし人間がやるならとても時間のかかる、最初の頃にやっていた配線による構成でも、 難なく実現してくれるようになったということがある。 それに加えて必要な機能も配線図でなく、プログラムのように記述することも可能になってきた。

(という訳で、話は続く)


2010年12月02日(木) 旧暦 [n年日記] [更新:"2010/12/02 21:49:14"]

#1 [pkgsrc][NetBSD] print/cups, cups-1.4.3nb9

I am getting some error while doing make package. I could not figure out why, but just for my record:
  190  cd print/cups
  191  make clean
  192  cvs update -dPA
  194  make package |& tee ~/prep/cups-1.4.3nb9.log
=> Checking file-check results for cups-1.4.3nb9
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in /usr/pkg:
ERROR:         /export/pkgsrc/print/cups/work/.destdir/usr/pkg/libexec/cups/backend/dnssd
ERROR:         /export/pkgsrc/print/cups/work/.destdir/usr/pkg/libexec/cups/backend/mdns
*** Error code 1
modena@makoto 10:37:03/101202(..print/cups)% grep Permission ~/prep/cups-1.4.3nb9.log
strip: unable to copy file '/export/pkgsrc/print/cups/work/
 .destdir/usr/pkg/lib/libcups.so.2.0.8' reason: Permission denied
 .destdir/usr/pkg/lib/libcups.a' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsimage.so.2.0.3' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsimage.a' reason: Permission denied
 .destdir/usr/pkg/lib/libcupscgi.so.1.0.0' reason: Permission denied
 .destdir/usr/pkg/lib/libcupscgi.a' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsdriver.so.1.0.0' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsdriver.a' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsppdc.so.1.0.0' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsppdc.a' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsmime.so.1.0.0' reason: Permission denied
 .destdir/usr/pkg/lib/libcupsmime.a' reason: Permission denied
modena@makoto 10:37:28/101202(..print/cups)%
After all, the files pointed out above are installed.
modena@makoto 10:55:26/101202(..print/cups)% grep dns_sd ~/prep/cups-1.4.3nb9.log 
checking dns_sd.h usability... yes
checking dns_sd.h presence... yes
checking for dns_sd.h... yes
checking for current version of dns_sd library... no
dnssd is enabled by option, but it is not found on the system, it will be skipped. How PLIST is to be handled.

If the option 'dnssd' is enabled, packaging should check its relevant library and say no if not installed (not available).

in options.mk, it looks properly coded:
 30  PLIST_VARS+=            dnssd
 31  .if !empty(PKG_OPTIONS:Mdnssd)
 32  .include "../../net/mDNSResponder/buildlink3.mk"
 33  CONFIGURE_ARGS+=        --enable-dnssd
 34  PLIST.dnssd=            yes
 35  .else
 36  CONFIGURE_ARGS+=        --disable-dnssd
 37  .endif
And it seems to me DNS Responder is installed recently.
modena@makoto 11:04:03/101202(..print/cups)% pkg_info|grep DNS  
p5-Net-DNS-0.66     Perl5 module for DNS resolution
mDNSResponder-108nb1 Apple's mDNS responder

modena@makoto 11:04:50/101202(..print/cups)% ls -l /usr/pkg/lib/libdns_sd*
-rwxr-xr-x  1 root  wheel  19726 Dec  1 23:16 /usr/pkg/lib/libdns_sd.so
modena@makoto 11:04:54/101202(..print/cups)% 
Then, why configure says no.
in configure.log says:
configure:9920: checking for current version of dns_sd library
configure:9939: cc -c -I/usr/include/krb5  -O2 -I/usr/pkg/include -I/usr/include/krb5 -I/usr/include -
I/usr/pkg/include/dbus-1.0 -I/usr/pkg/lib/dbus-1.0/include   -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/inclu
de/krb5  -I/usr/pkg/include -I/usr/include/krb5 -I/usr/include conftest.c >&5
conftest.c: In function 'main':
conftest.c:102: error: 'kDNSServiceFlagsShareConnection' undeclared (first use in this function)
conftest.c:102: error: (Each undeclared identifier is reported only once
conftest.c:102: error: for each function it appears in.)
configure:9939: $? = 1
configure: failed program was:
mDNSResponder 108 is too old, the current one is 258.13. But it is not easy to build it. So here is the patch:
cvs diff: Diffing .
Index: options.mk
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/print/cups/options.mk,v
retrieving revision 1.11
diff -u -r1.11 options.mk
--- options.mk  14 Jul 2010 11:25:19 -0000      1.11
+++ options.mk  2 Dec 2010 02:16:18 -0000
@@ -4,7 +4,11 @@
 PKG_OPTIONS_REQUIRED_GROUPS=   pdftops
 PKG_OPTIONS_GROUP.pdftops=     ghostscript poppler
 PKG_SUPPORTED_OPTIONS= acl dbus dnssd kerberos libusb pam slp tcpwrappers threads
-PKG_SUGGESTED_OPTIONS= dbus dnssd kerberos libusb poppler slp
+PKG_SUGGESTED_OPTIONS= dbus kerberos libusb poppler slp
+.if ${OPSYS} == "Darwin"
+PKG_SUGGESTED_OPTIONS+=        dnssd
+.endif
+
 PKG_OPTIONS_LEGACY_OPTS+=      xpdf:poppler gs:ghostscript
 
 .include "../../mk/bsd.options.mk"
cvs diff: Diffing files
cvs diff: Diffing patches
Says the current version is 214.3.2.
I may be doing something wrong. net/mDNSResponder was too old (in my machine).

Updating mDNSResponder to recentt resolve the problem:

As stated above, the current version of nDNSResponder with pkgsrc is 214.3.2. With this version, the cups packages OK.


2010年12月01日(水) 旧暦 [n年日記] [更新:"2010/12/02 21:21:50"]

#1 [xterm] xterm の窓の題名を変更する方法

某所で見かけた訳だけれど、
echo -e "\033]2;foo\007"
とすると、題名を foo に変更出来る。 ここの 2 は
0    title+icon
1    icon
2    title
となっているらしい。少なくとも僕の fvwm では効く。

Comments related this article

Re: xterm の窓の題名を変更する方法 by obache    2010/12/04 10:24
リモートで入った先のシステムで、カレントディレクトリやらホスト名やらをタイトルの...


最近の日記
2024年04月29日
dkim
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
以上、3 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)