Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Computer Systems and Networks · ⁨ระบบคอมพิวเตอร์และเครือข่าย⁩

AP Computer Science Principles · Topic 4 · ⁨หัวข้อ 4⁩

Video lesson for this topic · ⁨บทเรียนวิดีโอสำหรับหัวข้อนี้⁩ Open the video page · ⁨เปิดหน้าวิดีโอ⁩
7:47

ระบบคอมพิวเตอร์และเครือข่าย

ผู้คนเรียกมันว่าคลาวด์. แต่มันไม่ใช่เมฆ. กล่องนี้ตั้งอยู่ในบ้านของใครสักคน: รوتر, รับข้อมูลจากโทรศัพท์ของคุณและส่งต่อ. ปลั๊ก这个是อีกด้านหนึ่ง…

English narration · English + 中文 subtitles burned in · ⁨การบรรยายภาษาอังกฤษ · คำบรรยายภาษาอังกฤษ + 中文 ลอยตัวบนภาพ⁩

4.1

The Internet · ⁨อินเทอร์เน็ต⁩

Syllabus · ⁨หลักสูตร⁩
English

Enduring Understanding (CSN-1): Computer systems and networks facilitate the transfer of data.

Learning Objective CSN-1.A: Explain how computing devices work together in a network. [Skill 5.A]

  • CSN-1.A.1 A computing device is a physical artifact that can run a program. Some examples include computers, tablets, servers, routers, and smart sensors.
  • CSN-1.A.2 A computing system is a group of computing devices and programs working together for a common purpose.
  • CSN-1.A.3 A computer network is a group of interconnected computing devices capable of sending or receiving data.
  • CSN-1.A.4 A computer network is a type of computing system.
  • CSN-1.A.5 A path between two computing devices on a computer network (a sender and a receiver) is a sequence of directly connected computing devices that begins at the sender and ends at the receiver.
  • CSN-1.A.6 Routing is the process of finding a path from sender to receiver.
  • CSN-1.A.7 The bandwidth of a computer network is the maximum amount of data that can be sent in a fixed amount of time.
  • CSN-1.A.8 Bandwidth is usually measured in bits per second.

Learning Objective CSN-1.B: Explain how the Internet works. [Skill 5.A]

  • CSN-1.B.1 The Internet is a computer network consisting of interconnected networks that use standardized, open (nonproprietary) communication protocols.
  • CSN-1.B.2 Access to the Internet depends on the ability to connect a computing device to an Internet-connected device.
  • CSN-1.B.3 A protocol is an agreed-upon set of rules that specify the behavior of a system.
  • CSN-1.B.4 The protocols used in the Internet are open, which allows users to easily connect additional computing devices to the Internet.
  • CSN-1.B.5 Routing on the Internet is usually dynamic; it is not specified in advance.
  • CSN-1.B.6 The scalability of a system is the capacity for the system to change in size and scale to meet new demands.
  • CSN-1.B.7 The Internet was designed to be scalable.

Learning Objective CSN-1.C: Explain how data are sent through the Internet via packets. [Skill 5.A]

  • CSN-1.C.1 Information is passed through the Internet as a data stream. Data streams contain chunks of data, which are encapsulated in packets.
  • CSN-1.C.2 Packets contain a chunk of data and metadata used for routing the packet between the origin and the destination on the Internet, as well as for data reassembly.
  • CSN-1.C.3 Packets may arrive at the destination in order, out of order, or not at all.
  • CSN-1.C.4 IP, TCP, and UDP are common protocols used on the Internet.

Learning Objective CSN-1.D: Describe the differences between the Internet and the World Wide Web. [Skill 5.A]

  • CSN-1.D.1 The World Wide Web is a system of linked pages, programs, and files.
  • CSN-1.D.2 HTTP is a protocol used by the World Wide Web.
  • CSN-1.D.3 The World Wide Web uses the Internet.
ไทย

ความเข้าใจที่ยั่งยืน (CSN-1): ระบบคอมพิวเตอร์และเครือข่ายเอื้อต่อการถ่ายโอนข้อมูล

วัตถุประสงค์การเรียนรู้ CSN-1.A: อธิบายวิธีการทำงานร่วมกันของอุปกรณ์ประมวลผลในเครือข่าย [ทักษะ 5.A]

  • CSN-1.A.1 อุปกรณ์ประมวลผล คือวัตถุทางกายภาพที่สามารถรันโปรแกรมได้ ตัวอย่างเช่น คอมพิวเตอร์ แท็บเล็ต เซิร์ฟเวอร์ รوتر และเซ็นเซอร์อัจฉริยะ
  • CSN-1.A.2 ระบบประมวลผล คือกลุ่มของอุปกรณ์ประมวลผลและโปรแกรมที่ทำงานร่วมกันเพื่อวัตถุประสงค์的共同
  • CSN-1.A.3 เครือข่ายคอมพิวเตอร์ คือกลุ่มอุปกรณ์ประมวลผลที่เชื่อมต่อกันซึ่งสามารถส่งหรือรับข้อมูลได้
  • CSN-1.A.4 เครือข่ายคอมพิวเตอร์เป็นประเภทหนึ่งของระบบการประมวลผล
  • CSN-1.A.5 เส้นทาง ระหว่างอุปกรณ์ประมวลผลสองเครื่องบนเครือข่ายคอมพิวเตอร์ (ผู้ส่งและผู้รับ) คือลำดับของอุปกรณ์ประมวลผลที่เชื่อมต่อกันโดยตรง ซึ่งเริ่มต้นที่ผู้ส่งและสิ้นสุดที่ผู้รับ
  • CSN-1.A.6 การกำหนดเส้นทาง (Routing) คือกระบวนการค้นหาเส้นทางจากผู้ส่งไปยังผู้รับ
  • CSN-1.A.7 แบนด์วิดท์ (bandwidth) ของเครือข่ายคอมพิวเตอร์คือปริมาณข้อมูลสูงสุดที่สามารถส่งได้ในระยะเวลาที่กำหนด
  • CSN-1.A.8 แบนด์วิดท์มักวัดเป็นบิตต่อวินาที

จุดประสงค์การเรียนรู้ CSN-1.B: อธิบายการทำงานของอินเทอร์เน็ต [ทักษะ 5.A]

  • CSN-1.B.1 อินเทอร์เน็ตคือเครือข่ายคอมพิวเตอร์ที่ประกอบด้วยเครือข่ายย่อยที่เชื่อมโยงกันและใช้โปรโตคอลการสื่อสารที่เป็นมาตรฐานและเปิด (nonproprietary)
  • CSN-1.B.2 การเข้าถึงอินเทอร์เน็ตขึ้นอยู่กับความสามารถในการเชื่อมต่อบุคลากรหรืออุปกรณ์คำนวณเข้ากับอุปกรณ์ที่เชื่อมต่ออินเทอร์เน็ตแล้ว
  • CSN-1.B.3 โปรโตคอล (protocol) คือชุดกฎ agreed-upon ที่กำหนดพฤติกรรมของระบบ
  • CSN-1.B.4 โปรโตคอลที่ใช้ในอินเทอร์เน็ตเป็น open ซึ่งช่วยให้ผู้ใช้สามารถเชื่อมต่ออุปกรณ์คำนวณเพิ่มเติมเข้ากับอินเทอร์เน็ตได้ง่าย
  • CSN-1.B.5 การ routing ในอินเทอร์เน็ตมักเป็นแบบ dynamic; ไม่ได้กำหนดไว้ล่วงหน้า
  • CSN-1.B.6 scalability ของระบบคือความสามารถของระบบในการเปลี่ยนแปลงขนาดและสเกลเพื่อตอบสนองความต้องการใหม่
  • CSN-1.B.7 อินเทอร์เน็ตถูกออกแบบมาเพื่อให้มี scalability

จุดประสงค์การเรียนรู้ CSN-1.C: อธิบายวิธีการส่งข้อมูลผ่านอินเทอร์เน็ตโดยใช้แพ็กเก็ต [ทักษะ 5.A]

  • CSN-1.C.1 ข้อมูลถูกส่งผ่านอินเทอร์เน็ตในรูปแบบของ data stream Data streams ประกอบด้วยchunks ของข้อมูลที่ encapsulate อยู่ใน packets
  • CSN-1.C.2 Packets มี chunks ของข้อมูลและ metadata ที่ใช้ในการ routing แพ็กเก็ตระหว่างต้นทางและปลายทางบนอินเทอร์เน็ต รวมถึงสำหรับการประกอบข้อมูลกลับ
  • CSN-1.C.3 Packets อาจมาถึงปลายทางตามลำดับ, ไม่ตามลำดับ, หรืออาจไม่มาถึงเลยก็ได้
  • CSN-1.C.4 IP, TCP และ UDP เป็นโปรโตคอลทั่วไปที่ใช้บนอินเทอร์เน็ต

จุดประสงค์การเรียนรู้ CSN-1.D: อธิบายความแตกต่างระหว่างอินเทอร์เน็ตกับ World Wide Web [ทักษะ 5.A]

  • CSN-1.D.1 World Wide Web เป็นระบบของหน้าเว็บ programs และไฟล์ที่เชื่อมโยงกัน
  • CSN-1.D.2 HTTP เป็นโปรโตคอลที่ใช้โดย World Wide Web
  • CSN-1.D.3 World Wide Web ใช้ inetenet

Source: College Board AP Course and Exam Description · ⁨แหล่งที่มา: คำอธิบายหลักสูตรและข้อสอบ College Board AP⁩

English

The Internet 互联网 is a global network of networks. Data travels as packets 数据包 – small chunks that are sent separately and reassembled at the destination. Two ideas make it work at scale:

  • Protocols 协议 are agreed rules for communication. IP (Internet Protocol) addresses and routes packets; TCP reassembles them in order and re-requests lost ones; HTTP carries web pages; DNS translates a name like example.com into an IP address.
  • Redundancy 冗余 and routing: there are many possible paths between two points, so if one path fails, packets take another. This makes the Internet fault-tolerant 容错.

The Internet is designed to be open and scalable – built on standards anyone can use, so it keeps working as billions of devices join. Bandwidth 带宽 is the amount of data a connection can carry per second.

ไทย
ขั้วต่อ Ethernet RJ45 – สายส่งข้อมูลทางกายภาพลำเลียงแพ็กเก็ตข้ามอินเทอร์เน็ต
ขั้วต่อ Ethernet RJ45 – สายส่งข้อมูลทางกายภาพลำเลียงแพ็กเก็ตข้ามอินเทอร์เน็ต

อินเทอร์เน็ต เป็นเครือข่ายระดับโลกที่เชื่อมโยงกัน ข้อมูลเดินทางในรูปแบบของ แพ็กเก็ต – ส่วนย่อยเล็กๆ ที่ถูกส่งแยกต่างหากและประกอบกลับเข้าด้วยกันที่ปลายทาง แนวคิดสองอย่างทำให้ระบบนี้ทำงานได้ในขนาดใหญ:

อินเทอร์เน็ตคือเครือข่ายทั่วโลก; เวิลด์ไวด์เวบเป็นบริการหนึ่ง的运行บนนั้น
อินเทอร์เน็ตคือเครือข่ายทั่วโลก; เวิลด์ไวด์ไวด์เว็บคือบริการหนึ่ง运行บนนั้น
  • โปรโตคอล คือกฎเกณฑ์ agreed起来สำหรับการสื่อสาร IP (Internet Protocol) จัดการที่อยู่และลำเลียงแพ็กเก็ต; TCP ประกอบแพ็กเก็ตใหม่ตามลำดับและขอซ้ำแพ็กเก็ตที่หาย; HTTP นำส่งหน้าเว็บ; DNS แปลงชื่ออย่าง example.com ให้เป็นที่อยู่ IP
  • ความซ้ำซ้อน และการลำเลียง: มีเส้นทางที่เป็นไปได้ มากมาย ระหว่างจุดสองจุด ดังนั้นหากเส้นทางหนึ่งล้มเหลว แพ็กเก็ตจะเลือกเส้นทางอื่น ทำให้อินเทอร์เน็ตมีความ ทนทานต่อความผิดพลาด

อินเทอร์เน็ตถูกออกแบบมาเพื่อเปิดกว้างและขยายขนาดได้ – สร้างบนมาตรฐานที่ใครก็ตามสามารถใช้ เพื่อให้ระบบยังคงทำงานต่อไปเมื่ออุปกรณ์นับพันล้านเครื่องเชื่อมต่อเข้ามา แบนด์วิดท์ คือปริมาณข้อมูลที่ช่องสัญญาณสามารถลำเลียงได้ต่อวินาที

Explore · ⁨สำรวจ⁩

How data crosses the Internet in packets · ⁨ข้อมูลเดินทางบนอินเทอร์เน็ตในแพ็กเก็ตอย่างไร⁩

The Internet breaks a message into numbered packets, each addressed and routed independently (often by different paths), then reassembled at the destination. That design makes it fault-tolerant — if one route fails, packets take another. · ⁨อินเทอร์เน็ตแบ่งข้อความออกเป็น แพ็กเก็ต ที่มีหมายเลขระบุ แต่ละแพ็กเก็ตมีที่อยู่และ ถูกส่งต่อ อย่างอิสระ (มักผ่านเส้นทางที่แตกต่างกัน) แล้วประกอบกลับที่ปลายทาง การออกแบบนี้ทำให้它具有 ทนต่อข้อผิดพลาด — หากเส้นทางหนึ่งล้มเหลว แพ็กเก็ตจะ取了เส้นทางอื่น⁩

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
Internet/ˈɪntənet/ อินเทอร์เน็ต
packets/ˈpækɪts/ แพ็กเก็ต
Protocols/ˈprəʊtəkɒlz/ โปรโตคอล
Redundancy/rɪˈdʌndənsi/ ความซ้ำซ้อน
fault-tolerant/fɒlt ˈtɒlərənt/ ทนต่อข้อผิดพลาด
Bandwidth/ˈbændwɪdθ/ แบนด์วิดธ์
reliability/rɪˌlaɪəˈbɪlɪti/ ความน่าเชื่อถือ
Sequential computing/siːˈkwenʃl kəmˈpjuːtɪŋ/ การคำนวณแบบลำดับ
Parallel computing/ˈpærəlel kəmˈpjuːtɪŋ/ การคำนวณแบบขนาน
Distributed computing/ˈdɪstrɪbjuːtɪd kəmˈpjuːtɪŋ/ การคำนวณแบบกระจาย
Watch lesson · ⁨ดูบทเรียน⁩
4.2

Fault Tolerance · ⁨ความทนทานต่อความผิดพลาด⁩

Syllabus · ⁨หลักสูตร⁩
English

Enduring Understanding (CSN-1): Computer systems and networks facilitate the transfer of data.

Learning Objective CSN-1.E: For fault-tolerant systems, like the Internet: a. Describe the benefits of fault tolerance. [Skill 1.D] b. Explain how a given system is fault-tolerant. [Skill 5.A] c. Identify vulnerabilities to failure in a system. [Skill 1.D]

  • CSN-1.E.1 The Internet has been engineered to be fault-tolerant, with abstractions for routing and transmitting data.
  • CSN-1.E.2 Redundancy is the inclusion of extra components that can be used to mitigate failure of a system if other components fail.
  • CSN-1.E.3 One way to accomplish network redundancy is by having more than one path between any two connected devices.
  • CSN-1.E.4 If a particular device or connection on the Internet fails, subsequent data will be sent via a different route, if possible.
  • CSN-1.E.5 When a system can support failures and still continue to function, it is called fault-tolerant. This is important because elements of complex systems fail at unexpected times, often in groups, and fault tolerance allows users to continue to use the network.
  • CSN-1.E.6 Redundancy within a system often requires additional resources but can provide the benefit of fault tolerance.
  • CSN-1.E.7 The redundancy of routing options between two points increases the reliability of the Internet and helps it scale to more devices and more people.
ไทย

ความเข้าใจที่ยั่งยืน (CSN-1): ระบบคอมพิวเตอร์และเครือข่ายเอื้อต่อการถ่ายโอนข้อมูล

จุดประสงค์การเรียนรู้ CSN-1.E: สำหรับระบบที่ทนทานต่อความผิดพลาด เช่น อินเทอร์เน็ต: a. อธิบายประโยชน์ของความทนทานต่อความผิดพลาด [ทักษะ 1.D] b. อธิบายว่าระบบใดระบบหนึ่งมีความทนทานต่อความผิดพลาดอย่างไร [ทักษะ 5.A] c. ระบุจุดอ่อนที่อาจทำให้เกิดความล้มเหลวในระบบ [ทักษะ 1.D]

  • CSN-1.E.1 อินเทอร์เน็ตถูกออกแบบให้มีความทนทานต่อความผิดพลาด โดยมี abstraction สำหรับการ routing และการส่งข้อมูล
  • CSN-1.E.2 Redundancy คือการรวมส่วนประกอบเสริมเข้ามาซึ่งสามารถใช้เพื่อลดผลกระทบจากความล้มเหลวของระบบหากส่วนประกอบอื่นล้มเหลว
  • CSN-1.E.3 วิธีการหนึ่งที่จะบรรลุ network redundancy คือการมีมากกว่าหนึ่งเส้นทางระหว่างอุปกรณ์ที่เชื่อมต่อด้วยกันทุกคู่
  • CSN-1.E.4 หากอุปกรณ์หรือ connection บางอย่างบนอินเทอร์เน็ตล้มเหลว ข้อมูลถัดไปจะถูกส่งผ่านเส้นทางอื่น หากเป็นไปได้
  • CSN-1.E.5 เมื่อระบบสามารถรองรับความล้มเหลวและยังคงทำงานต่อไปได้ ระบบนั้นเรียกว่า fault-tolerant สิ่งนี้สำคัญเพราะองค์ประกอบของระบบซับซ้อนมักจะล้มเหลวในเวลาที่ไม่คาดคิด มักเป็นกลุ่ม และ fault tolerance ช่วยให้ผู้ใช้งานยังคงใช้เครือข่ายได้
  • CSN-1.E.6 Redundancy ภายในระบบมักต้องใช้ทรัพยากรเพิ่มเติมแต่สามารถให้ประโยชน์ด้านความทนทานต่อความผิดพลาด
  • CSN-1.E.7 Redundancy ของตัวเลือก routing ระหว่างสองจุดเพิ่มความน่าเชื่อถือของอินเทอร์เน็ตและช่วยให้อินเทอร์เน็ตขยายขนาดไปยังอุปกรณ์และผู้คนมากขึ้นได้

Source: College Board AP Course and Exam Description · ⁨แหล่งที่มา: คำอธิบายหลักสูตรและข้อสอบ College Board AP⁩

English

A system is fault-tolerant if it keeps working even when part of it fails. The Internet achieves this through redundant connections: because packets can be routed along multiple paths, the failure of one router or cable does not stop communication – traffic simply reroutes. Fault tolerance costs extra resources (the redundant paths) but greatly improves reliability 可靠性. A single path with no backup is not fault-tolerant.

ไทย
เราเตอร์ Wi-Fi: เกตเวย์ในพื้นที่ที่ลำเลียงแพ็กเก็ตไปยังอินเทอร์เน็ตวงกว้าง
เราเตอร์ Wi-Fi: เกตเวย์ในพื้นที่ที่ลำเลียงแพ็กเก็ตไปยังอินเทอร์เน็ตวงกว้าง

ระบบมีความ ทนทานต่อความผิดพลาด หากยังคงทำงานได้แม้ว่าบางส่วนจะล้มเหลว อินเทอร์เน็ตบรรลุสิ่งนี้ได้ผ่าน connections ที่ ซ้ำซ้อน: เนื่องจากแพ็กเก็ตสามารถถูกลำเลียงตามหลายเส้นทาง การล้มเหลวของเราเตอร์หรือสายเคเบิลหนึ่งไม่ขัดขวางการสื่อสาร – การจราจรจะถูกเปลี่ยนเส้นทางใหม่ ความทนทานต่อความผิดพลาดต้องใช้ทรัพยากรเพิ่มเติม (เส้นทางซ้ำซ้อน) แต่ช่วยเพิ่ม ความน่าเชื่อถือ อย่างมีนัยสำคัญ เส้นทางเดียวที่ไม่มีสำรองไม่ถือว่าทนทานต่อความผิดพลาด

การสลับแพ็กเก็ตส่งแพ็กเก็ตผ่านเส้นทางที่แยกจากกัน ทำให้เครือข่ายทนต่อการล้มเหลวของลิงก์ได้
packet switching ส่งแพ็กเก็ตผ่านเส้นทางอิสระ ทำให้เครือข่ายทนต่อการล้มเหลวของลิงก์
4.3

Parallel and Distributed Computing · ⁨การคำนวณแบบขนานและการกระจาย⁩

Syllabus · ⁨หลักสูตร⁩
English

Enduring Understanding (CSN-2): Parallel and distributed computing leverage multiple computers to more quickly solve complex problems or process large data sets.

Learning Objective CSN-2.A: For sequential, parallel, and distributed computing: a. Compare problem solutions. [Skill 1.D] b. Determine the efficiency of solutions. [Skill 1.D]

  • CSN-2.A.1 Sequential computing is a computational model in which operations are performed in order one at a time.
  • CSN-2.A.2 Parallel computing is a computational model where the program is broken into multiple smaller sequential computing operations, some of which are performed simultaneously.
  • CSN-2.A.3 Distributed computing is a computational model in which multiple devices are used to run a program.
  • CSN-2.A.4 Comparing efficiency of solutions can be done by comparing the time it takes them to perform the same task.
  • CSN-2.A.5 A sequential solution takes as long as the sum of all of its steps.
  • CSN-2.A.6 A parallel computing solution takes as long as its sequential tasks plus the longest of its parallel tasks.
  • CSN-2.A.7 The "speedup" of a parallel solution is measured in the time it took to complete the task sequentially divided by the time it took to complete the task when done in parallel.

Learning Objective CSN-2.B: Describe benefits and challenges of parallel and distributed computing. [Skill 1.D]

  • CSN-2.B.1 Parallel computing consists of a parallel portion and a sequential portion.
  • CSN-2.B.2 Solutions that use parallel computing can scale more effectively than solutions that use sequential computing.
  • CSN-2.B.3 Distributed computing allows problems to be solved that could not be solved on a single computer because of either the processing time or storage needs involved.
  • CSN-2.B.4 Distributed computing allows much larger problems to be solved quicker than they could be solved using a single computer.
  • CSN-2.B.5 When increasing the use of parallel computing in a solution, the efficiency of the solution is still limited by the sequential portion. This means that at some point, adding parallel portions will no longer meaningfully increase efficiency.
ไทย

ความเข้าใจที่ยั่งยืน (CSN-2): การคำนวณแบบขนานและการกระจายใช้คอมพิวเตอร์หลายเครื่องเพื่อแก้ปัญหาซับซ้อนหรือประมวลผลชุดข้อมูลขนาดใหญ่ได้อย่างรวดเร็วขึ้น

จุดประสงค์การเรียนรู้ CSN-2.A: สำหรับการคำนวณแบบ sequential, parallel และ distributed: a. เปรียบเทียบวิธีแก้ปัญหา [ทักษะ 1.D] b. ประเมินประสิทธิภาพของวิธีแก้ปัญหา [ทักษะ 1.D]

  • CSN-2.A.1 Sequential computing เป็นโมเดลการคำนวณที่ดำเนินการ according to orderทีละขั้นตอน
  • CSN-2.A.2 Parallel computing เป็นโมเดลการคำนวณที่โปรแกรมถูกแบ่งออกเป็นหลาย操作步骤การคำนวณแบบ sequential ขนาดเล็กกว่า โดยบางขั้นตอนถูกทำพร้อมกัน
  • CSN-2.A.3 Distributed computing เป็นโมเดลการคำนวณที่ใช้อุปกรณ์หลายเครื่องเพื่อรันโปรแกรม
  • CSN-2.A.4 การเปรียบเทียบประสิทธิภาพของวิธีแก้ปัญหายังทำได้โดยการเปรียบเทียบเวลาที่ ониใช้เวลาในการดำเนินการงานเดียวกัน
  • CSN-2.A.5 วิธีแก้ปัญหารูปแบบ sequential ใช้เวลาเท่ากับผลรวมของขั้นตอนทั้งหมด
  • CSN-2.A.6 วิธีแก้ปัญหารูปแบบ parallel computing ใช้เวลาเท่ากับงาน sequential ของมันบวกกับงาน parallel ที่นานที่สุด
  • CSN-2.A.7 "speedup" ของวิธีแก้ปัญหารูปแบบ parallel วัดจากเวลาที่มันใช้เสร็จเมื่อทำแบบ sequential หารด้วยเวลาที่มันใช้เสร็จเมื่อทำแบบ parallel

จุดประสงค์การเรียนรู้ CSN-2.B: อธิบายประโยชน์และความท้าทายของการคำนวณแบบขนานและการกระจาย [ทักษะ 1.D]

  • CSN-2.B.1 การคำนวณแบบขนานประกอบด้วยส่วน parallel และส่วน sequential
  • CSN-2.B.2 วิธีแก้ปัญหารูปแบบ parallel computing สามารถ scale ได้มีประสิทธิภาพมากกว่าวิธีแก้ปัญหารูปแบบ sequential computing
  • CSN-2.B.3 การคำนวณแบบ distributed ทำให้สามารถแก้ปัญหาที่ไม่สามารถแก้บนคอมพิวเตอร์เครื่องเดียวได้เนื่องจากทั้งเวลาในการประมวลผลหรือความต้องการพื้นที่เก็บข้อมูล
  • CSN-2.B.4 การคำนวณแบบ distributed ช่วยแก้ปัญหาที่ใหญ่กว่ามากได้อย่างรวดเร็วกว่าที่จะแก้ได้โดยใช้คอมพิวเตอร์เพียงเครื่องเดียว
  • CSN-2.B.5 เมื่อเพิ่มการใช้การคำนวณแบบขนานในโซลูชัน ประสิทธิภาพของโซลูชันยังคงถูกจำกัดโดยส่วนที่ทำงานแบบลำดับขั้น ดังนั้นจึงมีจุดหนึ่งของการเพิ่มส่วนแบบขนานจะไม่ช่วยเพิ่มประสิทธิภาพได้อย่างมีนัยสำคัญอีกต่อไป

Source: College Board AP Course and Exam Description · ⁨แหล่งที่มา: คำอธิบายหลักสูตรและข้อสอบ College Board AP⁩

English
  • Sequential computing 顺序计算 runs one operation at a time.
  • Parallel computing 并行计算 splits a task into parts that run at the same time on multiple processors, finishing faster.
  • Distributed computing 分布式计算 uses many computers connected by a network to work on one problem – essential for problems too big for a single machine.

A parallel solution's speedup 加速比 is the sequential time divided by the parallel time. Speedup is limited: parts that must run in sequence cannot be sped up by adding processors, so doubling the processors rarely doubles the speed.

Worked example. A task has a part that must run sequentially, taking $40$ seconds, plus a parallelizable part that takes $60$ seconds on one processor – so on a single processor the whole task takes $40+60=100$ seconds. Spread the parallel part across $3$ processors and it takes $\tfrac{60}{3}=20$ seconds, so the total parallel time is $40+20=60$ seconds and the speedup is $\tfrac{100}{60}\approx1.67$. The $40$-second sequential part is a floor: even with infinitely many processors the task can never finish in under $40$ seconds.

Exam skill: given the times for the sequential and parallel portions of a task, be able to calculate the total parallel time and the speedup.

ไทย
ตู้เซิร์ฟเวอร์ในศูนย์ข้อมูล: การคำนวณแบบกระจายแบ่งภาระงานไปหลายเครื่อง
ตู้เซิร์ฟเวอร์ในศูนย์ข้อมูล: การคำนวณแบบกระจายแบ่งภาระงานไปหลายเครื่อง
  • การคำนวณแบบลำดับ ทำงานคำสั่งหนึ่งต่อหนึ่ง
  • การคำนวณแบบขนาน แบ่งงานออกเป็นส่วนที่运行的พร้อม กัน บนโปรเซสเซอร์หลายตัว ทำให้เสร็จเร็วขึ้น
  • การคำนวณแบบกระจาย ใช้ คอมพิวเตอร์จำนวนมาก ที่เชื่อมต่อกันด้วยเครือข่ายเพื่อแก้ปัญหาเดียวกัน – จำเป็นสำหรับปัญหาที่ใหญ่เกินกว่าที่จะแก้ไขด้วยเครื่องเดียว
การคำนวณแบบขนาน: โปรเซสเซอร์จำนวนมากทำงานพร้อมกัน
การคำนวณแบบขนาน: โปรเซสเซอร์จำนวนมากทำงานพร้อมกัน

speedup ของโซลูชันแบบขนานคือเวลาแบบลำดับหารด้วยเวลาแบบขนาน speedup มีขีดจำกัด: ส่วนที่ต้อง运行แบบลำดับไม่สามารถเร่งความเร็วได้ด้วยการเพิ่มโปรเซสเซอร์ ดังนั้นการเพิ่มโปรเซสเซอร์เป็นสองเท่าจึงมักจะไม่ทำให้ความเร็วเป็นสองเท่า

ตัวอย่างทำโจทย์. ภาระงานมีส่วนที่ต้อง运行แบบลำดับ ซึ่งใช้เวลา $40$ วินาที บวกกับส่วนที่ runs ขนานกันได้ซึ่งใช้เวลา $60$ วินาทีบนโปรเซสเซอร์หนึ่ง – ดังนั้นบนโปรเซสเซอร์เดียว ภาระงานทั้งหมดใช้เวลา $40+60=100$ วินาที若将并行部分分布在 $3$ 个处理器上,则需要 $\tfrac{60}{3}=20$ 秒,因此总并行时间为 $40+20=60$ 秒,speedup则为 $\tfrac{100}{60}\approx1.67$。 $40$-วินาทีของส่วนลำดับเป็นพื้น: แม้จะมีโปรเซสเซอร์อเนกนับก็ไม่สามารถfinish ภาระงานในเวลาที่สั้นกว่า $40$ วินาทีได้

ทักษะในการสอบ: เมื่อได้รับเวลาของส่วนลำดับและส่วนขนานของภาระงาน สามารถคำนวณเวลาแบบขนานรวมและspeedup ได้

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
speedup/ˈspiːdʌp/ ความเร็วเพิ่มขึ้น
4.3

Exam tips · ⁨ข้อแนะนำสำหรับการสอบ⁩

English
  • Describe how data travels in packets over a redundant, fault-tolerant network of independent routers.
  • Know that protocols (IP, TCP, HTTP) are agreed rules, and that open standards let different systems interoperate.
  • Explain scalability and how the Internet grows without central control.
  • Contrast bandwidth (rate) with latency (delay), and describe the DNS name-to-address lookup.
  • Discuss the digital divide and security basics (encryption, authentication) in plain terms.
ไทย
  • อธิบายว่าข้อมูลเดินทางในรูปของ แพ็กเก็ต ผ่านเครือข่ายของเราเตอร์อิสระที่มีความซ้ำซ้อนและทนทานต่อความผิดพลาดได้อย่างไร
  • รู้ว่า โปรโตคอล (IP, TCP, HTTP) คือกฎ agreed起来 และมาตรฐานเปิดช่วยให้ระบบต่างๆ ทำงานร่วมกันได้
  • อธิบาย scalability และวิธีที่อินเทอร์เน็ตขยายโดยไม่ต้องการการควบคุมแบบรวมศูนย์
  • เปรียบเทียบ แบนด์วิดท์ (อัตรา) กับ แลตเตนซี (ความหน่วง) และอธิบายการค้นหาชื่อเป็นที่อยู่ของ DNS
  • อภิปรายเรื่อง ช่องว่างดิจิทัล และความปลอดภัยพื้นฐาน (การเข้ารหัส, การยืนยันตัวตน) ด้วยภาษาที่เข้าใจง่าย

Interactive lessons on this topic · ⁨บทเรียนเชิงโต้ตอบสำหรับหัวข้อนี้⁩

Work through it step by step, with instant-check exercises. · ⁨ทำทีละขั้นตอน พร้อมแบบฝึกหัดตรวจสอบผลทันที⁩

Past Papers · ⁨ข้อสอบย้อนหลัง⁩

More topics in AP Computer Science Principles · ⁨หัวข้อเพิ่มเติมใน AP Computer Science Principles⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP