2012/05/26

賽局理論的起源後面的故事

前幾天上課時聽到的故事,賽局理論很知名,也被很多文章討論及引用。
和他有很多關連的有個理論是 奈許平衡 (Nash equilibrium) 我要講的不是這個理論
那 google 一下就很多了,令人有趣的是 John Forbes Nash Jr  這個人及其博士論文。

再維基百科寫道:「約翰·福布斯·納什(John Forbes Nash Jr.)利用不動點定理證明了均衡點的存在,為賽局理論的一般化奠定了堅實的基礎。」

就這樣,因為他在 1950 年就寫了這一篇論文被很多經濟學家引用,然後被引用了 4x 年後再 1994 年獲得瑞典銀行經濟學獎(也稱諾貝爾經濟學獎)。但是這時候大家都以為這理論這麼久了,原作者應該也掛了,否則怎麼一直沒沒無聞。其實原因是因為他被診斷出來了他患有偏執人格的精神分裂症,所以在和人的相處上很困難。

電影劇照

他的故事實在太精采了,就被拍成電影 A Beautiful Mind (美麗境界) 2002 年再台灣上映過,2周冠軍 8周下架。最後還是看一下課程的內容好了....


 [耶魯開放式課程] Ben Polak 教授指導之賽局理論
http://www.myoops.org/main.php?act=course&id=1897

這篇經理人講得很淺顯易懂 http://www.managertoday.com.tw/?p=1350
樣樣都好、太厲害的人,反而玩不過那些能力較差,卻處處藉由搗蛋來獲取額外利益的人。但難道「能者真的只能多勞」?

2012/05/06

CentOS6 iSCSI target and initiator 的設定

CentOS6 iSCSI target and initiator 的設定

流程:
1.需要有各儲存裝置 (以 lvm  的裝置示範)
2.安裝 target 服務
3.啟動服務
4.來到 inititor 端,將 target 的分享掛載起來


1.需要有各儲存裝置 (以 lvm  的裝置示範)
[root@server1 ~]# lvcreate -l 3 -n iscsi10  vgsrv
  Logical volume "iscsi10" created

 --- Logical volume ---
  LV Name                /dev/vgsrv/iscsi10
  VG Name                vgsrv
  LV UUID                VcQj9X-yhOD-wMDY-Sh2b-9Z8X-r0Cj-h08rB0
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                96.00 MiB
  Current LE             3
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

2.安裝 target 服務

 # 安裝 scsi-target-utils
[root@server1 ~]# yum install scsi-target-utils

# 修改 targets 設定
[root@server1 ~]# vim /etc/tgt/targets.conf
# 在最後面加入這一段 
# target 名稱自取,通常用這樣的格式即可
iqn.2012-05.world.server:target0>
# 設定儲存裝置來源
  backing-store /dev/vgsrv/iscsi10
# 設定可存取的 initiator 位置
  initiator-address 192.168.123.132
# 登入的學生帳號密碼
  incominguser student PaSsWoRd

3.啟動服務
# 重新啟動 tgtd 服務
[root@server1 ~]# /etc/init.d/tgtd restart
# tgtd 預設開機啟動
[root@server1 ~]# chkconfig tgtd on 
# show tgtadm 顯示設定檔狀況並驗證
[root@server1 ~]# tgtadm --mode target --op show
Target 1: iqn.2012-05.world.server:target0
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 101 MB, Block size: 512
            Online: Yes
            Removable media: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/vgsrv/iscsi10
            Backing store flags:
    Account information:
        student  # 登入帳號
    ACL information:
        192.168.123.132  # 可使用的主機

4.來到 inititor 端,將 target 的分享掛載起來

[root@desktop1 ~]# iscsiadm -m discovery -t st -p 192.168.123.194
Starting iscsid:                                           [  OK  ]
192.168.123.194:3260,1 iqn.2012-05.world.server:target0

# 因為 target 有設定密碼,所以需要設定這段.
[root@desktop1 ~]# vim /etc/iscsi/iscsid.conf
# To enable CHAP authentication set node.session.auth.authmethod
# to CHAP. The default is None.
node.session.auth.authmethod = CHAP

# To set a CHAP username and password for initiator
# authentication by the target(s), uncomment the following lines:
node.session.auth.username = student
node.session.auth.password = password
... 省略 ...

# 掛載 iscsi target
[root@desktop1 ~]# iscsiadm -m node -T iqn.2012-05.world.server:target0 -p 192.168.123.194 -l
Logging in to [iface: default, target: iqn.2012-05.world.server:target0, portal: 192.168.123.194,3260]
Login to [iface: default, target: iqn.2012-05.world.server:target0, portal: 192.168.123.194,3260] successful.

# 找尋裝置代號
[root@desktop1 ~]# tail /var/log/messages
May  6 00:34:21 desktop1 kernel: scsi 4:0:0:0: Attached scsi generic sg2 type 12
May  6 00:34:21 desktop1 kernel: scsi 4:0:0:1: Direct-Access     IET      VIRTUAL-DISK     0001 PQ: 0 ANSI: 5
May  6 00:34:21 desktop1 kernel: sd 4:0:0:1: Attached scsi generic sg3 type 0
May  6 00:34:21 desktop1 kernel: sd 4:0:0:1: [sdb] 196608 512-byte logical blocks: (100 MB/96.0 MiB)
May  6 00:34:21 desktop1 kernel: sd 4:0:0:1: [sdb] Write Protect is off
May  6 00:34:21 desktop1 kernel: sd 4:0:0:1: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
May  6 00:34:21 desktop1 kernel: sdb: unknown partition table
May  6 00:34:21 desktop1 kernel: sd 4:0:0:1: [sdb] Attached SCSI disk

#  預設開機啟動掛載
[root@desktop1 ~]# chkconfig iscsi on
[root@desktop1 ~]# chkconfig iscsid on

因為裝置是 /dev/sdb 所以這個就是我們可以操作的硬碟資訊。