Samstag, 7. Mai 2011

CS6223 愛國教育,兩敗俱傷

Wan Chin: 愛國教育,兩敗俱傷

中共在香港推動愛國教育,只會令香港和中共兩敗俱傷。中共要推動國民意識,必須自身已經繼承文化傳統,建立國族認同,目前中共只以暴政來令人民屈從一黨專政,為奴為婢,在大陸仍有點作用,在香港卻無益。

與香港相比,大陸是經濟凶狠、道德陷落和政治腐敗之地,除非大陸政府有憲政共和議程及崇高的道德感召,否則無法令香港人信服大陸。

香港是資訊公開及輿論自由之地,即使是小學生,也只會口是心非地順從所謂愛國教育,更為憎恨中共。

愛國教育得到的是對中共的憎恨,對香港的捨棄,正是兩敗俱傷。 香港的政治動員力,並非來自愛中共,而是來自愛香港,愛一個基礎優良而奮力前進的香港。

本土意識有助香港建設,更有助中共的安全。香港需要的政治家,並非那些向中共叩頭而令大家兩敗俱傷的政治家,香港需要的是可以抵禦中共的愚昧政治,可以代表香港與中共締約和好、互相裨益的政治家。

陳雲:來港產子規範化——新移民問題與香港族群意識議
http://forum12.hkgolden.com/view.aspx?type=CA&message=2966368


CS6223
Distributed Systems
Tutorial on transaction processing

1. a) What is a transaction?
See definition in lecture notes.

b) Why might the execution of transactions interleave with each other?
Transactions are submitted by client programs from different sites (each transaction operation is an RPC). Transactions from different clients are concurrent.

2. A server manages data items a¬1, a2, …, an. Transactions T and U are as follows, read(i) returns value of ai, write(i, val) assigns val to ai:

T U
read(i)
read(j); read(k);
read(i); write(i,55);
write(j, 44); read(j);
write(i,33); write(k, 66);
(a) give 3 serially equivalent interleavings of T and U.
(b) give an example of “lost update” by interleaving T and U.
(c) give an example of “inconsistent retrievals”.

Answer: see lecture notes
3. Two phase locking requires that once a transaction has released a lock on a data item, it is not allowed to obtain any more locks.
(a) Give an example to explain why the two phases of locking are required to ensure serial equivalence.
(b) Suppose two types of lock, read-lock and write-lock, are used. Since read-locks are compatible with each other, do you think a read-only transaction can release read-lock on a data item immediately after a read operation?

Answer:
a) If we use the simple locking method (NOT 2Phase locking), the lock on a data item will be released immediately after the completion of a read or write operation. Another transaction could obtain the lock on this data item and access the data. Therefore, non-serializability could occur.

By using 2Phase locking, the above situation will not happen. The lock on a data item will not be released until this transaction doesn’t access data anymore.

b) no. read-only transactions still need to hold the lock on all data items until the transactions don’t access data anymore.
See the “inconsistent retrieval” example, where the “retrieval” transaction consists of only read operations. If 2Phase locking is not followed, read operations of the transaction may read inconsistent data.

Keine Kommentare: