Selasa, 05 Januari 2010

single vs multi cycle processor 2



• In this implementation, every instruction requires one
cycle to complete -> cycle time = time taken for the
slowest instruction
• If the execution was broken into multiple (faster)
cycles, the shorter instructions can finish sooner

• Dalam pelaksanaannya, setiap instruksi memerlukan satu
siklus untuk melengkapi -> siklus waktu = waktu yang dibutuhkan untuk
paling lambat instruksi
• Jika eksekusi itu pecah menjadi beberapa (lebih cepat)
siklus, instruksi yang lebih pendek dapat menyelesaikan lebih cepat

private and shared L2 cache

• Advantages of a shared L2 cache:
- efficient dynamic allocation of space to each core
- data shared by multiple cores is not replicated
- every block has a fixed "home" - hence, easy to find
the latest copy
• Advantages of a private L2 cache:
- quick access to private L2 - good for small working sets
- private bus to private L2 -> less contention

• Keuntungan dari shared L2 cache:
- dinamis efisien alokasi ruang untuk masing-masing inti
- data bersama oleh beberapa core tidak direplikasi
- setiap blok memiliki tetap "rumah" - maka, mudah untuk menemukan
salinan terbaru

• Keuntungan dari cache L2 pribadi:
- akses cepat ke L2 pribadi - baik untuk bekerja kecil set
- bus swasta swasta L2 -> kurang pendapat

fine-grained and simultaneous multithreading

• Superscalar processor has high under-utilization – not enough work every
cycle, especially when there is a cache miss
• Fine-grained multithreading can only issue instructions from a single thread
in a cycle – can not find max work every cycle, but cache misses can be tolerated
• Simultaneous multithreading can issue instructions from any thread every
cycle – has the highest probability of finding work for every issue slot

--------------------------------------------------------------

• Superscalar prosesor memiliki tinggi di bawah pemanfaatan - tidak cukup bekerja setiap
siklus, terutama jika ada cache miss
• Fine-grained multithreading hanya dapat dikeluarkan instruksi dari satu thread
dalam satu siklus - tidak dapat menemukan pekerjaan maks setiap siklus, namun meleset cache dapat ditoleransi
• Simultaneous multithreading dapat mengeluarkan instruksi dari setiap thread setiap
siklus - memiliki probabilitas tertinggi mencari pekerjaan untuk setiap masalah slot

multithreading

• Until now, we have executed multiple threads of an
application on different processors > can multiple
threads execute concurrently on the same processor?

• Why is this desireable?
> inexpensive – one CPU, no external interconnects
> no remote or coherence misses (more capacity misses)

• Why does this make sense?
> most processors can’t find enough work – peak IPC
is 6, average IPC is 1.5!
> threads can share resources - we can increase
threads without a corresponding linear increase in area

---------------------------------------------------------------

. Hingga kini, kami telah melaksanakan beberapa benang dari
aplikasi pada prosesor yang berbeda> bisa beberapa
benang mengeksekusi bersamaan pada prosesor yang sama?

. Mengapa diinginkan ini?
> Murah satu CPU, tidak ada interkoneksi eksternal
> Tidak terpencil atau koherensi meleset (meleset kapasitas yang lebih besar)

. Mengapa hal ini masuk akal?
> Kebanyakan prosesor tidak menemukan cukup bekerja - puncak IPC
adalah 6, IPC rata-rata adalah 1,5!
> Benang dapat berbagi sumber daya kita dapat meningkatkan
benang tanpa peningkatan linier yang sesuai di daerah

lock

• Applications have phases (consisting of many instructions)
that must be executed atomically, without other parallel
processes modifying the data
• A lock surrounding the data/code ensures that only one
program can be in a critical section at a time
• The hardware must provide some basic primitives that
allows us to construct locks with different properties

-----------------------------------------------------------------

• Aplikasi mempunyai fase (terdiri dari banyak instruksi)
yang harus dijalankan atom, tanpa paralel lain
proses memodifikasi data
• Sebuah kunci yang mengelilingi data / kode memastikan bahwa hanya satu
program dapat di bagian kritis pada suatu waktu
• Perangkat keras harus memberikan primitif dasar yang
memungkinkan kita untuk membangun kunci dengan sifat yang berbeda

M E S I

Modified
The cache line is present only in the current cache, and is dirty; it has been modified from the value in main memory. The cache is required to write the data back to main memory at some time in the future, before permitting any other read of the (no longer valid) main memory state. The write-back changes the line to the Exclusive state.

Exclusive
The cache line is present only in the current cache, but is clean; it matches main memory. It may be changed to the Shared state at any time, in response to a read request. Alternatively, it may be changed to the Modified state when writing to it.

Shared
Indicates that this cache line may be stored in other caches of the machine & is "clean" ; it matches the main memory. The line may be discarded (changed to the Invalid state) at any time.

Invalid
Indicates that this cache line is invalid.


-----------------------------------------------------------

Dimodifikasi
Garis cache hadir hanya dalam cache saat ini, dan kotor; ini telah dimodifikasi dari nilai di memori utama. Cache dibutuhkan untuk menulis data kembali ke memori utama pada suatu waktu di masa depan, sebelum mengizinkan membaca lain (yang tidak berlaku lagi) memori utama negara. Write-back yang mengubah baris ke negara Eksklusif.

Eksklusif
Garis cache hadir hanya dalam cache saat ini, tetapi bersih; kesesuaiannya memori utama. Mungkin berubah menjadi negara Shared setiap saat, sebagai tanggapan atas permintaan membaca. Atau, mungkin akan diubah ke negara Modifikasi saat menulis untuk itu.

Shared
Menunjukkan bahwa baris cache ini dapat disimpan dalam cache lain dari mesin & adalah "bersih"; itu sesuai dengan memori utama. Garis dapat dibuang (berubah menjadi negara tidak valid) pada setiap saat.

Valid
Menunjukkan bahwa baris cache ini tidak valid.

contoh snooping

• P1 reads X: not found in cache-1, request sent on bus, memory responds,
X is placed in cache-1 in shared state

• P2 reads X: not found in cache-2, request sent on bus, everyone snoops
this request, cache-1does nothing because this is just a read request,
memory responds, X is placed in cache-2 in shared state

• P1 writes X: cache-1 has data in shared
state (shared only provides read perms),
request sent on bus, cache-2 snoops and
then invalidates its copy of X, cache-1
moves its state to modified

• P2 reads X: cache-2 has data in invalid
state, request sent on bus, cache-1 snoops
and realizes it has the only valid copy, so it
downgrades itself to shared state and
responds with data, X is placed in cache-2
in shared state

----------------------------------------------------------------------

• P1 dibaca X: tidak ditemukan dalam cache-1, permintaan yang dikirimkan pada bus, memori menjawab,
X ditempatkan dalam cache-1 di negara berbagi

• P2 dibaca X: tidak ditemukan dalam cache-2, permintaan yang dikirimkan pada bus, semua orang snoops
permintaan ini, cache-1does apa-apa karena ini hanya sebuah permintaan membaca,
menanggapi memori, X ditempatkan dalam cache-2 di negara berbagi

• P1 menulis X: cache-1 memiliki data dalam berbagi
negara (shared hanya menyediakan membaca perms),
permintaan yang dikirimkan pada bus, cache-2 snoops dan
kemudian membatalkan yang salinan X, cache-1
bergerak dengan negara untuk diubah

• P2 dibaca X: cache-2 memiliki data yang tidak valid
negara, permintaan yang dikirimkan pada bus, cache-1 snoops
dan menyadari itu hanya memiliki salinan sah, sehingga
mengerdilkan dirinya sendiri untuk berbagi negara dan
merespons dengan data, X ditempatkan dalam cache-2
di negara berbagi