
Parallel computing vs distributed computing แบบสั้นๆ
Parallel Computing
ในยุคแรกๆที่ computer เกิดมาจะเป็น computer ที่ execute ได้แค่ 1 process เท่านั้นในเวลาเดียวกัน (Sequential computing) เมื่อเทคโนโลยีพัฒนาดีขึ้น เขาจึงพัฒนา performance ให้ดีขึ้นโดยที่ 1 computer ทำได้หลาย process ในเวลาเดียวกัน ก็เลยเกิด parallel computing ขึ้นมา
จุดเด่นของ Parallel Computing ก็คือ
- คือการมีหลาย tasks ในหลาย processors และอยู่ใน computer เครื่องเดียวกัน
- Memory อาจจะแชร์หรือใช้แยกกันก็ได้
- Processors คุยหากันผ่าน bus
ข้อดี
- Save time and money: เพราะในช่วงเวลาเดียวกันสามารถทำได้หลาย task จึงประหยัดเวลามากขึ้น ลดเวลาใช้ resource ก็ถูกลงไปอีก
- ใช้สำหรับงาน High performance, complex problem
ตัวอย่าง Parallel computing:
smartphones, laptops, desktop, supercomputer
note: Multithreading เป็น parallel computing software method ที่ทำงานได้ดีใน parallel computer system
Distributed Computing
จุดเด่นของ Distributed Computing ก็คือ
- มีหลาย tasks ที่ต้อง execute เหมือนกัน parallel computing แต่ต่างที่มี computer หลายเครื่องช่วยกันทำแทน
- Memory ไม่แชร์หากัน
- Computer จะคุยหากันผ่าน message ข้าม network
- Architecture model ตัวอย่างเช่น client-server, peer-to-peer
ข้อดี
- Scalability: เพราะแค่เพิ่ม computer ก็ขยายระบบได้แล้ว
- Reliability: ถ้า computer ตัวหนึ่งพัง ก็ไม่กระทบกับเครื่องอื่น
ตัวอย่าง Distributed Computing:
- Apache Hadoop เป็น framework ที่มีทั้ง distributed processing และ distributed storage
- P2P file-sharing เช่น BitTorrent
- Cryptocurrency processors เช่นใน Bitcoin
ควรเลือกใช้ Parallel computing หรือ Distributed computing ดี ?
Parallel computing มี CPUs ที่ลิมิต ในขณะที่ distributed computing จะ scale out ได้ดีกว่าและช่วยในการ process ข้อมูลขนาดใหญ่ได้ดีกว่า
ในทางกลับกัน หากไซส์ข้อมูลพอเหมาะกับ memory ใน computer 1 เครื่องขึ้นมา Parallel computing อาจให้ผลที่ดีกว่าในเรื่องของความเร็ว เพราะ processor สามารถคุยกันผ่าน shared memory ได้ แต่ distributed computing เขาต้องคุยผ่าน network อีกที
Ref:
- Advanced Algorithms and Data Structures
- https://www.khanacademy.org/computing/ap-computer-science-principles/algorithms-101/x2d2f703b37b450a3:parallel-and-distributed-computing/a/parallel-computing
- https://www.hp.com/us-en/shop/tech-takes/parallel-computing-and-its-modern-uses
- https://www.geeksforgeeks.org/difference-between-parallel-computing-and-distributed-computing/

Leave a comment