|
|
|||||
| Computer Laboratory Concurrent Systems and Applications |
||
| Computer Laboratory > Course material 2003-04 > Concurrent Systems and Applications |
Concurrent Systems and Applications
Principal lecturer: Dr Timothy Harris |
| 1. | Fri Oct 10 | Introduction |
| 2. | Mon Oct 13 | Objects and classes |
| 3. | Wed Oct 15 | Packages, interfaces, nested classes |
| 4. | Fri Oct 17 | Design patterns |
| 5. | Mon Oct 20 | Reflection and serialization |
| 6. | Wed Oct 22 | Graphical interfaces |
| 7. | Fri Oct 24 | Memory management |
| 8. | Mon Oct 27 | Native methods, class loaders |
| 9. | Wed Oct 29 | No lecture |
| 10. | Fri Oct 31 | No lecture |
| 11. | Mon Nov 3 | Threads |
| 12. | Wed Nov 5 | Mutual exclusion |
| 13. | Fri Nov 7 | Deadlock |
| 14. | Mon Nov 10 | Condition synchronization |
| 15. | Wed Nov 12 | Worked examples |
| 16. | Fri Nov 14 | Low-level synchronization |
| 17. | Mon Nov 17 | Distributed systems |
| 18. | Wed Nov 19 | Network sockets (TCP and UDP) |
| 19. | Fri Nov 21 | RPC and RMI |
| 20. | Mon Nov 24 | Transactions, isolation, serializability |
| 21. | Wed Nov 26 | Enforcing isolation |
| 22. | Fri Nov 28 | Crash recovery and logging |
| 23. | Mon Dec 1 | Examples class 1 |
| 24. | Wed Dec 3 | Examples class 2 |
Study materials
Challenge
Can you write an additional Java class which creates an object that, when passed to the test method causes it to print Here!?? As I say in the code, editing the class A itself, or using library features like reflection, serialization or native methods are considered cheating! I'll give a copy of Operating Systems to the first person to get an answer. I'll provide some hints in lectures if nobody can spot it in a week or so -- none of the PhD students has got it yet.
public class A
{
// Private constructor tries to prevent A
// from being instantiated outside this
// class definition
//
// Using reflection is cheating :-)
private A() { }
// 'test' method checks whether the caller has
// been able to create an instance of the 'A'
// class. Can this be done even though the
// constructor is private?
public static void test(Object o) {
if (o instanceof A) {
System.out.println ("Here!");
}
}
}
Additional resources