


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Virginia Tech Bradley Department of Electrical and Computer Engineering ECE 3574: Applied Software Engineering Fall 2007
The solutions for this problem set must be submitted as an electronic submission. Your submission will ideally be a zip/tar file containing the document file that contains the answers to the questions, and the relevant source files for the programming questions. The following information must be included at the top of the first page of your document: your full name, your student ID number, your email address, class (ECE 3574), title of the assignment (Homework Problem Set 3), and date of submission. You must submit the solutions using the “Digital Drop box” at the class web site 1. The file must be given a name of the following form: LAST _ FIRST _hw3.zip or LAST _ FIRST _hw3.tar. Paper and email submissions will not be accepted. All work must be submitted by the announced due date/time.
Questions Use the Homework 3 forum in the Discussion Board area of the class web site to ask questions about this assignment. Do not post questions that contain specific information about the solution.
Honor Code As stated in the syllabus, in working on problem sets, discussion and cooperative learning are allowed. However, copying or otherwise using another person’s detailed solutions to assigned problems is an honor code violation. See syllabus for details.
(^1) The class web site is accessed at http://www.learn.vt.edu/.
Answer:
Answer: In general, the operating system must save the state of the currently running process and restore the state of the process scheduled to be run next. Saving the state of a process typical ly includes the values of al l the CPU registers in addition to memory al location. Context switches must also perform many archi tecture-specific operations, including flushing data and instruction caches.
Answer: a. Synchronous and asynchronous communication - A benefit of synchronous communication is tha t it al lows a rendezvous between the sender and receiver. A disadvantage of a blocking send is tha t a rendezvous may not be required and the message could be delivered asynchronously; received at a point of no interest to the sender. As a result, message-passing systems often provide both forms of synchronization.
b. Automatic and explicit buffering -Automatic buffering provides a queue with indefinite length; thus ensuring the sender wil l never have to block wh i le waiting to copy a message. There are no specifications how automatic buffering will be provided; one scheme may reserve sufficiently l arge memory where much of the memory is wasted. Explicit buffering specifies how large the buffer is. In this situation, the sender may be blocked whi le waiting for ava i l able space in the queue. However, it is less likely memory wil l be wasted with explicit buffering.
5. The Fibonacci sequence is the series of numbers 0 , 1 , 1 , 2 , 3 , 5 , 8 , .... Formal ly, it can be expressed as: f ib 0 = 0 f ib 1 = 1 f ib n = f ib n 1 + f ib n 2
chi ld process. The number of the sequence will be provided in the command line. For example, if 5
cause it to be suspended until the chi ld process exits.