Chulalongkorn University Theses and Dissertations (Chula ETD)

การพัฒนาตัวแปลภาษาสำหรับภาษาที่ประมวลผลพร้อมกัน

Other Title (Parallel Title in Other Language of ETD)

Development of a concurrent processing language translator

Year (A.D.)

1996

Document Type

Thesis

First Advisor

ประภาส จงสถิตย์วัฒนา

Faculty/College

Graduate School (บัณฑิตวิทยาลัย)

Degree Name

วิทยาศาสตรมหาบัณฑิต

Degree Level

ปริญญาโท

Degree Discipline

วิศวกรรมคอมพิวเตอร์

DOI

10.58837/CHULA.THE.1996.1566

Abstract

จุดมุ่งหมายของวิทยานิพนธ์ฉบับนี้คือการพัฒนาตัวแปลภาษาที่ประมวลผลพร้อมกัน โดยจะแบ่งขั้นตอนการพัฒนาเป็นสองส่วนคือ ขั้นตอนแรกจะเป็นการพัฒนาคอมไพเลอร์เพื่อแปลภาษาต้นแบบไปเป็นรหัสกลางที่ไม่ผูกพันกับฮาร์ดแวร์ โดยเทคนิคที่ใช้ในการแปลคือการแปลแบบเรียกซ้ำตามลำดับขั้น ในส่วนที่สองจะเป็นการพัฒนาอินเตอร์พรีเตอร์ที่จะนำรหัสกลางที่ได้จากคอมไพเลอร์มาประมวลผลลแบบพร้อมกัน อินเตอร์พรีเตอร์นี้จะใช้เทคนิคการจัดกำหนดการแบบวนรอบ ใช้ในเซมาฟอร์ในการป้องกันทรัพยากรร่วม และใช้การส่งข่าวสารในการติดต่อระหว่างกระบวนการ คอมไพเลอร์สามารถแปลได้ 115 บรรทัดต่อวินาที ส่วนอินเตอร์พรีเตอร์สามารถทำงานได้ 26,747 คำสั่งต่อวินาที ใช้เวลาในการจัดลำดับงานร้อยละ 5.5 ของเวลาซีพียู ได้ยกตัวอย่างการใช้ภาษานี้เพื่อแก้ปัญหาการขนส่ง โดยให้มีการทำงาน 4 กระบวนการพร้อมกัน นอกจากนี้ยังได้เปรียบเทียบตัวอินเตอร์พรีเตอร์กับการแปลไปเป็นภาษาปาลกาลโดยตรง มีผลคืออินเตอร์พรีเตอร์ทำงานได้ช้ากว่าประมาณ 3 เท่า

Other Abstract (Other language abstract of ETD)

The aim of this work is to develop translator for a concurrent processing language. The system composed of 2 parts. The first part is a compiler which translates a source language to intermediate codes which are independent of the hardware. The compiler uses a recursive descent technique. The second part is an interpreter which executes the intermediate codes in a concurrent fashion. The scheduler employs a Round Robin Policy. Semaphores are used to protect share resources. Message passing is method for inter-process communication. The speed of compiler is 115 lines per second. The interpreter can execute 26,747 codes per second. The overhead of process switching is 5.5% of CPU time. An example is shown for solving the transportation problem in which there are 4 concurrent processes. Moreover, the interpreter is compared with the direct translation to Pascal method. The interpreter is approximately 3 times slower.

Share

COinS