owned this note changed 7 years ago
Linked with GitHub

2018q1 Homework1 (phonebook)

contributed by < sabishi >
向大家學習

Reviewed by catpig1630

  • 可以試著參考 ryanpatiency 同學的詳細解說完成這份作業

Reviewed by f74034067

  • 可以試著從大家都有做的降低 entry size 著手

安裝Lubuntu 17.10

  • 準備工作
    我使用的是 Sandisk CZ80 16GB 的隨身碟
    並用 Rufus 軟體將 Lubuntu17.10(amd64)ISO 光碟開機映像檔製作為 USB 開機碟

  • 在安裝過程中遇到的問題
    本來想嘗試在 UEFI mode 下安裝,但由於開機時無法進入 Lubuntu 安裝畫面
    所以我後來改成 Legacy mode 下安裝,才得以安裝

  • 原生的 Windows 10 是安裝在 SSD,lubuntu 是裝在硬碟(切割約 50GB 的磁碟空間)

系統環境

lucifer@lucifer-Aspire-E5-575G:~$ uname -r
4.13.0-36-generic
lucifer@lucifer-Aspire-E5-575G:~$ lscpu
Architecture:        x86_64
CPU 作業模式:       32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
每核心執行緒數:     2
每通訊端核心數:     2
Socket(s):           1
NUMA 節點:          1
供應商識別號:       GenuineIntel
CPU 家族:           6
型號:               142
Model name:          Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
製程:               9
CPU MHz:            2700.000
CPU max MHz:         3100.0000
CPU min MHz:         400.0000
BogoMIPS:            5424.00
虛擬:               VT-x
L1d 快取:           32K
L1i 快取:           32K
L2 快取:            256K
L3 快取:            3072K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti retpoline intel_pt rsb_ctxsw tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp

原始實驗紀錄

  • 清空快取
$ echo 1 | sudo tee /proc/sys/vm/drop_caches
  • 部份輸出
$ sudo make cache-test
​​​​Performance counter stats for './phonebook_orig' (100 runs):

​​​​     5,859,068      cache-misses              #   95.175 % of all cache refs      ( +-  0.07% )
​​​​     6,156,071      cache-references                                              ( +-  0.08% )
​​​​   345,044,188      instructions              #    1.45  insn per cycle           ( +-  0.02% )
​​​​   237,301,062      cycles                                                        ( +-  0.08% )

​​​​   0.077279138 seconds time elapsed                                          ( +-  0.48% )
$ sudo make-plot

image alt

學習 C 語言和資料結構

由於我沒有學過任何程式,所以目前作業的部份只能做到這邊
希望趕快對C 語言有些認識及深入了解其他資料結構後,可以再度回來編輯這份文件

好!我等你

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
jserv

Select a repo