lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [lucy-commits] [Lucy Wiki] Update of "LucyBookClub" by MarvinHumphrey
Date Tue, 21 May 2013 15:53:43 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucy Wiki" for change notification.

The "LucyBookClub" page has been changed by MarvinHumphrey:

Add May 21, archive May 14.

  == Upcoming Meetings ==
+ === Tuesday May 21, 7:00 pm PDT: ===
+ Lectures from [[|The Hardware/Software Interface]]
+  * Section 5: Procedures and Stacks
+  * Section 6: Arrays and Structs
+ Review questions:
+  1.  In the Linux process memory layout, the instructions and stack are at different ends
of the address space.  Which is on the high end, and which is on the low end?
+  2.  Under normal circumstances, what portions of memory can contain executable instructions?
 (stack, heap, static data, instructions)
+  3.  What is a return address?  How is it stored when a procedure is called, so that the
callee can get at it?
+  4.  In what ways are the `call` and `ret` instructions complementary?
+  5.  Why might registers be divided between caller-saves and callee-saves, rather than being
all one or the other?
+  6.  Where is the standard location for returning a value?
+  7.  Without a stack, only global variables are available for use by subroutines.  What
popular language feature would this cripple?
+  8.  Does the callee always return before the caller under all possible circumstances? 
No exceptions?
+  9.  What gets stored in a stack frame?  How much less gets stored on the stack in x86-64
than in IA32?
+  10. Imagine a function which takes 8 arguments of type `int` named `arg1` through `arg8`.
 How would they be passed under IA32?  Under x86-64?  Under IA32, what will you find at `8(%ebp)`?
 How about at `4(%ebp)`?
+  11. What's the difference between a multi-dimensional array and a multi-level array?  Which
one is used by Java?
+  12. When the compiler compiles a loop over a fixed range of elements in an array, it may
use pointer math rather than indexing.  Why might this be more efficient?
+  13. Are C nested arrays guaranteed to be implemented using "row-major" or "column-major"
+  14. How can a single `leal` instruction be used to multiply the value in a register by
+  15. What is the definition of "aligned data"?
+  16. Why is it inefficient (at best) to retrieve unaligned data?
+  17. What's the difference between IA32 and 32-bit Windows with regards to alignment of
+  18. What are some of the countermeasures which have made stack-smashing attacks more difficult?
+ Bonus questions not answered by lecture:
+  1.  Under x86-64, the frame pointer (%ebp in IA32) is omitted.  How will everything be
addressed relative to the stack pointer when alloca() is invoked?
+  2.  In C, `array[2]` and `2[array]` are equivalent.  So are `array[-3]` and `-3[array]`.
+  3.  Does `sizeof` include padding bytes at the end of a struct in its calculation?
+  4.  Is a non-executable stack in a JIT environment still helpful?
+ == Community Notes ==
+ Below are an excerpt of notes from previous meetings and or anything of interest related
to the meetings.
  === Tuesday May 14, 7:00 pm PDT: ===
@@ -54, +93 @@

   22. Under what circumstances can a `switch` statement be implemented as a "jump table"?
   23. Explain the instruction `jmp *.L62(,%edx,4)`
- == Community Notes ==
- Below are an excerpt of notes from previous meetings and or anything of interest related
to the meetings.
  === Tuesday April 30, 7:00 pm PDT: ===
  Lectures from [[|The Hardware/Software Interface]]

View raw message