Performance/load performance implement parallel mutex

From Apache OpenOffice Wiki
< Performance
Revision as of 06:20, 16 April 2010 by Zengliangjun (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Performance 170.png
Performance Project

performance.openoffice.org

Quick Navigation

Team

Communication

Activities

About this template


Please view Performance/load_performance_implement about implement. This document explain parallel and dead lock problem and resolve plan.

Problem

Now I'd finished the part of odf impress's code, and wish is:

settings.xml when processing the <office:settings> element, it's subelement will be parallel processed.

styles.xml when processing the <office:styles> and <office:automatic-styles> and <office:master-styles> elements, it's subelement will be parallel processed.

content.xml when processing the <office:presentation> and styles's elements, it's subelement will be parallel processed.

When running, that will dead lock.

Analysis

We can understand OOo had three type mutex. (1)Global Mutex: It can be get from osl::Mutex::getGlobalMutex(), and can be used at a simple critical which lock section no other mutex.

(2)Solar Mutex: It can be get from Application::GetSolarMutex(), and can be used any where. which lock section can had other mutex, and can be spin lock. It's used at the uno implement class's method section, main function is synchronization UNO environment.

(3)General Mutex: It can be used other thread and OOo main thread, etc. Which can be as same type.

So, Dead lock will be, It like this:

Parallel dead lock.jpg

Personal tools