Static data and multiple CPUs

Hi, could anyone explain how data in static data (like static classes, static members of a class etc.) are handled across multiple CPUs in a multi-threaded application?
Thanks,
Lei

nope
its got way too much to do with the JVM and OS
thread scheduling and optimisation (particularly in multiple CPU is a nightmare)
it would also (if the optimisation went that far) depend on the architecture of the CPU in question..
Althon MP each have processor cache (no surprise i guess) but the clever bit is that there is a very high speed buss to share the cache
so in that case (i would guess) that one CPU could handle the static methods for a particular class, or it might be that either CPU could excecute code held in the cache of the other chip
i really dont think that there would be set rules for how java deals with such low level optimisation

Similar Messages

  • Reinitialization of static data by multiple applets

    Hi,
    I have a problem with initialization of shared static data by multiple applets. I have three applets running inside of different HTML frames in a multi-frame HTML framework. Applets are loaded as JAR files. In addition, every applet has one or two 3rd party JARs listed in the APPLET tag. Applets share the same codebase and run inside the same JVM.
    I use static data to perform the inter-applet communication. This is simply a static list of applet references that is being maintained in the base applet class (all applet classes are inherited from that class). The problem is that when applets get constructed, the static data in the base class sometimes gets reinitialized multiple times. As I understand, the static data should be initialized just once on initial load of the base applet class (applets have the same codebase).
    This problem seems to be caused by the race condition (applets initialize on different threads launched by the browser). Under some circumstances (I change the number and order of JARs, etc.) everything works fine. I can reproduce this problem on both Explorer 5.x and Netscape 4.7 (did not try others). I run applets using native browser's JVM.
    Has anybody had such problem before? Is it caused by the large number of JARs ? Is there any way to guarantee that static data will be initialized once in the multi-applet environment ?
    Thanks,
    hparfen

    Hi,
    Did you find something to solve your problem because I have exactly the same.
    Tony

  • Regular expressions with dates and multiple matches

    I am currently attempting to automate modifying start and end dates within a .config file via powershell but I am having issues identifying the regular expression for the end date section since both are on the same line in the file. Below is the string that
    I want to change.
    Sometimes the dates are blank and sometimes the dates are filled in.
    Dates are always in the same format (yyyy-MM-dd hh:mm).
    I also want to note that there are multiple instances of 'StartDate="" EndDate=""' for other applications throughout the same config file so I cannot limit the expression to not include the App name. 
    I do not want to limit the search to a line number since there are instances where admins will add an extra space in the config file that may throw off the line number.
    I want to replace the dates or lack there of in their respective spots on the line below via powershell:
     <App name="TestApp" StartDate="2012-03-22 13:30" EndDate="">
    I am successfully able to use 
    $startRegex = '(?<=<App name="TestApp" StartDate=")([^"]*)'
    to replace the StartDate but I can't seem to single out the EndDate with regular expression. What expression can I use to have it ignore what is in the quotations after StartDate and only pay attention to the EndDate value?
    Below is a snippet: 
    $path = d:\inetpub\website\app.config
    $startRegex = '(?<=<App name="TestApp" StartDate=")([^"]*)'
    $starttime = (get-date).ToString("yyyy-MM-dd hh:mm")
    (gc $path) -replace $startregex, $starttime | set-content $path
    I want to accomplish the same for EndDate.
    Thanks in advance!

    If you do this with XML it will be painless and less prone to error.
    $n=$xml.SelectSingleNode('//App[@name="TestApp"]')
    $n.StartDate=$newstartdate
    $n.EndDate=$newenddate
    $xml.Save($filename)
    \_(ツ)_/

  • Static NAT and multiple WAN (DSL) ports

    Hi,
    we have a hardware router with 3 ADSL/SDSL lines. The SDSL has a range of public IP addresses.
    We assigned these public IP adresses as DMZ to the hardware router, and added some of the IP's as secondary IP addresses on the BM's public interface. Filters have been disabled for testing, and we could ping the secondary IP's from the internet.
    In the next step, we set up a static NAT to a server in the private LAN, which should be reached from travelling users. Pinging the natted address from the internet reached the server (seen with etherreal), but BM did not set the public IP as the source of the ping reply.
    For testing, we set a static route on the BM to the PC on the internet, using the DMZ as default gateway, which was used for testing, and that worked fine.
    Is there a chance to get the reply from the natted Server back to the DMZ, where the request came from? Setting static routes isnt possible, because users come with changing IP addresses.
    Detlef

    In article <[email protected]>, Pinkel wrote:
    > Is there a chance to get the reply from the natted Server back to the
    > DMZ, where the request came from? Setting static routes isnt possible,
    > because users come with changing IP addresses.
    >
    This is a routing issue, with a possible workaround.
    When the BMgr server gets a packet it needs to route, it's going to look
    in its routing tables to know which interface to send it from, and which
    IP address will be the next hop. Traffic coming inbound will naturally
    leave the private interface and route normally to the internal address.
    Traffic going back to the internet is another matter.
    Traffic from the internet is, naturally, going to have a public IP
    address that will not be in the BMgr server's routing tables, unless you
    put in a static route. If the destination address for a packet is not
    in the BMgr routing table, it will send the packet to the only choice it
    has: the default route. Thus, all outbound non-static-nat'd traffic
    will end up going out the default route.
    I have used, on occasion, a workaround that forces traffic coming in
    from one link to go back out that link. If you think of how BMgr
    (NetWare) is routing replies to these packets, you realize that the only
    way it is going to go back out link B (if link A is the default) is if
    the packet actually comes from the address for link B. The way I've
    made this happen is to enable dynamic NAT on the link B address. (For
    instance, Cisco router with link B, totally different subnet - due to
    isp changeover - from link A. Link A was the default. Enabled NAT with
    overload on link B LAN address, and BMgr then saw all packets coming in
    from that router as local packets simply coming from the link B LAN
    address. So it replied to link B. However, all outbound (non-reply)
    traffic to the internet still went out link A. I've also configured a
    second internet link for VPN only usage, but that was no more than a
    static route entry.)
    Craig Johnson
    Novell Support Connection SysOp
    *** For a current patch list, tips, handy files and books on
    BorderManager, go to http://www.craigjconsulting.com ***

  • Best excel layout for multi months of data and multiple metrics?

    Are there ways around a pivot table?
    Xcelsius Enterprise - SP3  BOXI31 SP3
    Requirement;
    Chart (combo - line and bar)
    Monthly data (refresh)
    13 rolling months
    4 "levels" of filtering
    16 metrics
    Do I have to use a pivot table to align the 13 months across the top of the sprdsht,  trying to utilize QaaWS, however,  we still would have to create the pivot table after refresh.  Looks like Rich Client might work to push universe data to excel?
    Edited by: Michael on Jul 13, 2010 4:51 PM

    Simple solution:
    Make a filter box (dropdown) and set it so that there are 4 of them.
    Write out all your data alike: Option1 Option2 Option3 Option4 Metric Score
    Put the filter box on the entire area of your data (all 6 columns), it will automatically make the 4 filters populated with the possibilities in the dataset.
    Copy the resultrows of the filtering to another area, put the chart on that one (and use index or so to pick the metric you want to see).
    Edited by: Roeland Nieuwenhuis on Jul 14, 2010 1:32 PM

  • Date and multiple issues

    hey everyone,
    I have a strange issue in iphoto 5. occasionally, when i import photos, it places some of them way back in 2001! they still come up at the right date if i search using the calendar, and the date is right in the info pane, and they are filed in the right folder in the finder. but, when i view my whole library by date, some of my recent photos are up a the beginning of the library in 2001. any suggestions?
    perhaps unrelated, but also odd, a number of my recent photos also have 2 thumbnails in the library. if i try to delete one of them, they both go away! its not a big deal, but nevertheless annoying.
    any suggestions?
    thanks
    jason

    hey everyone,
    I have a strange issue in iphoto 5. occasionally, when i import photos, it places some of them way back in 2001! they still come up at the right date if i search using the calendar, and the date is right in the info pane, and they are filed in the right folder in the finder. but, when i view my whole library by date, some of my recent photos are up a the beginning of the library in 2001. any suggestions?
    perhaps unrelated, but also odd, a number of my recent photos also have 2 thumbnails in the library. if i try to delete one of them, they both go away! its not a big deal, but nevertheless annoying.
    any suggestions?
    thanks
    jason

  • LR 4 and Multiple CPUs

    I am planning to purchase a new computer but before I do I wanted to pose a question to the community at large.  First and foremost, I have read up on all the techniques used to increase the performance of LR.  I am considering purchasing a Dual 4 Core Xeon or Dual 6 Core Xeon with 16GB of memory and perhaps 3-4 internal 7200 RPM disks, at least one of them to be dedicated to cache. My question is the following:  Will LR take advantage of mutiple processors or is this just overkill on my part?? 

    With "create a new folder" you mean that you want to import from a previously not used folder, which is not yet part of your folders-panel list?
    I had a similar problem on my Win7-64bit OS, LR 4.1 still, too, some days ago.
    I imported from such a new source-folder, but it still did not show up in my folders-panel-list for quite a while. Despite the "previous import" showing the image, and the "show in explorer"-command working.
    No real solution did I find, but eventually, after several redundant imports (of duplicate then) brought the folder into the panel list.
    No, LR cannot get *full*.
    Cornelia

  • SRM7 grouping items in RFx despite of multiple delivery date and locations

    Hi Gurus,
    I need to know for a proposal of SRM 7 implementation, WITHOUT  the newest E-sourcing component,  how to solve the following scenario:
    We are gonna use the SRM7 classic scenario where PO is created in ERP and Shopping cart  is created in SRM.
    In Plan-Driven Scenario for Third Party Sales Order, TPO will be created in ERP, Shopping carts, RFx and contract in SRM, PO will be triggered in SRM and created in ERP.
    1.       We have 8 main customers (Sold-To Party), 50 Items, 40 Ship-To (locations) 4 delivery dates for each item to each location.
    2.       Under Each Sold-To Party, there are several Ship-To party (Locations)
    3.       For each location, there could be multiple delivery dates. 
    4.       In the Third Party Sales order (TPO), each material could be repeated several times because of the multiple delivery dates and multiple locations;
    5.       After saving TPO, the system automatically generates Purchase Requisition (PR) in background.
    6.       For each delivery date in TPO, the system creates a separate line in PR. These lines will be converted into line items in shopping carts in SRM.
    7.        Total # of lines in PR would be:
    a.       8 (main customer) X 50 (items) X 40 (locations) X 4 (delivery dates) =  64000 lines in PRs è same number of lines will be created in SRM in Shopping carts (SC)
    8.       In sourcing, we have the option to convert these SCu2019s into RFx. This means we will send 64000 lines for the vendors to give their quotes while we actually have only 50 items.
    My questions:
    1.       In standard SRM, is there a way to create RFx for the total quantities for item? i.e. can the system read all SCu2019s and sum all the qty for each item, regardless, of the locations, customers, delivery dates and create one line item in the RFx. i.e RFx should be send for 50 items only?   If so, which functionality or work-around should I proposed to meet the req.?
    Regards
    Thanks
    Livio

    Hi Ramki,
    According what you say I assume that this specific requirements in SRM7, without  E- sourcing , CANNOT  be executed in a standard way, it makes sense to me.  Can you firmly confirm it?
    My real worry is that, eventually, in this last version of SRM7 could be already covered, somehowu2026 that why my post. 
    Can you give me some more details when defining the u201CAggregator txnu201D please (u mean txn or txt? And why)? 
    I mean, If I understand good, must be a development which finally summarize the quantities for each material and create the SC/PR and related RFx.
    The PO, created from the RFx, will collect all the delivery date and location from a custom table.  The custom table is a pointer between TPO, delivery date, location and RFx. Am I correct?
    Thanks
    Livio

  • Static data Vs dynamic data.

    dear All Please Let me know the difference b/w Static data and dyanmic data.
    Thanks in advance

    Dynamic data changes, Static doesnt.

  • Static Data Storage

    Hi ,
    Kindly Advise what is the best way of storing a set of static data and using them in a Proc
    E.g.
    Name Code
    Ashish 001
    Rachel 002
    Barit 003
    Ranch 004
    is to be used where i need to feed these to a proc to process their details .
    Regards,
    Ashish Roy.

    Hi,
    You can think of putting this data in a package.
    Create a package. Hardcode your data in a PL/SQL table in the package's body (not specification) and from the package specification, give procedures, by which you can access this data (e.g. a procedure to give back name if id is provided, a procedure which gives back a ref-cursor with all records etc etc)
    Advantage:
    1) When the package is used for the first time (after the db instance startup), the package will be put in the shared area in memory and later on, will be used from there, so no disk reads etc etc
    2) As you have put all the data in package body, when new data is added (not structural changes) , you need not change the package specification and hence whereever this package is used, it need not be changed. You just release new version of package body. Nothing will be invalidated.
    3) You can use pipelines table fucntions for relational view of this data in collections
    4) Can be many more ...... depending on your specific requirements ...
    Disadvantage:
    1) This approach would be good only for reasonably small amount of data. If your static data has 10000 records, this many NOT be a very good idea.
    2) It contradicts with the basic theory of "data should be in DB tables" and logic should be in stored packages/procedures
    3) Supporting your application may become tricky... more skillfull...
    4) Can be many more .... depending on your specific requirements ....
    Regards

  • Need to output data to TXT with static header and footer but multiple rows

    Using APEX 4.0 and 11g - The only way I could find to get data out of APEX in TXT format was to use htp.prn. I load a cursor with the data and this works fine, the problem is that I need to have the file start with a string (*:P9_HEADER_STRING*) but it can only appear once in the output.
    Is there a way to add the *:P9_HEADER_STRING* to the output in a single TXT file? or is there another way I should be doing this?
    This is what I have now: The *:P9_HEADER_STRING* is in the loop which I know it can't be, but I can't figure out how to concatenate this string to the output from the loop. The rank() is being used because I can only send the selected number of records, ranked from highest. (I will have to do the same thing with a footer too, but that variable isn't in here yet)
    begin
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="cra_outgoing.txt"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    -- Loop through all rows in CLIENT_TABLE
    for x in (select * from (select XREF_NBR
    , TOT_AMT
    , '' SPOUSE_INFO
    , '' PHONES
    , NAME
    , SURNAME
    , '' MARITAL_STATUS
    , '' EMPLOYER_INFO
    , GENDER
    , '' CO_ADDRESS
    , '' PREV_ADDRESS
    , POSTAL_CODE
    , ADDRESS1
    , '' FILLER
    , rank() over (order by tot_amt desc, rownum asc) rn
    from client_table c where c.File_Seq_Nbr is NULL and c.xref_nbr in (select xref_nbr from ticket_table where to_char(ticket_issue_date, 'YYYY-MM-DD') between :P7_START_DATE and :P7_END_DATE))
    where rn <= :P7_NUMBER_RECORDS)
    loop
    -- Print out a portion of a row,
    -- separated by commas and ended by a CR
    htp.prn( *:P9_HEADER_STRING* || '03' || lpad(X.XREF_NBR, 12) || lpad(x.TOT_FINE_AMT, 11, '0') || '0201'|| lpad(x.NAME, 30) || lpad(x.SPOUSE_INFO, 60) || '00000000000000000000'|| x.DATE_OF_BIRTH || '0000000000000000' || x.GENDER || x.MARITAL_STATUS || lpad(x.EMPLOYER_INFO, 60) || lpad(x.CO_ADDRESS, 102) || lpad(x.ADDRESS1, 30) || lpad(x.POSTAL_CODE, 9) || lpad(x.FILLER, 21) );
    end loop;
    -- Send an error code so that the
    -- rest of the HTML does not render
    htmldb_application.g_unrecoverable_error := true;
    end;

    Yes, I've already done that, hence this part of the code I pasted above:
    begin
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="cra_outgoing.txt"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    -- Loop through all rows in CLIENT_TABLE
    -- Send an error code so that the
    -- rest of the HTML does not render
    htmldb_application.g_unrecoverable_error := true;
    end;
    I've solved my problem by loading the cursor data into a variable (inside the loop) and concatenating the header info to it (outside the loop). This works when there are only a few records but as soon as I get to 32767 bytes it's throwing an error because of the size. So that's a different issue altogether.

  • How can I take data from multiple pages documents and put them into a numbers table?

    I produce invoices in pages, with dates, invoice numbers, references and amounts due. I want to take all this data from multiple documents and transfeer it to a single numbers table. Is this possible and if so, how do I do it. I know I can do it the other way round with mail merge but I can't figure out how to do it this way round?
    Thanks,
    Keith

    The data is spread throughout a pages document in specific areas here's a copy of an invoice for you to have a look at.

  • Saving data in a database and publishing data to multiple clients

    Hi there.  I'm using a bunch of Compact FieldPoint modules to read out a few hundred voltages, temperatures, currents, etc.  I acquire this data at about 1 Hz (pretty slow).  I would like to record this data to some sort of database on a cpu (running LV 8.0, connected to the FieldPoint mods), and serve the data to multiple (between 10 and 50) clients over the net, each running a compiled stand-alone "data grabber and viewer" application (which I'll have to write of course).  I'd like these external clients to basically be able to pick a certain variable from the database, and plot it for the last week (or something like that).  Presumably the standalone client would send some database query to the server.  The server would then send the data to the client, and the standalone client would receive the data and plot it as the user sees fit.  My question is how to implement this database?  Should I use the LabView "Database" Add-On to create a database to store the data? Is it better to just store the data as binary and write my own data fetching routine to handle queries?  How can I write this database to disk for permanent storage? Could this database be accessible outside of LabView?
    Any help on this would be appreciated.  Thanks!
    Jesse Wodin
    Post Doctoral Researcher
    Stanford Linear Accelerator Center
    650-504-2512

    Hi Jesse,
      The Citadel database is not a relational database.  It's highly optimized for storing lower-rate (non-waveform) channel-by-channel, or "trace" measurement data.  Another option you can consider is using DSC and Citadel on the server then writing a utility to export the data from Citdael to an SQL database.  --That would solve the problem of having to write a logger application from scratch.  You would only have to write the relatively simple application to export the data from Citadel and import it into a relational database.
      You could accomplish this two ways.  First, DSC includes a set of VIs that will retrieve historical data from Ciatdel.  You could use LabVIEW to parse this data and write it to a table in a relational database.  Second, Citadel actually includes a locally accessible ODBC interface.  (You can query Citadel using an SQL query from the local computer).  You could query Citadel using this interface, then write the result to a table in a relational database.
      To view Citadel in its native format or query a Citadel database using ODBC from a remote comptuer that comptuer would need to have a licensed DSC RTS installed.
    ~~

  • How to Sort JTable data using Multiple fields (Date, time and string)

    I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
    "1998/12/14","15:14:38","Unicorn1","row1"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/17","12:14:12","Unicorn4","row6"
    Now the Sorted Table should be in the following way:
    "1998/12/17","12:14:12","Unicorn4","row6"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:38","Unicorn1","row1"
    ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
    So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
    But now i need to sort on multiple columns.So what is code change in the Comparater class.
    Thanks in advance.. This is urgent....

    I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
      public void compareTo(Object obj)
        Schedule other = (Schedule)obj;
        return date.getTime() - other.getDate().getTime();
    }

  • ASO and storing data to multiple disk volume

    Hi,I use Essbase Administration Services 7.1 on Win2000.I use ASO type of OLAP application. I would like to set storage to disk D: (the default is C:). How to to set storage disk volume for ASO type of applications?For block storage type OLAP application is in the database Properties tag in Storage tab. What about ASO type of applications?Is it posible to store data two multiple disk volumes?Thanks,Grofaty

    It is a bit different for ASO models - you need to modify the tablespaces, which are found in the properties of the APPLICATION, not the database.In EAS right-click the app and choose Properties. Go to the Tablespaces tab and that should be what you are looking for.Regards,Jade---------------------------------Jade ColeSenior BI ConsultantClarity [email protected]

Maybe you are looking for