CS 3340 Windows Programming Prog4 Test2 1. 2 Program5 Due Friday, March 27.

Slides:



Advertisements
Similar presentations
BOARD POLICY GRADES 3, 6, 8. Passing grade on final report card in READING AND MATH Summer school not required, promote to next grade, participate in.
Advertisements

Class 18: Concurrency on Mars Fall 2010 UVa David Evans cs2220: Engineering Software Image: Michael Dewey-Vogt.
A classroom experiment. Transparency – everyone could see Moral: don’t need too much. Be happy to have needs met Peer pressure Monitor made sure – accountable.
Concurrency (3) CSE 132. iClicker/WUTexter Question The following four numbers are in 8-bit 2’s complement form: Which.
Department of Computer Science Southern Illinois University Edwardsville Spring, 2010 Dr. Hiroshi Fujinoki CS 547/490 Network.
Classic Synchronization Problems
CS444/CS544 Operating Systems Synchronization 2/16/2006 Prof. Searleman
CS533 Concepts of Operating Systems Class 1 Course Overview.
CS533 Concepts of Operating Systems Class 3 Data Races and the Case Against Threads.
Assignment – no class Wednesday All: watch the Google Techtalk “Getting C++ Threads Right” by Hans Boehm at the following link in place of Wednesday’s.
BA271 Week 9 Lecture Using forms in Access. Status Report … Review where we are … –Midterm – Graded! –Final websites – Graded! –Access #1 – Graded! –Access.
Concurrency: Mutual Exclusion, Synchronization, Deadlock, and Starvation in Representative Operating Systems.
CS 280 Data Structures Professor John Peterson. Goals Understand “Programming in the small” Java programming Know what’s under the hood in complex libraries.
CS444/CS544 Operating Systems Synchronization 2/21/2007 Prof. Searleman
Object-Oriented Programming in Visual Basic.NET. Overview Defining Classes Creating and Destroying Objects Inheritance Interfaces Working with Classes.
19-Aug-15 About the Chat program. 2 Constraints You can't have two programs (or two copies of the same program) listen to the same port on the same machine.
To define a class in Visual Basic.NET, you can follow this general procedure: 1. Add a class to the project. 2. Provide an appropriate file name for.
CSE-321 Programming Languages Overview POSTECH March 4, 2014 박성우.
MARK 362 Professional Selling Monday, March 15, 2010.
Larry Clark My webpage:
Wednesday, March 18 Much Ado about Nothing. Today Last Quiz: Do it with a partner but it’s CLOSED BOOK! Last Quiz: Do it with a partner but it’s CLOSED.
THE ENGLISH LANGUAGE. Teacher info  
1 Program5 Due Friday, March Prog4 user_thread... amount = … invoke delegate transact (amount)... mainThread... Total + = amount … user_thread...
OPERATING SYSTEMS Frans Sanen.  Recap of threads in Java  Learn to think about synchronization problems in Java  Solve synchronization problems in.
COMP 2320 (3 units) Operating Systems Name: Prof. Joseph NG Office: R730 (Run Run Shaw Building) Phone: HomePage:
Introduction to Operating Systems CCSA 125 L.Deema ALShoaibi.
Bellringers Beginning of school procedures. Wednesday, August 20 In complete sentences, answer the following questions on your own sheet of paper. 1.
CS533 Concepts of Operating Systems Class 1 Course Overview.
CS 2340: Programming in VB Lab 2 Due 9 pm, Friday, September 14 1.
Lab 2 Due 9 pm, Friday, September Put a “&” in button text The char after “&” is underlined and becomes the Access Key Example Text of btnExit:
1 Prog4 user_thread... amount = … invoke delegate transact (amount)... mainThread... Total + = amount … user_thread... amount = … invoke delegate transact.
Problems with Semaphores Used for 2 independent purposes –Mutual exclusion –Condition synchronization Hard to get right –Small mistake easily leads to.
CS 152: Programming Language Paradigms March 19 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
BEGINNING OF SCHOOL PROCEDURES Bellringers. Monday, August 20 In complete sentences, answer the following questions on your own sheet of paper. 1. When.
Lecture 9 Page 1 CS 111 Online Deadlock Prevention Deadlock avoidance tries to ensure no lock ever causes deadlock Deadlock prevention tries to assure.
FIN 235 SPRING All Rights ReservedIntro & Chapter 1 Page 2 before A. A. Skim read the assignments before class * Reading the material the night.
June 9 th & 10 th. DO NOW As per last class’ instructions, you have 45 minutes to complete your Ch. 28 POGIL. After 45 minutes, we will take an open notes.
Chapter 71 Monitor for Reader/Writers  Synchronizes access if all processes follow.  If some don’t go through monitor and database is accessed directly,
CS 3340 Windows Programming. Course Evaluation Course Outcomes Not about the instructor Do it Today! 2.
Homework-6 Questions : 2,10,15,22.
Readers/Writers Problem  Multiple processes wanting to read an item, and one or more needing to write (Think of airline reservations…)  Rather than enforce.
WELCOME BACK FROM BREAK YOU WILL NEED TO BE SEATED, WITH ALL YOUR MATERIALS In case your forgot, your materials are: -pencil (sharpened) -journal -a respectful.
Honors Calculus Mr. Lineweaver 3rd Block First Semester Harrisonburg High School.
6.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 6.5 Semaphore Less complicated than the hardware-based solutions Semaphore S – integer.
Sections Inheritance and Abstract Classes
CS 3340 Windows Programming
COEN346 Tutorial Monitor Objects.
Day 13 Concurrency.
Day 15 Concurrency.
FINAL EXAM INFORMATION
British Lit. Abbreviated Syllabus
CS533 Concepts of Operating Systems Class 1
CS 111 Digital Image Processing
Midterm Review CSE4/521 B.Ramamurthy 1/11/2019 B.Ramamurthy.
Database Management Systems CCSA 211
ME 280 Lab Final Project Begins March 20th for sections 4 and 5, and March 21st for sections 1, 2 and 3 Due April 17th for sections 4 and 5 and April 18th.
Midterm Review CSE4/521 B.Ramamurthy 2/23/2019 B.Ramamurthy.
ME 280 Lab Final Project Begins March 26th for sections 4 and 5, and March 30th for sections 2 and 3 Due April 21st for sections 4 and 5 and April 22nd.
BIT 143: Programming & Data Structures in C#
Midterm Review CSE421A,B B.Ramamurthy 4/12/2019 B.Ramamurthy.
Midterm Review CSE421 B.Ramamurthy 4/18/2019 B.Ramamurthy.
Midterm Review CSE4/521 B.Ramamurthy 4/19/2019 B.Ramamurthy.
Midterm Review CSE4/521 B.Ramamurthy 5/5/2019 B.Ramamurthy.
ME 280 Lab Final Project Begins March 22nd for sections 4 and 5, and March 23rd for sections 1, 2 and 3 Due April 19th for sections 4 and 5 and April 20th.
Midterm Review CSE4/521 B.Ramamurthy 5/18/2019 B.Ramamurthy.
CIS 336 STUDY Dreams Come True / cis336study.com.
Welcome to Communication English
Midterm Review CSE4/521 B.Ramamurthy 9/10/2019 B.Ramamurthy.
(Please don’t me on the DongA website)
Presentation transcript:

CS 3340 Windows Programming Prog4 Test2 1

2 Program5 Due Friday, March 27

ADT: Database Total ReaderCount WriterCount DataObj (for Monitor) 3 TotalValue (Get & Set) IncreaseReaderCount DecreaseReaderCount IncreaseWriterCount DecreaseWriterCount TheDatabaseStatus (ReadOnly) LockDataObj ReleaseDataObj The properties/methods don’t enforce mutual exclusion.

ADT: Database Does not guarantee any specific rules to access the database. It provides all necessary methods so the clients can enforce different rules to access the database. 4

ADT: ReaderWriter Will enforce the following rules to access the database: Readers can share the database. Writers require exclusive access to the database. First In First Out (FIFO) rule. 5

ADT: ReaderWriter FIFOQueue _database endProgram _thread _passMag _mainForm _ReaderWriterEvent _rondomGenerator 6 TheDatabase (WriteOnly) WakeupNextWhenExiting FinishReadWrite DisplayMsg (WriteOnly) MainForm (WriteOnly) ID (ReadOnly) Type (ReadOnly) Spinup Wakeup Run (MustOverride)

ADT: Reader Sub-class of ReaderWriter Overriding the following: Type ID Run 7

ADT: Writer Sub-class of ReaderWriter Overriding the following: Type ID Run 8

Invoking Delegate ‘ Cannot do it this way! _passMag.Invoke(ID, state, _database.TotalValue) ‘ Must ask the main form to invoke the delegate! _mainForm.Invoke(_passMsg, ID, state, _database.TotalValue) 9

ADT: ReaderWriterForm txtTotal lstWaiting lstWorking txtLog btnNewReader btnNewWriter btnExit dummyThread Delegate 10 FormLoad (Sub New) Create a Database object for ReaderWriter Class Delegate Sub New Reader set MainForm & DisplayMsg New Writer set MainForm & DisplayMsg Exit

Final Exam (Test4) Threads! 11

Project VB Grader Threads Assembly Midterm grade B (A-) or above. me by Wednesday. 12