2 Pages

a2

Course: CSE 3221, Fall 2009
School: Maple Springs
Rating:
 
 
 
 
 

Word Count: 664

Document Preview

2005-06W CSE3221 Assignment 2 ============================= This assignment is due by 7:00 p.m. on Monday, March 13. 1. Write an ansi C (not C++) program called q1.c. It will be invoked with 4 arguments, as in % q1 <max> <bufLength> <nProducers> <nConsumers> The original process will - create adequate shared memory space to hold a 2-D...

Register Now

Unformatted Document Excerpt

Coursehero >> Maryland >> Maple Springs >> CSE 3221

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.
2005-06W CSE3221 Assignment 2 ============================= This assignment is due by 7:00 p.m. on Monday, March 13. 1. Write an ansi C (not C++) program called q1.c. It will be invoked with 4 arguments, as in % q1 <max> <bufLength> <nProducers> <nConsumers> The original process will - create adequate shared memory space to hold a 2-D int array of size 2 by <bufLength> plus any other space necessary. - create <nProducers> children, which we'll call "producers". The producers are numbered 1 ... <nProducers> and each producer knows its own number. - create <nConsumers> children, which we'll call "consumers". The consumers are numbered 1 ... <nConsumers> and each consumer knows its own number. The producers will, between them, write the numbers 1 to <max> inclusive to the buffer. More exactly, each producer number x will do the following: while there is a number n in 1 ... <max> that has not been written to the buffer - write to the buffer the pair (n, x) - sleep a random time between 0 and 0.01 seconds The consumers will, between them, read the numbers from the buffer and write them to standard output. More exactly, each consumer y will do the following while not all numbers in 1 ... <max> have been output - read the next pair (n, x) from the buffer, say from buffer slot number i (buffer slots are numbered 0 .. <bufLength> - 1). - write to standard output 4 values separated by single blanks and followed by a newline character. That is, write n x y i - sleep a random time between 0 and 0.01 seconds The original process will then write DONE (in upper case) followed by a newline character to standard output. You may wish to look at the man pages for shmget and semget and the other system calls mentioned there. 2. Write an ansi C (not C++) program called q2.c. It will be invoked with 4 arguments, as in % q2 <max> <bufLength> <nProducers> <nConsumers> This program will function the same way as q1.c, except that, instead using of shared memory and child processes it will create and use posix threads. You may wish to look at the man pages for pthread_create, pthread_mutex_init, pthread_cond_init and the other system calls mentioned there. Partners ======== You can work in groups of up to 3. Submissions =========== There is no hardcopy submission. Submit electronically as follows: Make a directory called Q1 and place all question 1 files in it (i.e. q1.c, makefile and anything else you need). This is a directory, not a .tar file. Make a directory called Q2 and place all question 2 files in it. Submit with the command % submit 3221 a2 Q1 Q2 The submitted files should start with the names, csLogins, student numbers and sections of all partners who worked on the assignment. Only one submission per group. Each submitted directory Qx should contain a makefile (called "makefile") that produces the targets qx (i.e., the executable q1 or q2), clean, doc and man, with the same specifications as in assignment 1. Programming Standards and Documentation ======================================= As in assignment 1, you have to write high quality code with good error checking, useful comments and graceful error handling. The return values of all system calls that can return an er...

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:

Laurentian - CHEM - 200201
Standard Reduction Potentials for the Elements Presented as Latimer Diagrams**Provided as supplementary material (electronic) with the 3rd edition of Inorganic Chemistry by Shriver and Atkins.
Maple Springs - CSE - 3101
A1 T1 A2 T2 A3 T3 FL24820 28.3 66 44 43 54 38.5 7558429 32 80 37.2 59 45.6 34.9 7928743 40 72 49 39 61 37.6 8005932 38.5 70 45 52 57 43 8431798 31.3
Laurentian - C - 3710
Chemistry 3710 Fall 2003 Test 11. (a) There are at least three possible ways of going about this problem: Linear regression: I performed a perfectly ordinary linear regression of T f (dependent variable) vs c. The slope is 1 806 29 0 006 K kg mol. T
Laurentian - C - 3710
Chemistry 3710 Fall 2001 Assignment 3 Solutions1. (a)(c) Again, ex is reasonably linear in the region of interest, so we can use the Taylor expansion method. e4 2 0 3 e4 2 0 3e4 2 e4 2 20 67 20 (d) f x is very at in the region of interest (Fig. 1)
Laurentian - C - 3710
Chemistry 3710 Fall 2003 Assignment 2Due: Monday, Sept. 22, 11:00 a.m. When appropriate, include brief discussions with your answers of the reasons why you chose particular data analysis techniques. 1. The heat evolved in the hydrolysis of 2,2-dimet
Laurentian - C - 3710
Chemistry 3710 Fall 2003 Assignment 2 Solutions1. The rst thing we need to do is to decide how to deal with that odd value generated by Stern and Dorer. Wibergs group has made three different measurements of the heat of reaction, and obtained three
Laurentian - C - 3710
Chemistry 3710 Fall 2003 Assignment 5 SolutionsWe start by plotting ln H2 O vs X2 1 XH2 O using the data from the last assignment. The data are pretty rough, so there probably isn't any point in doing a really complicated fit of the data. I decided
Laurentian - HLSC - 200501
Laurentian - GEOG - 2210
Annapolis Tidal Generating Station Completed in 1984 Only tidal plant in North America, 1 of 3 in world. Annapolis Royal, Bay of Fundy 30 million kwh per yearManufacturing &amp; Industrial Location Theory Chapter 10 Questions 7 lectures le
Laurentian - BIOL - 3310
Figure 5.2 Hierarchy of gene expression compartmentalizes embryo along A/P axisSegment polarity genes Dening A/P axis within a segmentFigure 5.25 Pair-rule genes (fushi tarazu and even-skipped) dene parasegments Engrailed expression is controlled
Laurentian - BIOL - 3310
Left-right handednessAsymmetric expression of Nodal, Lefty2, Lefty 1 and Pitx2 result in &quot;leftness&quot;Hamada et al., 20021Normal and abnormal development of left/right asymmetry in mammalsMcGrath and Brueckner, 2003Mutants in iv (lrd) gene -
Laurentian - BIOL - 4560
11/19/2007Root epidermal cell fate decisions 2. GEM 3. 3 Hypotheses of GEM interactions 4. Proposed Model for GEM interaction1.Atrichoblast Next to 1 cortical cellTrichoblast Next to 2 cortical cellsCDT1 Involved in initiationof DNA rep
Maple Springs - ITEC - 1630
Multithreading ITEC 1630 Week 8: MultithreadingYves Lesprance Readings: Horstmann Ch. 23 When multiple threads/processes run concurrently/in parallel Often timesliced, but may run in parallel on a multiprocessor Many applicationsMultithreading
Laurentian - CHEM - 200201
Chemistry 2810Assignment #2Topic: Atomic Theory, Periodicity, Lewis Diagrams, VSEPR Structures You are responsible for the materials covered in the lecture notes designated as Lectures 2 5 for this year. This involves the topic material identifi
Laurentian - CHEM - 200201
Chemistry 2810 Lecture NotesDr. R. T. BoerPage835.2Ionic structuresWe are now ready to consider a few of the most common ionic crystal structure types. Several of the Group 1 and 2 halides have become common model systems for structural typ
Maple Springs - CSE - 1020
Useful UNIX Commandspwd ls ls pattern ll or ls l(those are all lowercase L's, not 1's!)cd cd cd mvfilepath or cd ~ . path1 path2cp path1 path2 rm file rm r dirname mkdir dirname rmdir dirname man command pine pico filename man command(tab
Maple Springs - CSE - 3311
Finding the Classes Central decision in object-oriented design Looking for good and useful data abstractions As in all design work, need creativity and experience We'll look at someHow to nd the classes good ideas precedents reuse known pi
Maple Springs - MATH - 1090
York UniversityFaculty of Science and Engineering MATH 1090: Facts-List for the December 2008 Examination (held Feb 22, 2009)The following are the axioms of Propositional Calculus: In what follows, A, B, C stand for arbitrary formulae.Properties
Maple Springs - CSE - 4313
Assignment 1COSC 4313 3.0 Software Engineering Testing, Winter 2006, Section MAssignment #1 Due: Friday, January 27, 2006, 5pm. Format: Individual.Editing and Evaluating bugsThe purpose of this assignment is to give you experience editing bugs w
Maple Springs - CSE - 4080
Title: Adaptation of WIFI Radio for Mining ApplicationsSupervisor: Prof. Andrew EckfordDescription:This project involves adapting a WiFi radio for use in mining including a number of unique features:Simplified push-to-talk operation; Incorpora
Maple Springs - CSE - 3221
Computer Science 3321.03 Final Exam Dec. 17 1901Answer all questions in the space provided Make sure that you have 6 pagesStudent Last Name: _ Student Given Name: _ Student Id. No: __Question A B CValue 70 40 35Score1Question 1. [60 poi
Maple Springs - CSE - 3213
COSC 3213: Computer Networks Winter 2005 Solutions to Assignment # 4 Instructors: Amir Asif and Natalija Vlajic Review sections 6.1, 6.2, 6.3, 6.4.1, 6.4.2 before attempting the assignment. Question 1: A disadvantage of a broadcast network is the was
Maple Springs - CSE - 4411
Overview of Query EvaluationPlan: Tree of R.A. ops, with choice of alg for each op.Each operator typically implemented using a 'pull' interface: when an operator is 'pulled' for its next output tuple, it 'pulls' on its inputs and computes it.Over
Maple Springs - CSE - 4215
1Spread Spectrum(DSSS, FHSS)Required reading: Pahlavan 3.8, 3.12.3, 8.3.1CSE 4215 / 5431, Winter 2008 Instructor: N. VlajicPrinciples of Spread SpectrumProblem of Radio frequency dependent fading can wipe out narrow band signals for duratio
Maple Springs - CSE - 4213
C E4213 C pute Ne S om r tworks I IC hapte 1 r I ntroductionC oursepage http:/www.cs.yorku.ca/course : /4213S sm lide odifie fromJimKurose slide d s sI ntroduction1-1Whats theInte t: nuts and bolts vie rne wPC se r rve wire ss le laptop c
Maple Springs - CSE - 4313
CSE4313 SoftwareEngineering:TestingVassiliosTzerpos bil@cs.yorku.ca CSEB3024 Officehours:MW2:303:30 EvaluationAssignments Assignment1:10%Jan27 Assignment2:15%Feb17 Assignment3:15%Mar10 Assignment4:20%Apr6 Test1:20%Feb27 Test2:20%Apr3
Laurentian - CHEM - 1000
Practice for Midterm 5 Chem 1000 2004Your responsible for the following sections of the text: Chapters 5.1-5.7 Representative questions: 5.59, 61, 63, 66, 68, 70, 73.R = 0.08205 Latm/molK1 J = 1 kgm2 sec-2No = 6.022 x 1023 mol-1,, me = 9.11
UC Davis - LOG - 0010
FACULTY DEVELOPMENT WORKSHOP Sponsored by the Office of Medical Education and the UC Davis Health System Continuing Medical EducationHOW DO STUDENTS LEARN?A Developmental Approach to Difficult LearnersByC. Scott Smith, MDCo-Director, NW Region
Laurentian - MGT - 3040
2005McGrawHillRyersonLimited 2003TheMcGrawHillCompanies,Inc.Allrightsreserved.Chapter OneIntroduction To Corporate Finance2003TheMcGrawHillCompanies,Inc.Allrightsreserved.1.1Key Concepts and Skills Know the basic types of financial managem
Laurentian - C - 2720
Chemistry 2720 Fall 2005 Test 1Time: 75 min Marks: 54 Aids permitted: calculator, one 8.5 11-inch formula sheet Write all answers in the booklets provided. Useful data is given at the end of this exam paper. 1. Consider the following cyclic process
Laurentian - C - 2720
Chemistry 2720 Fall 2003 Quiz 4 SolutionsThere are two ways to solve this problem: The easy way and the hard way. The easy way: The equilibrium is Note that it doesnt matter how you balanced the reaction, provided everything you do from here on is c
Laurentian - C - 2720
Chemistry 2720 Fall 2002 Final ExaminationWrite all answers in the booklets provided. Time: 3 h Total marks: 107 Aids allowed: 8 1 11-inch information sheet, calculator. 2 Read the instructions for each section carefully. If you are asked to answer
Maple Springs - CSE - 6117
Date: January 11 2006 Lecturer: Eric RuppertCOSC 6117 Theory of Distributed Computing Page: 1 Lecture 3 Notes: Nelson MonizFigure 1: A Spanning TreeLast Day: broadcast and building a spanning treeInitiator: send m to all neighbours wait for
Laurentian - BIO - 1020
Outline Lecture 10 Wed. Sept. 29 Phylum Ascomycota: the cup fungi-includes truffles and morels(622-23) production of sexual spores in saclike asci-collected into an ascocarp Asexual reproduction by conidia Life cycle of an ascomycete (Fig. 31.10)
Maple Springs - CSE - 3461
Types of Text ComponentsOutline What is a widget? Buttons Combo boxes Text components Message boxes Output components cannot be edited Labels, Labeled borders (JLabel, TitledBorder) Tool tips, Message Boxes Input/output components can b
Laurentian - CHEM - 2200
Chapter 21 -1Chapter 21 Enzymes &amp; Vitamins What are enzymes and what do they do? They are biological _ that _ chemical reactions and function in aqueous solutions under _ conditions (_). E.g. A bag of table sugar in the store vs a spoon of it in _,
Maple Springs - CSE - 3213
A little &quot;sermon&quot; I like to insert into a class now and thenis as follows :Do _not_ divide humanity into two groups * the &quot;upper&quot; minority who produce innovations, invent, have things named after them, etc, etc - the &quot;stars&quot; and so on,
Maple Springs - LING - 6310
York University, Fall 2008Angermeyer: Languages in Contact (LING 6310 B)Written assignment: Bilingual language acquisition -Analyzing data from the CHILDES databaseGo to the CHILDES webpage (Child language data exchange system) http:/childes.ps
Maple Springs - CSE - 4313
Assignment 1CSE 4313 3.0 Software Engineering Testing, Winter 2007, Section MDue: Friday, February 2, 2007, 3pm. Format: Individual.Editing and Evaluating bugsThe purpose of this assignment is to give you experience editing bugs written by other
Maple Springs - ECON - 3000
York University Department of Economics Introductory Financial Accounting for Economists Econ 3580 3.0B / Thursdays 8:30 11:30 Fall 2003Course Director: Mozaffar Khan, MBA, MA Office Hours: Tuesdays, 1:30 3:30. T.A.'s: T.A. office hours: Required
Maple Springs - ECON - 1000
YORK UNIVERSITY Department of Economics - Faculty of Arts Economics 1900.03A Introduction to Economics for Non-Majors Fall 2004INSTRUCTOR: OFFICE: PHONE: OFFICE HOURS: EMAIL: WEB-SITE:Professor K. MacKinnon 1088 Vari Hall 736-5083 ext. 77047 Mond
Maple Springs - ECON - 3000
UNIVERSITY Department of Economics - Faculty of Artshttp:/dept.econ.yorku.ca/Economics AS/ECON3240 3.0M Labour Economics - Theory Winter 2005 F 2:30 5:30 RS137Instructor: Professor A. NoordehOffice: 1078 Vari Hall Phone: 736-2100 Ext. 33344 Of
Maple Springs - ECON - 3000
AS/ECON 3230 3.0Urban EconomicsLectures: Tues. 2:30-4:30, Thurs. 2:30-3:30 Fall 2003 Professor George Fallis Office: 1048 Vari Hall Office Hours: Wed. 12:30-2:30, Thurs. 1-2 Outline: This course deals with the economic analysis of cities, with sp
Maple Springs - ECON - 3000
York University Faculty of Arts Department of Economics Winter 2006 Economics 3199 3.0M Approaches to Global Economics Instructor: Dr. Ricardo Grinspun 240A York Lanes (416) 736-2100 ext. 77049 e-mail: ricardo@yorku.ca Mailboxes are located at the Ec
Maple Springs - ECON - 1000
AS/ECON/MATH 1530.03 Fall/Winter 04/05 Introductory Mathematics For Economists ISection A MWF 10:30-11:20 S137Ross Section B MWF 11:30-12:20 S137R Instructor: Prof. M. Abramson N615Ross 736-5250 or 736 2100 ext. 33769 e-mail: abramson@mathstat.yorku
Maple Springs - ECON - 4000
Page 1 of 7ECON4210 3.0 M - Econometrics Winter Semester, January-March, 2005Instructor: Nuri Jazairi Office: 1040 Vari Hall Hours: MW 8:30am-10:00am TA: Emilia Barbu Class meets in VH 3006 MW 11:30am-12:50pmCourse MaterialsLecture Notes (.pdf
Maple Springs - ECON - 1000
AS/ECON/MATH1540.03M,NFall/Winter 03/04Introductory Mathematics For Economists IISection M MWF 10:30-11:20 TEL 0001 Section N MWF 11:30-12:20 TEL 0001 Instructor: Prof. M. Abramson N530Ross 736-5250 or 736 2100 ext. 33946 abramson@mathstat.yo
Maple Springs - ECON - 3000
Course Outline(CLH E, TR 16.00-17.30) Fall 2004ECONOMICS 3140.03AF - MONETARY ECONOMICS Instructor: Office: Office Hours: Phone: E-mail: Course Website: Professor J.N. Smithin Vari Hall 1042 T, TH 14.30 15.45 416-736-2100, ext. 20670 jsmithin@yo
Laurentian - BIO - 1020
1. Beside each of the taxonomic groups given in List A: - identify (by numeral) all the items from List B that are typical of that taxon - asterisk any items that are diagnostic of that taxon List A Taxons List B Characters(any character can be use
Laurentian - CS - 2720
'CS 2720Practical Software DevelopmentUniversity of Lethbridge$Design Patterns A design pattern is a &quot;general solution&quot; to a particular class of problems, that can be reused. They are applicable not just to &quot;design&quot;. You can think of patt
Laurentian - CS - 2720
'CS 2720Practical Software DevelopmentUniversity of Lethbridge$ 'CS 2720Practical Software DevelopmentUniversity of Lethbridge$Collaborative Development Pair Programming Developers share responsibilities creating code. Developers ar
East Los Angeles College - EC - 351
EC351 Mathematical Economics2008/2009Problem Set 61.For the following difference equations: a) yt+1 = 3/16 + y2t b) yt+1 = 4 + (9 / 4yt) find the steady state points, determine whether they are locally stable and sketch a phase diagram to inv
Laurentian - BIO - 3000
DNA repair - 3Nucleotide excision repair (NER)BER can not deal with all types of damage. The huge variety of DNA-reactive chemicals, huge variety of alterations that can be produced by radiation and by oxidative and free radical attack on DNA gene
East Los Angeles College - EC - 351
EC351 Mathematical Economics2008/2009Problem Set 51.A perfectly competitive industry has the supply function: Qt = F + Gpt quantity: Qt = A + Bpt + Qt-1 where A &gt; 0, B &lt; 0, 0 &lt; &lt; 1 and t = 1, 2, 3, . where F, G &gt; 0 and t = 0, 1, 2, .The de
Maple Springs - PSY - 2022
STATISTICAL METHODS II WINTER, 2004 SUPPLEMENTARY COURSE MATERIALMultiple Regression - SPSS Outliers and Cases with Undue InfluenceERIN C. ROSS, Ph.D.NOTE: Material contained in this document is for use as a supplement to material presented in
Laurentian - BCHM - 200803
MembranesMembranesVoet Biochemistry: Chapter 12, Pages 390 415 Voet Fundamentals: Chapter 9, Pages 260 277Essential components of all living cells (define boundary of cells) exclude toxic ions and compounds; accumulation of nutrients ener
Laurentian - BCHM - 200803
9/1/2008Biochemistry 2000 Introductory BiochemistryReview MaterialLife and Cellular ArchitectureChapter 1, Voet Biochemistry Chapter 1, Voet FundamentalsAqueous Solutions / WaterChapter 2, Voet Biochemistry Chapter 2, Voet FundamentalsTher
Maple Springs - WRIT - 2300
AS/WRIT 2300: An Introduction to Research for Writers ASSIGNMENT# 4: RESOURCES IN BUSINESS AND INDUSTRY DUE DATE: In lecture December 6, 2005. 10% of final grade1. Please select one of the writing assignments listed on the back of this page. Each a
Maple Springs - SOSC - 2340
Writing Tips for Essays &amp; Papers When: Wednesday, October 22, 2008, 10 11am Where: N204B, Bennett Centre for Student Services Details: Term paper coming due? Essay to write? Academic writing can be a challenge. This workshop will help you plan, orga
Laurentian - MGT - 200301
Mgt 3830 Canada Home RentersMidterm ExamOctober 23, 2000Canada Home Renters is a national company that intends to set up agencies in all major Canadian cities. Similar to real estate agencies, that help people buy and sell homes, CHR will help
Laurentian - MGT - 200203
MGT 2070 Assignment #8 Answers 12.9 George Heinrich uses 1,500 per year of a certain subassembly that has an annual holding cost of $45 per unit. Each order placed costs George $150. He operates 300 days per year and has found that an order must be