Arch & execution

docx

School

Oklahoma Christian University *

*We aren’t endorsed by this school

Course

MISC

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by DeaconRhinocerosMaster733

Report
CMSC 4513 - Programming Languages Homework - Architecture and Execution 13 pts Due: Jan 24 Nathan Curnutt 1. (2 pts) How does the Von Neumann architecture affect programming language design? - The architecture is a model that divides memory into two separate parts, the program code and data. - It introduces the bottleneck. - Enables devs to write instructions that can be stored, manipulated, and executed by the computer. 2. (2 pts) What is a REPL (Read-Eval-Print Loop), and how does it differ from traditional compilation processes? - It is a computer environment where user inputs are read and evaluated, and then the results are returned to the user. - Is self-hosting. - Found in lower level languages. - AOT/JIT 3. (2 pts) Explain the concept of hybrid compilation. What are the advantages and disadvantages of using a hybrid approach? - Is the combination of both MPI and share-memory to take advantage of compute clusters with multi-core nodes. - The advantages are that it is scalable to what is required, meaning it can adapt to different scenarios. Can be ran while the code is running. - Disadvantages would be that it takes a longer time to startup, has heavy usage of cache memory and increases the complexity in Java program. 4. (2 pts) What is self-hosting in the context of compiler development? Provide an example of a self-hosting compiler and explain its significance. - It is the use of a program as part of the toolchain or operating system that produces new versions of that same program and an example would be a compiler that can compile its own source code. - C, C++, C# all have self-hosting compilers. 5. (2 pts) Explain the role of transpilers in the context of programming languages. Provide a real-world scenario where a transpiler might be useful. - It is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent source code in the same or a different programming language. - An example would be converting C++ code to C code. Or converting Python to Ruby. 6. (3 pts) How does the choice of compilation strategy (AOT, JIT, hybrid) impact the execution speed and memory usage of a program? - Withing Java AOT compilation offers faster startup times since the code is already compiled. While JIT incurs additional overhead during startup because it needs to analyze and compile the code dynamically.
- Also AOT generally requires less memory compared to JIT because AOT exclude the need for JIT compilation overhead.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help