User and System Time in MT programs

User and System Time in MT programs - User and System Time...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
User and System Time in MT programs Command “time” gives User Time = Time spent in user mode System Time = Time spent in Kernel mode Real Time = wall clock time. In a single processor machine User time + system time < Real time Why? Overhead of other programs running in the same machine.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
User and System Time in MT programs In a multi processor machine User time + system time < N* Real time Where N is the number of processors
Background image of page 2
Atomic Sections in Java In Java atomic sections are implemented using the “synchronized” keyword. No explicit calls to mutex_lock()/mutex_unlock() are needed. Any Java object can serve as a lock. Java implements synchronization in three ways: Synchronized Class Method Synchronized Instance Method Synchronized Statement
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
All the statements in the method become the atomic section (synchronized block) and the Class object is the lock. class class_name {
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

User and System Time in MT programs - User and System Time...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online