目前分類:演算法/資料結構/計算理論/系統程式 (20)

瀏覽方式: 標題列表 簡短摘要

設計可重入和執行緒安全的程式碼

Writing Reentrant and Thread-Safe Code

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

Search and Replace Recursively using sed and grep on Linux/Mac

 

Bluelove1968 發表在 痞客邦 留言(1) 人氣()

Quick Reference Cards 

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

grep 語法

  1. grep 簡介

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

 

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

★ USB 驅動程式「libusb 函式庫」的介紹及其使用範例 ★

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

量子傳訊,絕對機密
BEST-KEPT SECRETS

利用量子技術來傳送秘密鑰匙, 資料的保密將更為安全。

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

Pthread 優先權的設定範例

pthread priority setting

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

POSIX Threads Programming

 

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

Multi-Threaded Programming With POSIX Threads

Table Of Contents:

  1. Before We Start...
  2. What Is a Thread? Why Use Threads?
  3. Creating And Destroying Threads
  4. Synchronizing Threads With Mutexes
    1. What Is A Mutex?
    2. Creating And Initializing A Mutex
    3. Locking And Unlocking A Mutex
    4. Destroying A Mutex
    5. Using A Mutex - A Complete Example
    6. Starvation And Deadlock Situations
  5. Refined Synchronization - Condition Variables
    1. What Is A Condition Variable?
    2. Creating And Initializing A Condition Variable
    3. Signaling A Condition Variable
    4. Waiting On A Condition Variable
    5. Destroying A Condition Variable
    6. A Real Condition For A Condition Variable
    7. Using A Condition Variable - A Complete Example
  6. "Private" thread data - Thread-Specific Data
    1. Overview Of Thread-Specific Data Support
    2. Allocating Thread-Specific Data Block
    3. Accessing Thread-Specific Data
    4. Deleting Thread-Specific Data Block
    5. A Complete Example
  7. Thread Cancellation And Termination
    1. Canceling A Thread
    2. Setting Thread Cancellation State
    3. Cancellation Points
    4. Setting Thread Cleanup Functions
    5. Synchronizing On Threads Exiting
    6. Detaching A Thread
    7. Threads Cancellation - A Complete Example
  8. Using Threads For Responsive User Interface Programming
    1. User Interaction - A Complete Example
  9. Using 3rd-Party Libraries In A Multi-Threaded Application
  10. Using A Threads-Aware Debugger

Before We Start...

This tutorial is an attempt to help you become familiar with multi-threaded programming with the POSIX threads (pthreads) library, and attempts to show how its features can be used in "real-life" programs. It explains the different tools defined by the library, shows how to use them, and then gives an example of using them to solve programming problems. There is an implicit assumption that the user has some theoretical familiarity with paralell programming (or multi-processing) concepts. Users without such background might find the concepts harder to grasp. A seperate tutorial will be prepared to explain the theoreticl background and terms to those who are familiar only with normal "serial" programming.

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

論P,NP,NP-hard,NP-complete問題

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

如何寫一個會自我複製(self-reproduce)的程式

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

演算法(Algorithm)——一詞的由來

Algorithm(演算法)一詞本身就十分有趣。初看起來,這個詞好像是某人打算要寫「Logarithm」(對數)一詞但卻把頭四個字母寫的前後顛倒 了。這個詞一直到1957年之前在Webster's New World Dictionary(《韋氏新世界詞典》)中還未出現,我們只能找到帶有它 的古代涵義的較老形式的「Algorism」(算術),指的是用阿拉伯數字進行算術運算的過程。在中世紀時,珠算家用算盤進行計算,而算術家用算術進行計 算。中世紀之後,對這個詞的起源已經拿不準了,早期的語言學家試圖推斷它的來歷,認為它是從把algiros(費力的)+arithmos(數位)組合起 來派生而成的,但另一些人則不同意這種說法,認為這個詞是從喀斯迪爾國王Algor」派生而來的。

Bluelove1968 發表在 痞客邦 留言(1) 人氣()

Lex 與 Yacc 介紹

Ashish Bansal

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

語法剖析自動生成器CScanGenner的設計與實現

 

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

學習編譯原理的相關建議

編譯原理一般認為是較難的一門課.從網上的評論來看,有人說學了一年半軟體理論,就一門編譯看不懂;有人甚至說它是大本軟體課程裡最難的一門;有人抱怨國內的編譯教材沒有一本容易懂的。

從筆者學習實踐來看,第一次學了一個多月,理論部分一知半解,第二次學了一星期,基本看懂詞 法分析的理論部分,語法分析就一知半解了,第三次學了一星期,才基本看懂詞法分析和語法分析.由此看來,這門課確實有難度.網上有的帖子,把編譯器的編寫 搞得高深莫測一般,似乎難度極大,非常人能及.

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

一道編譯原理習題及答案

以下是一道編譯原理習題,很具有代表性。

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

從lex&yacc說到編譯器(1.正規表達式)

學過編譯原理的朋友肯定都接觸過LEX這個小型的詞法掃瞄工具. 但是卻很少有人真正把LEX用在自己的程式裡. 在構造專業的編譯器的時候,常常需要使 用到lexyacc. 正是因為這兩個工具,使得我們編寫編譯器,解釋器等工具的時候工作變得非常簡單.不過話說回來,會使用lexyacc的人也確 實不簡單. Lexyacc裡面牽涉到一系列的編譯原理的理論知識,不是簡單地看看書就能搞懂的. 本文只是簡單地介紹一下lexyacc的使用方 .相關編譯理請查看本科教材.

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

《編譯原理》有限自動機的 C 程式語言範例

 

Bluelove1968 發表在 痞客邦 留言(0) 人氣()

編譯原理學習導論

Bluelove1968 發表在 痞客邦 留言(0) 人氣()