6 Pages

q1_answers

Course: CS 240, Fall 2009
School: Stanford
Rating:
 
 
 
 
 

Word Count: 1982

Document Preview

University Stanford Computer Science Department CS 240 Quiz 1 Spring 2006 May 12, 2006 This is an open-book exam. You have 50 minutes to answer eight out of ten questions. Write all of your answers directly on the paper. Make your answers as concise as possible. Sentence fragments ok. NOTE: We will take o points if a correct answer also includes incorrect or irrelevant information. (I.e., dont put in everything...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> Stanford >> CS 240

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
University Stanford Computer Science Department CS 240 Quiz 1 Spring 2006 May 12, 2006 This is an open-book exam. You have 50 minutes to answer eight out of ten questions. Write all of your answers directly on the paper. Make your answers as concise as possible. Sentence fragments ok. NOTE: We will take o points if a correct answer also includes incorrect or irrelevant information. (I.e., dont put in everything you know in hopes of saying the correct buzzword.) Question Score 1-5 6 - 10 total Stanford University Honor Code In accordance with both the letter and the spirit of the Honor Code, I did not cheat on this exam nor will I assist someone else cheating. Name and Stanford ID: Signature: 1 Answer eight of the following ten questions and, in a sentence or two, say why your answer holds. (5 points each). 1. Given a program P that runs on Caprpriccio and does no explicit locking of its own. What does P correspond to in terms of MESA? What is the most straightforward way you could adapt Eraser to nd race conditions in such programs? (Hint: think of how it checked OS code.) How useful do you expect this to be? P = one big monitor with one implicit condition variable, yield = wait statements on this variable. Since there are no locks, Eraser wouldnt be able to check much. You could have one lock for the monitor that was implicitly acquired when a thread starts running and released at yield point. However, this isnt very useful since it would be held whenever P ran. Finding races in this case would actually require looking for violations of invariants, which Eraser is not setup to do. Grading: (+2) saying that the program was one big monitor with words implying that this gave a form of mutual exclusion through non-preemption or that whatever thread was running had exclusive access, etc., (+1) by tying the wait and notify to thread yielding and scheduling and (+2) for identifying that Eraser wouldnt be useful because there are no locks (except maybe the one big monitor lock shared by everyone) in the program, so hence the lockset algorithm is useless. 2. Consider the Therac threading model. How does it compare to Events in Ousterhout? To threads in Capriccio? Does it contradict or support the arguments of these people? Therac is all screwed up, so we had to take a variety of answers. In some sense you can see it being event-driven, since there is a sort-of event loop that decides what thread to run. In another sense it is standard pre-emptive thread with the standard default (nothing is a critical section). It can be seen as a vindication of the pre-emptive threads are really hard mantra. But programmer would have probably screwed up any model, so things are a bit unclear... Grading roughly: (+2) to make the connection between events and how Therac dispatches certain tasks, (+2) observing that the threads in Cappricio are non-preemptive (not preemptive!) and has nothing to do with the preemption problems in Therac (although talking about implicit yields was ok), (+1) making a lucid argument why this does or doesnt support Ousterhouts claim; the main issue here was confusing Cappricios threads with pre-emptive threads, since the claim of the authors of the Cappricio paper is that you get the benets of events (we avoid the problems of pre-emption) without the fuss of continuations. 3. Consider very-broken code that uses the double-check lock idiom: 0: int *p = 0; 2 .... 1: if(!p) 2: lock(l); 3: if(!p) { 4: int *t = malloc(sizeof *t); 5: *t = 3; 6: p = t; 7: } 8: unlock(l); 9: } 10: x = x / *p; How can an optimizing compiler of the sort that Boehm complains about interact badly with the use of the t temporary? Assume you dont use an optimizing compiler: if another thread has done a free previously, what can happen if the initializing thread gets context switched immediately after line 6 and another thread executes line 10 on another processor? It could remove the temporary assignment and assign directly to p, which means that another thread could see that p was not null before its contents were initialized. If the free had happened on another processor, then that processor could still have a stale copy of that memory in its cache. If this memory was then reused by the malloc and assigned to p and the second thread ran on the processor with the stale data it could see the out-of-date copy. This would be hard to debug. (Note, in reality that malloc and free probably use locks which will probably cause memory synchronization, which would prevent this bug from showing up. Grading: roughly: (+2.5, rounded up with the total sum) talking about how an optimizer could screw things up; main example was optimizing away t, but other another example included reording the statements in the critical section (a problem since the access to p on line 10 is not protected by a lock). Some people said that the compiler could move the call to malloc outside of the critical section; for a general function this is completely false; because of potential side-eects the compiler cannot reorder function calls unless it can perform a whole-program analysis and determine that functions can be reordered because one does not eect the other. Because malloc is often an intrinsic function, the compiler can place the call to malloc outside the critical section, but the assignment to p must be done within the critical section (we dont believe, however, that a compiler like gcc does this in practice). Another possibility is that the inner if statement could be optimized away, causing issues. This is potentially possible since p is not declared volatile. A variety of other answers were closely evaluated... (+2.5, up rounded with the total sum) the main issue with the call to free is that the pointer value can be stale across processors (for many reasons). Other answers were also considered on a case by case basis. Partial credit was given (removed) for technical points that were unclear or incorrect.) 4. Your 240 cohort sees the number 98.2 in the VMS paper and says that is strange. Why? Assume the methodology that obtained it was accurate: What is a plausible 3 reason the number is what it is? This is the average number of pages written. They claim the high-low limit is around 100. One plausible explanation is that pages with pending I/O operations were written and then rewritten when the I/O ops completed. Grading roughly: (+2) that it was clear that 98.2 was the number of pages written. Some answers would conate this number with the number of pages read, or simply did not clearly indicate they understood what this number was. (+1) about some discussion of the modies list, or something to the eect of where the pages came from and that they were batched, or a reasonable explanation of why the number was around 100 (+2) a exible answer to identify why the number is 98.2 as opposed to something like 100 (reasoning in an experimental way about why the number was the way it was). 5. Superpages: Jimbob says the most important thing to know about the future is when an object will die. Bobjim says that the most important thing is how an object will be populated. How could you use these facts? Give an experimental reason for why one of these guys is more right. You could use death times for placement: put things that will die together near each other so that death frees up a lot of space. You could use population information to decide on whether to do eager promotion or not. From the experiments, the overhead of lazy promotion and general management doesnt seem to be such a big deal, so probably placement is more important (since it lets you use superpages when memory contention is much higher and the benet of superpages for many apps is non-trivial.). Grading: (+2) to reason about how Jimbobs policy can be used to eectively reclaim pages, etc., especially in the context of how this helps management of superpages. Many answers did not talk about how this was useful from a page management perspective (this question is about superpages!). (+2) to reason about Bobjims policy, and how it could be used for eager promotion, or something useful for page management (again many answers ignored the eect of the policy on superpages). (+1) a reasonable argument, one way or another, of why one policy was better than the other by comparing the benets of both as put in the previous two points. Some answers simply said that one was better than the other without mentioning what the benets of one or both facts were. Both facts are potentially useful, and to get full credit you needed to discuss both of them. 6. Most OSes dont have superpages. VMware hires Navarro to hack ESX so that ESX will trick guest OSes into using superpages. At a high-level: how would he do so? Do you expect this approach to work well? Why or why not? What he would want to do is to map the PPNs of contiguous VPNs to contiguous 4 MPNs and insert this into shadow page tables to they get put in the TLB at miss time. However, this probably wont be that eective: the guest OS will just pick PPNs it wants, which...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Stanford - ME - 382
ME 382 Modeling and Simulation of Human Movement May 29, 2001 Tracking Human Movement Clay Anderson & Darryl ThelenModeling the bodyObservables KinematicsExternal Forces EMGjoints, anthropometrySkeletal DynamicsUnderlying Structuresstreng
Maryland - PLSC - 100
I+vo,d?f\:+~o~k"-t: 0) Y)t\o-t-+-I-+-2f- Ff'.' IfO/f/\/bp~uvJfl~ l'V {ft> ~071/0-pCl/S V?Sop~9nrr-I-0l.fr -~V9-0-'0 : oodffOJ~-r>fIJWJ IA'V-'/lo/Q)CJ:o fV 0,4-:n7 O/y~ov 'p~j\ \ O,Nd''r 1f'JO_4-,~fVlJ~N,JYtJ-
Maryland - PLSC - 100
End of Semester Discussion meets this week California Agriculture readings on genetic info from crops escaping into the environment Chapter 14 was posted on the website Other info to follow this week Chapter 15 Last two lecturesGenetically Mod
Maryland - PLSC - 400
Growth and Development of Tissues (parts of Chapters 1, 15 and 16) Growth change in mass (size) Development change in state (juvenile, vegetative, reproductive, etc) G and D is due to: 1) division followed by 2) expansion and then 3) differentiatio
Stanford - AGIX - 1033
Purdue - ME - 274
ME 274: BASIC MECHANICS II SPRING 2009School of Mechanical Engineering Purdue University, West LafayetteME 274 is a fundamental course in the subject of dynamics. The historical trend in mechanical engineering design has always been to move toward
Purdue - ME - 274
Statistics for Fundamentals ExamME 274 - Spring 2009Prob 1 2 3 4 5 6 7 8 9 10 11 12 13 14 TOTALAve (%) 48.2 85.1 53.2 38.1 83.1 85.1 91.9 38.9 79.7 91 89.7 81.6 81.6 71.4 70100 75 50 25 1 2 3 4 5 6 7 8 09 10 11 12 13 14
Penn State - AIK - 5011
BYU - TTE - 276
Sc. Ed. 276R: Exploration of Secondary Teaching Fall 2008 8:00am 11:00am, TTH Dr. Geoffrey A. Wright 230 G SNLB geoffwright@byu.edu 422-7804 Office Hours: MW 12:00 1:00 Course Description: This course is a field-based, initial teaching experience d
BYU - GAW - 276
Sc. Ed. 276R: Exploration of Secondary Teaching Fall 2008 8:00am 11:00am, TTH Dr. Geoffrey A. Wright 230 G SNLB geoffwright@byu.edu 422-7804 Office Hours: MW 12:00 1:00 Course Description: This course is a field-based, initial teaching experience d
Stanford - STAT - 190
Stat 190, S. C. Kou, Stanford University Case Study 3. Association and Causation Purpose: Understand the relationship between association and causation Example 1. Education and Unemployment. In the Great Depression (19291933), better-educated people
Stanford - TAG - 1035
US District Court Civil Docket as of 10/17/2006 Retrieved from the court on Tuesday, November 21, 2006U.S. District Court CENTRAL DISTRICT OF CALIFORNIA (Western Division - Los Angeles) CIVIL DOCKET FOR CASE #: 2:05-cv-07352-R-ESeth Huberman v. T
Penn State - CSE - 471
6. Determine the primitive flow table of a D flipflop (a fundamentalmode sequential circuit with D and C inputs). (20pt) Also show a typical timing chart for a D flipflop. Make your primitive flow table as small as possible without the state table mi
Penn State - CMPEN - 297
Vocabulary:1. Minterm (standard product) 2. Maxterm (standard sum) 3. Sum of minterms (sum of products, SOP) 4. Product of maxterms (product of sums, POS) 5. Canonical form 6. minterm list, maxterm list, truth table, 7. 7 Boolean equation (expressio
Penn State - CMPEN - 297
CMPEN297BPenn State University2/13/2008Kyusun ChoiDigital Logic Design ToolsThe commercial CAD tool used for CMPEN 297B is ISE WebPACK. The tool is available free from Xilinx. One may download the tools from the following Xilinx web page: ht
Maryland - CMSC - 828
Virginia Tech - MATH - 1206
Homework 7 Answers 1.Answer: A only 2.Answer: A and BEvaluate the following integrals. 2 1 6 3. x 6 6 + dx 1 x x 4. 5. 6.(22.108) (6.3555) (1.5) (1.51085)10e y + e2 y + 2 y dy 310sin t cos(3t) + sect tan t dt02 2 + d
Stanford - FM - 102
- Begin cfg_file: ./src/ciFit_option.xml -> <?xml version="1.0" ?>> <!- Little test ifile ->> > <!DOCTYPE ifile SYSTEM "$(XMLBASEROOT)/xml/ifile.dtd" >> > <ifile cvs_Header="$Header: /nfs/slac/g/glast/ground/cvs/calibGenCAL/src/ciFit_option_bad
Stanford - FM - 104
calibGenCAL CVS Tag: $Name: v3r6p4 $- Begin cfg_file: ./src/MuTrigEff_option_FM104.xml -> <?xml version="1.0" ?>> <!- Little test ifile ->> > <!DOCTYPE ifile SYSTEM "$(XMLBASEROOT)/xml/ifile.dtd" >> > <ifile cvs_Header="$Header: /nfs/slac/g/g
Stanford - FM - 102
0 0 0.380817 0.0292407 0 1 0.38528 0.0277729 0 2 0.387711 0.0290558 0 3 0.391093 0.0273236 0 4 0.38807 0.0263393 0 5 0.369506 0.029665 0 6 0.369919 0.0269086 0 7 0.378147 0.0277609 0 8 0.372213 0.0260974 0 9 0.376605 0.0267981 0 10 0.39042
Penn State - MRM - 5082
Mallory Mayer October 9, 2007 MIS 204 1. Biometric devices translate a personal characteristic into a digital code that is compared with a digital code stored in the computer. If the digital code happens to not match the personal characteristics code
Purdue - ME - 365
Purdue - ME - 365
Noise & Noise Rejection NoiseSources CharacterizingNoise SignaltoNoiseRatio(SNR,S/N) PowerSpectralDensity ModesofInterference NoiseRejection: Filtering Modulation Shielding&Grounding DifferentialAmplifier AveragingPeter H. Meckl Purdue U
Stanford - SEP - 107
Chapter 1 Choice of regularization and numerical resultsThis chapter addresses the problem of choosing appropriate regularization and preconditioning operators. Such a choice plays a crucially important role in iterative data regularization. I discu
Grinnell - CS - 152
CSC152 2005F, Class 30: Arrays and Applications ThereofAdmin:* No readings. Sorry.* New homework strategy: Daily "small" assignments due before next class.Overview:* Array basics.* An example: Sum* More about main* Another example: Fibon
Stanford - MCK - 1004
BERNSTEIN LITOWITZ BERGER & GROSSMANN LLP DAVID R. STICKNEY (Bar No. 188574) TIMOTHY A. DeLANGE (Bar No. 190768) BENJAMIN GALDSTON (Bar No. 211114) 12481 High Bluff Drive, Suite 300 San Diego , CA 92130 Tel: (858 ) 793-0070 Fax: (858 ) 793-0323 -andM
Stanford - HLIT - 1014
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16LERACH COUGHLIN STOIA GELLER RUDMAN & ROBBINS LLP SHAWN A. WILLIAMS (213113) JASON C. DAVIS (pro hac vice) 100 Pine Street, Suite 2600 San Francisco, CA 94111 Telephone: 415/288-4545 415/288-4534 (fax) BARRACK,
Stanford - MWD - 1033
vLE D1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Defendants . 20 21 22 23 24 25 26 27 28V. MORGAN STANLEY, INC ., a Delaware Corporation, and MORGAN STANLEY DW INC ., a wholly-owned subsidiary of Morgan Stanley . Inc .FINKELSTEIN & KRINSK L
Stanford - NSPR - 1013
.7U .S . DISTRICT COURT NORTHERN DISTRICT OF TEXA SORI GI NALUNITED STATES DISTRICT COUR NORTHERN DISTRICT OF TEXA S FORT WORTH DIVISIO NFILED MAR 9 20( -CLERK, U .S . DISTRICT COURT ByDeput ySOUTHLAND SECURITIES CORPORATION, et al ., On
Stanford - MER - 1033
.01 2 3 4 5 6 7 8 9 10 11 12 13 14 15FINKELSTEIN & KRINSK LLP ,Jeffrey R . Krinsk, Esq .Mark L . Knutson , Esq. Amy J . Lepine Esq . `~ 501 West Broadway, Suite 125 0 San Diego , CA 9210 1 Tel : 619/238-1333FlLGFax: 6191238-542 5OUN 2
Virginia Tech - FIW - 4614
Stanford - CS - 193
CS193i, Stanford University Spring, 2004Handout #22 Ron B. YehHTTP Part 6Persistent Connections HTTP 1.0In HTTP 1.0, connections close by default. With HTTP 1.0 we can get away without sending content-length, since the EOF will mark the end of
Stanford - BIGT - 1017
Pi t- E D tUNITED STATES DISTRICT COURT MIDDLE DISTRICT OF FLORIDA TAMPA DIVISION 7 IN RE PINNACLE HOLDINGS CORP . No . 8:01-CV-624-T-27-MSS SECURITIES LITIGATION03 F-s9 2'ORDER AND FINAL JUDGMENT On the 17th day of January, 2003, a hearing ha
Stanford - MATH - 220
Math 220B - Summer 2003 Homework 5 Due Thursday, July 31, 20031. Let = (0, k)(0, l). Use separation of variables to solve the following boundary-value problem for Laplaces equation on a square, (x, y) u = 0 u(0, y) = 0, ux (k, y) = (y) 0<y<l u
Virginia Tech - CS - 1054
Purvi SaraiyaExam Scoring Program854913695 86.00 B358517304 62.00 D-274728519 53.00 F962304840 95.00 A513545321 73.00 C283177110 79.00 C+158268739 85.00 B448908949 46.00 F178318304 60.00 D-490083954 5
Virginia Tech - CS - 1054
an elephant sat on me.zm vovkszmg hzg lm blf.
Grinnell - CSC - 201
CSC201Assignment 5Spring 2009Due: Wednesday, March 4 at 8:00 am. Submission instructions: Please submit your les (source code and test cases) by sending them as email attachments to: submit201@cs.grinnell.edu. PART I: (programming) For this ass
Grinnell - CS - 302
CSC302 2007S, Class 35: SQL (1): The Relational ModelAdmin:* EC for tomorrow's convo* EC for tomorrow's CS extra* I really don't like having to record zeros for reading responses. + Even when the reading is hard to grok.Overview:* Context.
Stanford - CS - 374
CS 374: Algorithms in Biology (Fall 2006)Chuan Sheng FooPaper reference Zhi,D., Raphael,B., Price,A., Tang,H. and Pevzner,P: Identifying repeat domains in large genomes. Genome Biology 2006, 7, R7. Abstract This paper presents a novel approach fo
Stanford - CS - 157
Computational LogicLecture 8Relational ProofsMichael GeneserethAutumn 2007Logical EntailmentA set of premises logically entails a conclusion if and only if every interpretation that satisfies the premises also satisfies the conclusion.2
Stanford - CS - 157
Computational LogicLecture 9Resolution PreliminariesMichael GeneserethAutumn 2007Resolution PrincipleThe Resolution Principle is a rule of inference. Using the Resolution Principle alone (without axiom schemata or other rules of inference)
Bucknell - CS - 203
CSCI 203Project #5 (Due 2002-10-30)Fall 2002ObjectivePractice selection and repetition.IntroductionThis project is an extension of Project 4; you will make use of the class DividendAccount (as you modied it last week) but to solve a new pro
Bucknell - CS - 363
Ethernet and Wireless LAN04/19/09CSCI 363 Computer Networks1Last time: Reliable TransmissionGoal: Create a mechanism at the data-link layer that is capable of recognizing when an error has occurred on a point-to-point link (corrupted frame o
Bucknell - CS - 363
Textbook: Computer Networks, A Systems Approachby Larry Peterson and Bruce DavieWhat is this systems approach? Start with first principles and walk through the thought process that let to todays networks. Bottom-up look at the protocol stack fro
Bucknell - CSCI - 204
Professor WittieCSCI 204 Introduction to Computer Science IISpring 2009Copy Constructors1 Why do we need copy constructors?Suppose we have an instance of a Snowman and we want to duplicate it. The Snowmans member data are references to its ha
Bucknell - CSCI - 204
Professor WittieCSCI 204 Introduction to Computer Science IISpring 2009MemoryPractice with MemoryDraw appropriate memory pictures for each of these code blocks. Show any changes and cross out old data or memory. Answer any questions. Make sur
Bucknell - CSCI - 204
CSCI 204 Study Guide for Final ExamProf. Xiannong Meng Spring 2007The nal exam will take place on Monday, May 7th at 11:45 am in Breakiron 065. The exam is comprehensive with emphasis on the part that has not been tested. Ofcially the exam could t
Bucknell - EG - 100
LEARN TO PROGRAM WITH ALICEXiannong Meng Computer Science Department Bucknell University1Lecture EightRecursion2What is RecursionRecursion is a form of repetition in which a method (or a question) calls itself A very powerful problem solvi
Bucknell - EG - 144
Physics 144 Chowdary How Things WorkSpring 2006Due by 5 pm Wednesday 5/3/06(solutions posted by noon, Friday 5/5/06) Problem 47: a) Chapter 9, Exercise 16 (p. 300). b) Chapter 9, Problem 2 (p. 301). c) Chapter 9, Problem 6 (p. 301). Problem 48:
Bucknell - PHYS - 211
Simple Harmonic Motionx Ht L ATx( t ) = A cos ( t + ) displacement of object at time tT-A2Ttx( t ) = A cos (2ft + ) 2 = A cos t + T A T f amplitude = maximum displacement from equilibrium; [m] period = time for one full os
Bucknell - CS - 315
Computer Networks04/23/2008CSCI 315 Operating Systems Design1The Purpose of Networking Goal: Allow computers to communicate (exchange data and/or commands). A few desirable properties: Interoperability, Flexibility, Geographical range,
Stanford - TVIA - 1036
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18Solomon B. Cera (State Bar No. 99467) Gwendolyn R. Giblin (State Bar No. 181973) GOLD BENNETT CERA & SIDENER LLP 595 Market Street, Suite 2300 San Francisco, California 94105-2835 Telephone: (415) 777-223
Stanford - GS - 1039
JUDGESHRZOUNITED STATES DISTRICT COURT SOUTHERN DISTRICT OF NEW YORK evDAVID M. MILCH, Individually and as Custodian for JASON ADAM MILCH, and On Behalf of All Others Similarly Situated, Plaintiffs,V. THE GOLDMAN SACHS GROUP, INC. and GOLDMA
Purdue - ENGL - 390
English 390A: Tutoring Practicum in Writing for First Year CompositionFall 2007Tammy Conard-Salvo HEAV 224 (in the Writing Lab) 494-4102 tcsalvo@purdue.edu http:/web.ics.purdue.edu/~tcsalvo/English390A/ENGL390A.html Course Description and Goals E
Bucknell - ELEC - 477
ELEC 477LTopics in Wireless System Design LabLab #3: Three-Element Impedance-Matching NetworksSpring 2008Introduction In last weeks lab exercise, you designed an L network to transform a load impedance of 10 to 50 . This type of network, some
Stanford - PPC - 1041
Case 2:08-cv-00419Document 1Filed 10/29/2008Page 1 of 17UNITED STATES DISTRICT COURT EASTERN DISTRICT OF TEXAS MARSHALL DIVISION RONALD ACALDO, Individually and On Behalf of All Others Similarly Situated, Plaintiff,vs.Civil Action No. CLAS
Stanford - VRSN - 1024
Bucknell - MGMT - 101
12Company Mission StatementThe mission of Anything But "Pointless" T-Shirt Company is to provide a positive and enjoyable experience for the residents of Outlook Pointe. We will work with the organizations residents and staff to organize and hos
Purdue - CS - 180
Chapter 8Exceptions and AssertionsCS 180 Sunil Prabhakar Department of Computer Science Purdue UniversityQuizWhat is necessary in order for an object x of class X to be an action listener for a Jbutton object?2ObjectivesAfter this week
Bucknell - CS - 363
TCP Congestion Control04/19/09CSCI 363 Computer Networks1TCP Congestion ControlStrategy: Send packets into the network without reservations and then react to observable events that occur.04/19/09CSCI 363 Computer Networks2End-to-End
Bucknell - PHYS - 211
Wnon-conservative = Emech: Step-by-Step Approach 1. Draw before and after sketches. Sketch includes velocities, positions Write down Einitial = K + U (for each object). Write down Efinal = K + U (for each object). Apply Wnon-conservative = Emech . D