Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Serialization

Serialization This forum is for modifications to the serialization code of RunUO

Reply
 
Thread Tools Display Modes
Old 02-21-2005, 01:58 AM   #1 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Question Threaded WorldSave overlook?

Right now in the Save method of world you have
Code:
			if ( m_MultiProcessor )
			{
				Thread saveThread = new Thread( new ThreadStart( SaveItems ) );

				saveThread.Name = "Item Save Subset";
				saveThread.Start();

				SaveMobiles();
				SaveGuilds();
				SaveRegions();

				saveThread.Join();
			}
			else
			{
				SaveMobiles();
				SaveItems();
				SaveGuilds();
				SaveRegions();
			}
Isn't SaveItems missing from the threaded save?
Code:
			if ( m_MultiProcessor )
			{
				Thread saveThread = new Thread( new ThreadStart( SaveItems ) );

				saveThread.Name = "Item Save Subset";
				saveThread.Start();

				SaveMobiles();
				SaveItems();
				SaveGuilds();
				SaveRegions();

				saveThread.Join();
			}
			else
			{
				SaveMobiles();
				SaveItems();
				SaveGuilds();
				SaveRegions();
			}
UOT is offline   Reply With Quote
Old 02-21-2005, 02:06 AM   #2 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,845
Default

No, the whole purpose of the threaded save is that it saves items concurrently in a thread started at the begining instead of saving them in line with everything else.

Thus this:
Code:
Thread saveThread = new Thread( new ThreadStart( SaveItems ) );

				saveThread.Name = "Item Save Subset";
				saveThread.Start();
Calls SaveItems() from a new thread.... The old thread then continues on to save mobiles, etc.
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Old 02-21-2005, 02:08 AM   #3 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

Can't beleive I didn't see the save items in the new thread. I'll go hide under a rock now :P
UOT is offline   Reply With Quote
Old 03-08-2005, 07:37 AM   #4 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

does this mean that RunUO does indeed support multithreading? and how recent a change was this (as in which version was it implimented)?
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline   Reply With Quote
Old 03-08-2005, 10:56 AM   #5 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,845
Default

RunUO has always been "multithreaded"

This change went in with 1.0.0, prior to that there was a different type of "threaded" world save that was implimented around beta 20. And RunUO's network has always been fully multithreaded.
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Old 03-08-2005, 12:29 PM   #6 (permalink)
God of Pandora
 
KillerBeeZ's Avatar
 
Join Date: Jun 2003
Location: Gainesville GA
Age: 31
Posts: 2,000
Default

Quote:
Originally Posted by Zippy
RunUO has always been "multithreaded"

This change went in with 1.0.0, prior to that there was a different type of "threaded" world save that was implimented around beta 20. And RunUO's network has always been fully multithreaded.
Thank you

I was told a while ago that RunUO doesnt use multithreading, would this be the same as hyperthreading? if not, then that might be what I heard
__________________
The Den of KillerBeeZ...Kender's Komments, uncensored commentary from the Kender. Plus anything else the Kender might have in his pouches.
KillerBeeZ is offline   Reply With Quote
Old 03-08-2005, 12:51 PM   #7 (permalink)
Forum Expert
 
TheOutkastDev's Avatar
 
Join Date: Sep 2002
Location: Houston, Texas
Age: 21
Posts: 3,933
Default

Basicly, Hyperthreading is where you have one physical processor that represents itself as two "virtual" processors to the operating system, allowing it to execute 2 threads in parallel.

Whenever a thread executes on one of the processor's pipelines, it may do something that causes the thread to stall, ie.. floating point calculation, memory read ect... Whenever this happens, an HT enabled system can throw other threads into the other unused parts of the pipeline.
TheOutkastDev is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5