Presentation of practical exercise 4 - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Presentation of practical exercise 4

Description:

Presentation of practical exercise 4. Discussion. More questions? TDt4190 Newsgroup ... Use the assigned port number of your group at the demonstration. ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 8
Provided by: ottarvik
Category:

less

Transcript and Presenter's Notes

Title: Presentation of practical exercise 4


1
Presentation of practical exercise 4
  • Discussion
  • More questions?
  • TDt4190 Newsgroup

2
Program Testing
  • Make your program downloadable at demonstration
    session.
  • Use the assigned port number of your group at the
    demonstration.
  • Do not print-out the file final_results.txt.
  • 70 pages text.
  • We will keep the electronic version of the file.
  • Submit your reports to the assistant.
  • Short description (max 5 pages 2000 words) on
    program design.
  • Program source code (style and documentation).

3
Program Testing
  • One Windows server.
  • kjor_test_case.bat
  • kjor_en.bat
  • kjor_to.bat
  • Many Windows server.
  • See guide on TDT4190 website
  • kjor_3.bat
  • kjor_5.bat

4
lock method in Resource.java
  • public synchronized boolean lock(int
    transactionId)
  • if(lockOwner null)
  • lockOwner new Integer(transactionId)
  • return true
  • else
  • // Wait for the lock
  • try
  • wait()
  • catch (InterruptedException ie)
  • return false
  • lockOwner new Integer(transactionId)
  • return true

The thread releasesownership of this monitor
5
Program Testing Results of sample test cases A-J
6
  • S4 or S1 can detect a deadlock.
  • Which transaction will be aborted?
  • T2 at S4 or S4 tells S3 or S1 to abort their
    transactions

7
Program Testing
  • Main requirement
  • Detecting deadlocks in both timeouts and edge
    chasing scenarios
  • Optional (i.e., not required)
  • Restart aborted transactions
  • Priority of transactions (e.g., life-time, local
    vs. remote servers)
Write a Comment
User Comments (0)
About PowerShow.com