ต้องการแนวคิดไปเขียนโปรแกรมนะค่ะ รบกวนพี่พี่ที่รู้ช่วยด้วยนะค่ะ เขียนโปรแกรมเพื่อจำลองการทำงานของแคชย์แบบ N-Way Set Associative ซึ่งมีค่า E=N (มีแคชย์เพียงหนึ่ง Level) สำหรับเครื่องที่มีความยาวแอดเดรส ขนาด 16 Bit โดยให้ผู้ใช้สามารถกำหนด o ขนาดของแคชย์ (Cache Size in Bytes) เช่น 1024 Bytes o ขนาดของแคชย์ไลน์ (Cache line size in Bytes) เช่น 32 Bytes o จำนวน Way (ค่า N) เช่น 2, 4 o Hit Time (หน่วยเป็น Cycles) เช่น 2 o Miss Penalty (หน่วยเป็น Cycles) เช่น 10 o Clock rate (หน่วยเป็น GHz) เช่น 1.8 Input ของโปรแกรม เป็น Text File ซึ่งมีรายการเรียกข้อมูลโดยการ อ่าน (r) และ เขียน (w) แอดเดรสต่างๆ เป็นบรรทัด ดังนี้ r 0x5480 w 0x5484 r 0x5488 r 0x5482 r 0x5480 r 0x5484 r 0x5488 w 0x5410 r 0x5400 r 0x5404 Output ของโปรแกรม เป็น สรุปค่าประสิทธิภาพของ memory access เป็น ค่า Hit Rate, Miss Rate และ Average Memory Access Time (หน่วยเป็น milliseconds หรือ nanoseconds ก็ได้)
Hiring! บริษัทที่น่าสนใจ
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand
ก็เขียน
lew Thu, 28/09/2006 - 11:19
ก็เขียน Simulator ธรรมดาหนิครับ ติดตรงไหนล่ะ
การถามการบ้านเป็นเรื่องดีนะครับ แต่ก็ควรอธิบายถึงเหตุผลที่เราทำไม่ได้ เช่นว่าคิดไปถึงไหนแล้ว ติดตรงไหน ทำไมตรงนั้นถึงได้ผลไม่ตรงอะไรอย่างนั้น
ในกรณีที่ไม่เข้าใจโจทย์เลยแบบไม่มีไอเดียเลยว่าจะทำยังไง ถามอาจารย์น่าจะง่ายกว่าครับ ------ LewCPE
ขอโทษนะค่
UKnow Thu, 28/09/2006 - 11:45
ขอโทษนะค่ะ พี่ lew ตอนแรกกลัวบอกวิธีคิดไปแล้วพี่จะงง นะค่ะ ที่คิดไว้นะค่ะ จากโจทย์ที่บอก Cache Size in Bytes มา 1024 Bytes = 256 words = 2^8 words = 2^8 blocks ทำให้รู้ค่า index = 8 ในส่วนของ Cache line size in Bytes เป็น 32 Bytes = 2^5 ทำให้รู้ค่า offset size = 2 bits อย่างนี้ถูกไหมค่ะ แล้ว วิธี N-Way Set Associative นี้ มี tag + offset size + bit แค่นี้รึเปล่าค่ะ
งงครับ
lew Thu, 28/09/2006 - 12:03
งงครับ ทำไม ขนาด Cache เป็น 256 word????
ค่าพวกขนาดแคช และขนาดของแต่ละบล็อกผู้ใช้จะเป็นคนกำหนดมา ตรงนี้ไม่แน่ใจว่าโจทย์เต็มๆ เป็นยังไง แต่เข้าใจว่าคงให้ขึ้นพรอมพ์ถามค่าจากผู้ใช้เอาน่ะครับ ดังนั้นเวลาคิดเลยต้องคิดในแบบรูปทั่วไป เมื่ออ่านรูปแบบการใช้เมมโมรีจากไฟล์แล้วจึงค่อยรายงานค่าที่โจทย์ถาม (Hit Rate, Miss Rate และ Average Memory Access Time)
สำหรับเรื่อง N-Way Set Associate นี่ไปอ่านต่อที่ Wikipedia ดูนะครับ ------ LewCPE
เจอที่ pcguide
sugree Fri, 29/09/2006 - 09:56
เจอที่ pcguide ก็ละเอียดใช้ได้
หรือถ้ามึนหนักมากลองดู Dinero IV เป็นตัวอย่างก็ได้ (พยายามทำเองก่อนนะ)
ขอบคุณมาก
UKnow Fri, 29/09/2006 - 11:40
ขอบคุณมากเลยนะค่ะ กำลังลองทำอยู่ค่ะ ดูข้อมูลจาก link ที่พี่ lew และพี่ sugree ให้ไว้นะค่ะ คิดว่าเข้าใจมากขึ้นแล้วค่ะ