Concurrent programming you should know the difference

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Concurrent Programming . You should know the difference between coroutines and tasks and the three methods of task synchronization - semaphores, monitors, and message passing. The Ada tasking model and Java thread model of concurrency were also briefly discussed. Exception Handling . We discussed the Java exception handling model using try-catch blocks.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS 401/501 FINAL EXAM SAMPLE QUESTIONS 1. Fill in the Blank. A(n) is a situation where two tasks A and B each need two shared resources X and Y in order to complete their work, but A holds resource X and B holds resource Y, and each task must wait for the other to release the resource in order to continue. 2. True or False. A virtual method table is needed only for the execution of polymorphic functions in C++, but is not needed in Java. 3. List and briefly describe four (4) components of an activation record. 4. Consider the Pascal array declaration: A : array [ - 10 .. 10, - 5 .. 5, 1 .. 10] of T; Assuming that T requires 10 bytes of storage and A is stored at relative location 100, what is the relative location of A [1, 1, 2]? 5. Define the terms dangling reference , garbage , and memory leakage . Describe how each is created in a program and a possible solution to each.
Image of page 2
6. Consider the following Pascal program: program MAIN; var U, V : INTEGER; procedure A; var Y : INTEGER; ... (* point 4 *) end; procedure B; var U, V, Y : INTEGER; procedure C; ...
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern