Search Results

Search found 4640 results on 186 pages for 'unique'.

Page 44/186 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • What is the best practise for relational database tables in mysql?

    - by George
    Hi, I know, there is a lot of info on mysql out there. But I was not really able to find an answer to this specific and actually simple question: Let's say I have two tables: USERS (with many fields, e.g. name, street, email, etc.) and GROUPS (also with many fields) The relation is (I guess?) 1:n, that is ONE user can be a member of MANY groups. What I dis, is create another table, named USERS_GROUPS_REL. This table has only two fields: us_id (unique key of table USERS) and gr_id (unique key of table GROUPS) In PHP I do a query with join. Is this "best practice" or is there a better way? Thankful for any hint!

    Read the article

  • Extract rows for the first occurrence of a variable in a data frame

    - by user2614883
    I have a data frame with two variables, Date and Taxa and want to get the date for the first time each taxa occurs. There are 9 different dates and 40 different taxa in the data frame consisting of 172 rows, but my answer should only have 40 rows. Taxa is a factor and Date is a date. For example, my data frame (called 'species') is set up like this: Date Taxa 2013-07-12 A 2011-08-31 B 2012-09-06 C 2012-05-17 A 2013-07-12 C 2012-09-07 B and I would be looking for an answer like this: Date Taxa 2012-05-17 A 2011-08-31 B 2012-09-06 C I tried using: t.first <- species[unique(species$Taxa),] and it gave me the correct number of rows but there were Taxa repeated. If I just use unique(species$Taxa) it appears to give me the right answer, but then I don't know the date when it first occurred. Thanks for any help.

    Read the article

  • SEO Training OR SEO Outsourcing

    There is a lot of focus on outsourcing search optimization work, but this may not always be the best option. This article looks at why SEO Training can often be a better option because it results in more unique content which is better for search engines.

    Read the article

  • How To Personalize the Windows Command Prompt

    - by Matthew Guay
    Command line interfaces can be downright boring, and always seem to miss out on the fresh coats of paint liberally applied to the rest of Windows.  Here’s how to add a splash of color to Command Prompt and make it unique. By default, Windows Command Prompt is white text on a black background. It get’s the job done, but maybe you want to add some color to it.   To get an overview of what we can do with the color command, let’s enter: color /? So, to get the color you want, enter color then the option for the background color followed by the font color.  For example, let’s make an old-fashioned green on black look by entering: color 02   There are a bunch of different combinations you can do, like this black background with red text. color 04 You can’t mess it up too much.  The color command won’t let you set both the font and the background to the same color, which would make it unreadable.  Also, if you want to get back to the default settings, just enter: color Now we’re back to plain-old black and white. Personalize Command Prompt Without Commands If you’d prefer to change the color without entering commands, just click on the Command Prompt icon in the top left corner of the window and select Properties. Select the Colors tab, and then choose the color you want for the screen text and background.  You can also enter your own RGB color combination if you want.   Here we entered the RGB values to get a purple background color like Ubuntu 10.04. Back in the Properties dialog, you can also change your Command Prompt font from the font tab.  Choose any font you want, as long as the one you want is one of the three listed here. Customizations you make via the Properties dialog are saved and will be used any time you open Command Prompt, but any customizations you make with the Color command are only for that session. Conclusion Whether you want to make your command prompt bright enough to cause a sunburn or old-style enough to scare a mainframe operator, with these settings, you can make Command Prompt a bit more unique.   Similar Articles Productive Geek Tips Use "Command Prompt Here" in Windows VistaVerify the Integrity of Windows Vista System FilesKeyboard Ninja: Scrolling the Windows Command Prompt With Only the KeyboardRun a Command as Administrator from the Windows 7 / Vista Run boxStart an Application Assigned to a Specific CPU in Windows Vista TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 How to Add Exceptions to the Windows Firewall Office 2010 reviewed in depth by Ed Bott FoxClocks adds World Times in your Statusbar (Firefox) Have Fun Editing Photo Editing with Citrify Outlook Connector Upgrade Error Gadfly is a cool Twitter/Silverlight app

    Read the article

  • Get to Know the ‘Real’ Pyro [Humorous Team Fortress 2 Video]

    - by Asian Angel
    People sometimes wonder just what is going through Pyro’s head when he is spreading mayhem and destruction. If you are one of them, then here is your chance to see things from Pyro’s ‘unique’ point-of-view! Meet the Pyro [via Dorkly] How to Use an Xbox 360 Controller On Your Windows PC Download the Official How-To Geek Trivia App for Windows 8 How to Banish Duplicate Photos with VisiPic

    Read the article

  • Going For Gold: AngloGold Ashanti and Oracle Spatial 11g

    - by stephen.garth
    Save The Date: May 6 at 11:00am Pacific time Attend this free Directions Media live webinar to find out how AngloGold Ashanti is using Oracle Database 11g with a unique geospatial infrastructure based on Oracle Spatial 11g to support worldwide gold exploration and mining operations. Terence Harbort, Exploration Systems Architect at AngloGold Ashanti, will discuss how the company is addressing challenges including management of large volumes of highly varied mapping and image data, 3D visualization, and geospatial analysis. Viewers can paricipate in a live Q&A session at the end of the webinar. Date: May 6, 2010 Time: 11:00am PDT Register here

    Read the article

  • Java : Oracle lance un framework de développement mobile, « ADF Mobile Client » est compatible avec BlackBerry et Windows Mobile

    Java : Oracle lance un framework de développement mobile « ADF Mobile Client » est compatible avec BlackBerry et Windows Mobile Oracle sort une extension de son « Application Development Framework » (ADF) avec un kit de développement qui permettrait de porter les applications d'entreprises écrites en Java à plusieurs plates-formes mobiles. ADF Mobile Client devrait simplifier la création et le déploiement des applications en utilisant un seul et unique framework standardisé d'interface utilisateur pour tous les périphériques supportés, incluant pour l'heure les BlackBerry et Windows Mobile, et ce sans devoir redévelopper ou retoucher les applications. Oracle estime ...

    Read the article

  • Dynamic meta description and keyword tags for your MasterPages

    - by Aamir Hasan
     Today we're going to look at a technique for dynamically inserting meta tags into your master pages. By taking control of the head tag and inserting your own HtmlMeta you can easily customise these tags.Might have noticed that when you create a new master page in visual studio your <head> tag gets decorated with a runat="server" attribute.Asp.net doesn't add this kind of decoration to any other html tags (although you are free to add it if you want). So what makes the head tag special?By adding the runat="server" you're giving actually converting the control into a HtmlHead control. That doesn't particularly matter for this tutorial other than to note that given a reference to the head control you get all the extras that come with asp.net controls such as access to its controls collection.The HtmlMeta control lets us wrap up <meta> tags via asp.net code. To add a meta description we need to create an instance, set the name property, the content property, and then add it to the head: asp.net using (C#)protected void Page_Init(object sender, EventArgs e){  // Add meta description tag  HtmlMeta metaDescription = new HtmlMeta();  metaDescription.Name = "Description";  metaDescription.Content = "Short, unique and keywords rich page description.";  Page.Header.Controls.Add(metaDescription);   // Add meta keywords tag  HtmlMeta metaKeywords = new HtmlMeta();  metaKeywords.Name = "Keywords";  metaKeywords.Content = "selected,page,keywords";  Page.Header.Controls.Add(metaKeywords);}asp.net ( VB.NET )Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init  ' Add meta description tag  Dim metaDescription As HtmlMeta = New HtmlMeta()  metaDescription.Name = "Description"  metaDescription.Content = "Short, unique and keywords rich page description."  Page.Header.Controls.Add(metaDescription)   ' Add meta keywords tag  Dim metaKeywords As HtmlMeta = New HtmlMeta()  metaKeywords.Name = "Keywords"  metaKeywords.Content = "selected,page,keywords"  Page.Header.Controls.Add(metaKeywords)End Sub

    Read the article

  • Message From David Callaghan: Be The Best We Can Be

    - by swalker
    In this new message, David Callaghan shares his observations on taking the lead of EMEA Alliances & Channels and outlines his personal mantra and priorities for FY13. Please watch this video to hear David's perspective on the most significant evolution of Alliances & Channels, and how we can be successful by making the most of the unique opportunities of Oracle on Oracle together.

    Read the article

  • How to Learn SEO From Michael Bolton

    Today I went to a live show given by Michael Bolton, in the new grandiose Guangzhou Opera House. His voice is still unique. And yet he was teaching me how to do a better SEO, which has been my job and life for over 7 years.

    Read the article

  • Website Title Tags For SEO - Creating Excellent Title Tags

    What are title tags? One of the most basic, but important things you can do for your website (in terms of search engine optimisation - SEO), is to ensure that each and every page has its own unique, keyword rich title tag. The title tag can be found at the top of your source code within the and tags (on a web page, click on View Source Code to view the page code).

    Read the article

  • MySQL Clustering in a Sandbox

    MySQL's unique architecture allows for plugin storage engines. There is the MyISAM storage engine, the ARCHIVE storage engine and the InnoDB storage engine; so it makes sense then that MySQL's clustering solution involves a storage engine as well, namely the NDB (Network DataBase) storage engine.

    Read the article

  • Don’t Miss The Top Exastack ISV Headlines – Week Of June 5

    - by Roxana Babiciu
    Kerridge achieves Oracle Exadata Optimized status with K8, an ERP Solution for distribution, merchant and wholesale/retail sectors. The online transactional processing saw a 12x increase in the volume throughput from previous benchmarks – Watch video. Accenture achieves Oracle Exalogic Optimized status with AFPO, a unique accelerator for customer-facing solutions. Over 125 clients cut their implementation costs by up to thirty percent – Read more.

    Read the article

  • SQL SERVER Force Index Scan on Table Use No Index to Retrieve the Data Query Hint

    Recently I received the following two questions from readers and both the questions have very similar answers.Question 1: I have a unique requirement where I do not want to use any index of the table; how can I achieve this?Question 2: Currently my table uses clustered index and does seek operation; how can I convert [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Going For Gold: AngloGold Ashanti and Oracle Spatial 11g

    - by stephen.garth
    Last chance - Register Now for Free Webinar Date and Time: Thursday May 6 at 11:00am PDT (2:00pm EDT) Check out this 1-hour Directions Media webinar to learn how the world's 3rd largest gold miner has implemented a unique geospatial data infrastructure based on Oracle Spatial 11g to streamline their business processes for gold exploration. Terry Harbort, Exploration Systems Architect with AngloGold Ashanti, will provide insights into the company's use of Oracle Spatial 11g GeoRaster, 3D visualization techniques, Real Application Clusters, and more. The presentation is followed by a live Q&A session. Register Here

    Read the article

  • Own a KINECT for MS-XBOX before anyone does

    Following is the announced by Richik Nandi from Microsoft team. Dear Customer, We believe that our privileged customers shouldn't have to wait for good things. So, here's a special offer exclusively for you. Be one of the first in India to own and experience Kinect for XBOX 360, few days before it is even launched in stores. Introducing the new Kinect for XBOX 360®. Kinect needs no controllers. You are the controller. Kinect brings games and entertainment to life in extraordinary new ways without using a controller. The sensor recognizes your face, eyes and body movements to deliver a superb gaming experience. Easy to use and great fun, Kinect gets everyone off the couch. See a ball? Kick it. Want to join a friend in the fun? Simply jump in. Imagine controlling movies and music with the wave of a hand or the sound of your voice! Kinect is all about fun for you and your family. And the best part is Kinect works with every Xbox 360®. There are two options you can choose from: •  Kinect sensor + 4GB Xbox 360 bundle + Kinect Adventures game at Rs 22,990/-and get Dance Central game worth Rs 1999 from Redington, 20% discount voucher from Starwood on food and beverages, T-shirt from PUMA and a Kinect adventure live card absolutely free using your unique promo code : XbTXXZl2Sb •  Kinect Sensor at Rs 9,500/-and get 20% discount voucher from Starwood on food and beverages, T-shirt from PUMA and a Kinect adventure live card absolutely free using your unique promo code : lDg6o8SuYh We want you to own your Kinect before the official launch. The promotion closes by 10th November. To know more about Kinect click here. To book your Kinect PRE-ORDER now! Enter your details along with the above mentioned promo code to avail of the free gifts offer. We will have your Kinect delivered by 19th November 2010. Enjoy being the controller. Enjoy the Kinect. span.fullpost {display:none;}

    Read the article

  • Is Content Really King? Or is Link Building More Important?

    Most of you will of hopefully read that content is king when it comes to on-page SEO, but there has been a load of debate about this, mainly with the recent autoblogging craze, obviously most autoblogs are simply copying content from other sources, such as articlebase, so the content isn't unique, but does this matter? Is content king? Or is it just a myth?

    Read the article

  • links for 2010-04-22

    - by Bob Rhubart
    Barry N. Perkins: Unique Business Value vs. Unique IT "Some solutions may look good today, solving a budget challenge by reducing cost, or solving a specific tactical challenge, but result in highly complex environments, that may be difficult to manage and maintain and limit the future potential of your business. Put differently, some solutions might push today's challenge into the future, resulting in a more complex and expensive solution." -- Barry N. Perkins, VP Oracle Modernization & Oracle Integrated Solutions (tags: oracle otn enterprisearchitecture modernization) Paul Homchick: The Information Driven Value Chain - Part 2 Paul Homchick continues his series with a look "at the way investments have been made in enterprise software in an effort to create and manage value, and how systems are moving from a controlled-process approach design towards gathering and using dynamically using information." (tags: oracle otn enterprisearchitecture) @vambenepe: The battle of the Cloud Frameworks: Application Servers redux? "The battle of the Cloud Frameworks has started," says William Vambenepe, "and it will look a lot like the battle of the Application Servers which played out over the last decade and a half." (tags: oracle otn cloud frameworks appserver) @ORACLENERD: COLLABORATE: Day 4 Wrap Up Oraclenerd feesses up: "The day started out with the realization that I pulled off the best (COLLABORATE - self annointed) prank ever. Twitter was...all atwitter about the fact that Mark Rittman was Oracle's Person of the Year. Of course it wasn't true. If you look at the picture, you'll realize that he's wearing exactly the same clothes in the magazine cover as he is in real life." (tags: collaborate2010 oracleace) Oracle's Hal Stern at Cloud Expo: "We've Moved from 'What' to 'How'" | Cloud Computing Journal "Hal also spoke a bit about building 'a sustainable IT model.' By this, he said he didn't mean the various Green IT and similar efforts that 'are all about data center efficiency. I think the operational model is just as important. Many enterprises are managing a tremendous amount of complexity, and it's hard to make this sustainable.'" -- Cloud News Desk (tags: oracle cloud cloudexpo halstern) @ORACLENERD: COLLABORATE: The Beach Party "Then tiki statues somehow were incorporated into various dances" -- Oracle ACE Chet "oraclenerd" Justice (tags: 0racle otn oracleace collaborate2010 oaug ioug lasvegas) David Andrews: Collaborate Day Two "Collaborate 2010 has focused on helping attendees understand what is already available and how to make more effective use of it. This does not sound exciting but it is extremely valuable. Most customers use only a small fraction of the capability of the products they already own. Helping them understand all the additional things they could be doing without buying anything more is very valuable." -- David Andrews (tags: oracle oaug collaborate2010 ioug)

    Read the article

  • Red Gate Rolls Out the Red Carpet for SQL Server Users

    SQL in the City, the unique event for database developers and administrators organized by Red Gate Software, hits the streets of London and Seattle this fall. Now in its fourth year, it features presentations by some of the world’s top SQL Server speakers. Can 41,000 DBAs really be wrong? Join 41,000 other DBAs who are following the new series from the DBA Team: the 5 Worst Days in a DBA’s Life. Part 3, As Corrupt As It Gets, is out now – read it here.

    Read the article

  • [Livre]:Chaînes d'exploits: Scénarios de hacking avancé et prévention, de A.Whitaker, K.Evans, J.Vot

    Bonjour La rédaction de DVP a lu pour vous l'ouvrage suivant: Chaînes d'exploits: Scénarios de hacking avancé et prévention de Andrew Whitaker, Keatron Evans, Jack Voth paru aux Editions PEARSON [IMG]http://images-eu.amazon.com/images/P/274402371X.08.LZZZZZZZ.jpg[/IMG] Citation: Un pirate informatique s'appuie rarement sur une unique attaque, mais utilise plutôt des chaînes d'exploits, qui impliquent plusie...

    Read the article

  • Why You Should Follow Google Webmaster Guidelines

    Creativity is one of the most important aspects of an appealing site. Unique and compelling content are vital components to any successful site, but they're rendered obsolete if the site doesn't follow basic guidelines established by the Google Webmaster Guidelines.

    Read the article

  • PTLQueue : a scalable bounded-capacity MPMC queue

    - by Dave
    Title: Fast concurrent MPMC queue -- I've used the following concurrent queue algorithm enough that it warrants a blog entry. I'll sketch out the design of a fast and scalable multiple-producer multiple-consumer (MPSC) concurrent queue called PTLQueue. The queue has bounded capacity and is implemented via a circular array. Bounded capacity can be a useful property if there's a mismatch between producer rates and consumer rates where an unbounded queue might otherwise result in excessive memory consumption by virtue of the container nodes that -- in some queue implementations -- are used to hold values. A bounded-capacity queue can provide flow control between components. Beware, however, that bounded collections can also result in resource deadlock if abused. The put() and take() operators are partial and wait for the collection to become non-full or non-empty, respectively. Put() and take() do not allocate memory, and are not vulnerable to the ABA pathologies. The PTLQueue algorithm can be implemented equally well in C/C++ and Java. Partial operators are often more convenient than total methods. In many use cases if the preconditions aren't met, there's nothing else useful the thread can do, so it may as well wait via a partial method. An exception is in the case of work-stealing queues where a thief might scan a set of queues from which it could potentially steal. Total methods return ASAP with a success-failure indication. (It's tempting to describe a queue or API as blocking or non-blocking instead of partial or total, but non-blocking is already an overloaded concurrency term. Perhaps waiting/non-waiting or patient/impatient might be better terms). It's also trivial to construct partial operators by busy-waiting via total operators, but such constructs may be less efficient than an operator explicitly and intentionally designed to wait. A PTLQueue instance contains an array of slots, where each slot has volatile Turn and MailBox fields. The array has power-of-two length allowing mod/div operations to be replaced by masking. We assume sensible padding and alignment to reduce the impact of false sharing. (On x86 I recommend 128-byte alignment and padding because of the adjacent-sector prefetch facility). Each queue also has PutCursor and TakeCursor cursor variables, each of which should be sequestered as the sole occupant of a cache line or sector. You can opt to use 64-bit integers if concerned about wrap-around aliasing in the cursor variables. Put(null) is considered illegal, but the caller or implementation can easily check for and convert null to a distinguished non-null proxy value if null happens to be a value you'd like to pass. Take() will accordingly convert the proxy value back to null. An advantage of PTLQueue is that you can use atomic fetch-and-increment for the partial methods. We initialize each slot at index I with (Turn=I, MailBox=null). Both cursors are initially 0. All shared variables are considered "volatile" and atomics such as CAS and AtomicFetchAndIncrement are presumed to have bidirectional fence semantics. Finally T is the templated type. I've sketched out a total tryTake() method below that allows the caller to poll the queue. tryPut() has an analogous construction. Zebra stripping : alternating row colors for nice-looking code listings. See also google code "prettify" : https://code.google.com/p/google-code-prettify/ Prettify is a javascript module that yields the HTML/CSS/JS equivalent of pretty-print. -- pre:nth-child(odd) { background-color:#ff0000; } pre:nth-child(even) { background-color:#0000ff; } border-left: 11px solid #ccc; margin: 1.7em 0 1.7em 0.3em; background-color:#BFB; font-size:12px; line-height:65%; " // PTLQueue : Put(v) : // producer : partial method - waits as necessary assert v != null assert Mask = 1 && (Mask & (Mask+1)) == 0 // Document invariants // doorway step // Obtain a sequence number -- ticket // As a practical concern the ticket value is temporally unique // The ticket also identifies and selects a slot auto tkt = AtomicFetchIncrement (&PutCursor, 1) slot * s = &Slots[tkt & Mask] // waiting phase : // wait for slot's generation to match the tkt value assigned to this put() invocation. // The "generation" is implicitly encoded as the upper bits in the cursor // above those used to specify the index : tkt div (Mask+1) // The generation serves as an epoch number to identify a cohort of threads // accessing disjoint slots while s-Turn != tkt : Pause assert s-MailBox == null s-MailBox = v // deposit and pass message Take() : // consumer : partial method - waits as necessary auto tkt = AtomicFetchIncrement (&TakeCursor,1) slot * s = &Slots[tkt & Mask] // 2-stage waiting : // First wait for turn for our generation // Acquire exclusive "take" access to slot's MailBox field // Then wait for the slot to become occupied while s-Turn != tkt : Pause // Concurrency in this section of code is now reduced to just 1 producer thread // vs 1 consumer thread. // For a given queue and slot, there will be most one Take() operation running // in this section. // Consumer waits for producer to arrive and make slot non-empty // Extract message; clear mailbox; advance Turn indicator // We have an obvious happens-before relation : // Put(m) happens-before corresponding Take() that returns that same "m" for T v = s-MailBox if v != null : s-MailBox = null ST-ST barrier s-Turn = tkt + Mask + 1 // unlock slot to admit next producer and consumer return v Pause tryTake() : // total method - returns ASAP with failure indication for auto tkt = TakeCursor slot * s = &Slots[tkt & Mask] if s-Turn != tkt : return null T v = s-MailBox // presumptive return value if v == null : return null // ratify tkt and v values and commit by advancing cursor if CAS (&TakeCursor, tkt, tkt+1) != tkt : continue s-MailBox = null ST-ST barrier s-Turn = tkt + Mask + 1 return v The basic idea derives from the Partitioned Ticket Lock "PTL" (US20120240126-A1) and the MultiLane Concurrent Bag (US8689237). The latter is essentially a circular ring-buffer where the elements themselves are queues or concurrent collections. You can think of the PTLQueue as a partitioned ticket lock "PTL" augmented to pass values from lock to unlock via the slots. Alternatively, you could conceptualize of PTLQueue as a degenerate MultiLane bag where each slot or "lane" consists of a simple single-word MailBox instead of a general queue. Each lane in PTLQueue also has a private Turn field which acts like the Turn (Grant) variables found in PTL. Turn enforces strict FIFO ordering and restricts concurrency on the slot mailbox field to at most one simultaneous put() and take() operation. PTL uses a single "ticket" variable and per-slot Turn (grant) fields while MultiLane has distinct PutCursor and TakeCursor cursors and abstract per-slot sub-queues. Both PTL and MultiLane advance their cursor and ticket variables with atomic fetch-and-increment. PTLQueue borrows from both PTL and MultiLane and has distinct put and take cursors and per-slot Turn fields. Instead of a per-slot queues, PTLQueue uses a simple single-word MailBox field. PutCursor and TakeCursor act like a pair of ticket locks, conferring "put" and "take" access to a given slot. PutCursor, for instance, assigns an incoming put() request to a slot and serves as a PTL "Ticket" to acquire "put" permission to that slot's MailBox field. To better explain the operation of PTLQueue we deconstruct the operation of put() and take() as follows. Put() first increments PutCursor obtaining a new unique ticket. That ticket value also identifies a slot. Put() next waits for that slot's Turn field to match that ticket value. This is tantamount to using a PTL to acquire "put" permission on the slot's MailBox field. Finally, having obtained exclusive "put" permission on the slot, put() stores the message value into the slot's MailBox. Take() similarly advances TakeCursor, identifying a slot, and then acquires and secures "take" permission on a slot by waiting for Turn. Take() then waits for the slot's MailBox to become non-empty, extracts the message, and clears MailBox. Finally, take() advances the slot's Turn field, which releases both "put" and "take" access to the slot's MailBox. Note the asymmetry : put() acquires "put" access to the slot, but take() releases that lock. At any given time, for a given slot in a PTLQueue, at most one thread has "put" access and at most one thread has "take" access. This restricts concurrency from general MPMC to 1-vs-1. We have 2 ticket locks -- one for put() and one for take() -- each with its own "ticket" variable in the form of the corresponding cursor, but they share a single "Grant" egress variable in the form of the slot's Turn variable. Advancing the PutCursor, for instance, serves two purposes. First, we obtain a unique ticket which identifies a slot. Second, incrementing the cursor is the doorway protocol step to acquire the per-slot mutual exclusion "put" lock. The cursors and operations to increment those cursors serve double-duty : slot-selection and ticket assignment for locking the slot's MailBox field. At any given time a slot MailBox field can be in one of the following states: empty with no pending operations -- neutral state; empty with one or more waiting take() operations pending -- deficit; occupied with no pending operations; occupied with one or more waiting put() operations -- surplus; empty with a pending put() or pending put() and take() operations -- transitional; or occupied with a pending take() or pending put() and take() operations -- transitional. The partial put() and take() operators can be implemented with an atomic fetch-and-increment operation, which may confer a performance advantage over a CAS-based loop. In addition we have independent PutCursor and TakeCursor cursors. Critically, a put() operation modifies PutCursor but does not access the TakeCursor and a take() operation modifies the TakeCursor cursor but does not access the PutCursor. This acts to reduce coherence traffic relative to some other queue designs. It's worth noting that slow threads or obstruction in one slot (or "lane") does not impede or obstruct operations in other slots -- this gives us some degree of obstruction isolation. PTLQueue is not lock-free, however. The implementation above is expressed with polite busy-waiting (Pause) but it's trivial to implement per-slot parking and unparking to deschedule waiting threads. It's also easy to convert the queue to a more general deque by replacing the PutCursor and TakeCursor cursors with Left/Front and Right/Back cursors that can move either direction. Specifically, to push and pop from the "left" side of the deque we would decrement and increment the Left cursor, respectively, and to push and pop from the "right" side of the deque we would increment and decrement the Right cursor, respectively. We used a variation of PTLQueue for message passing in our recent OPODIS 2013 paper. ul { list-style:none; padding-left:0; padding:0; margin:0; margin-left:0; } ul#myTagID { padding: 0px; margin: 0px; list-style:none; margin-left:0;} -- -- There's quite a bit of related literature in this area. I'll call out a few relevant references: Wilson's NYU Courant Institute UltraComputer dissertation from 1988 is classic and the canonical starting point : Operating System Data Structures for Shared-Memory MIMD Machines with Fetch-and-Add. Regarding provenance and priority, I think PTLQueue or queues effectively equivalent to PTLQueue have been independently rediscovered a number of times. See CB-Queue and BNPBV, below, for instance. But Wilson's dissertation anticipates the basic idea and seems to predate all the others. Gottlieb et al : Basic Techniques for the Efficient Coordination of Very Large Numbers of Cooperating Sequential Processors Orozco et al : CB-Queue in Toward high-throughput algorithms on many-core architectures which appeared in TACO 2012. Meneghin et al : BNPVB family in Performance evaluation of inter-thread communication mechanisms on multicore/multithreaded architecture Dmitry Vyukov : bounded MPMC queue (highly recommended) Alex Otenko : US8607249 (highly related). John Mellor-Crummey : Concurrent queues: Practical fetch-and-phi algorithms. Technical Report 229, Department of Computer Science, University of Rochester Thomasson : FIFO Distributed Bakery Algorithm (very similar to PTLQueue). Scott and Scherer : Dual Data Structures I'll propose an optimization left as an exercise for the reader. Say we wanted to reduce memory usage by eliminating inter-slot padding. Such padding is usually "dark" memory and otherwise unused and wasted. But eliminating the padding leaves us at risk of increased false sharing. Furthermore lets say it was usually the case that the PutCursor and TakeCursor were numerically close to each other. (That's true in some use cases). We might still reduce false sharing by incrementing the cursors by some value other than 1 that is not trivially small and is coprime with the number of slots. Alternatively, we might increment the cursor by one and mask as usual, resulting in a logical index. We then use that logical index value to index into a permutation table, yielding an effective index for use in the slot array. The permutation table would be constructed so that nearby logical indices would map to more distant effective indices. (Open question: what should that permutation look like? Possibly some perversion of a Gray code or De Bruijn sequence might be suitable). As an aside, say we need to busy-wait for some condition as follows : "while C == 0 : Pause". Lets say that C is usually non-zero, so we typically don't wait. But when C happens to be 0 we'll have to spin for some period, possibly brief. We can arrange for the code to be more machine-friendly with respect to the branch predictors by transforming the loop into : "if C == 0 : for { Pause; if C != 0 : break; }". Critically, we want to restructure the loop so there's one branch that controls entry and another that controls loop exit. A concern is that your compiler or JIT might be clever enough to transform this back to "while C == 0 : Pause". You can sometimes avoid this by inserting a call to a some type of very cheap "opaque" method that the compiler can't elide or reorder. On Solaris, for instance, you could use :"if C == 0 : { gethrtime(); for { Pause; if C != 0 : break; }}". It's worth noting the obvious duality between locks and queues. If you have strict FIFO lock implementation with local spinning and succession by direct handoff such as MCS or CLH,then you can usually transform that lock into a queue. Hidden commentary and annotations - invisible : * And of course there's a well-known duality between queues and locks, but I'll leave that topic for another blog post. * Compare and contrast : PTLQ vs PTL and MultiLane * Equivalent : Turn; seq; sequence; pos; position; ticket * Put = Lock; Deposit Take = identify and reserve slot; wait; extract & clear; unlock * conceptualize : Distinct PutLock and TakeLock implemented as ticket lock or PTL Distinct arrival cursors but share per-slot "Turn" variable provides exclusive role-based access to slot's mailbox field put() acquires exclusive access to a slot for purposes of "deposit" assigns slot round-robin and then acquires deposit access rights/perms to that slot take() acquires exclusive access to slot for purposes of "withdrawal" assigns slot round-robin and then acquires withdrawal access rights/perms to that slot At any given time, only one thread can have withdrawal access to a slot at any given time, only one thread can have deposit access to a slot Permissible for T1 to have deposit access and T2 to simultaneously have withdrawal access * round-robin for the purposes of; role-based; access mode; access role mailslot; mailbox; allocate/assign/identify slot rights; permission; license; access permission; * PTL/Ticket hybrid Asymmetric usage ; owner oblivious lock-unlock pairing K-exclusion add Grant cursor pass message m from lock to unlock via Slots[] array Cursor performs 2 functions : + PTL ticket + Assigns request to slot in round-robin fashion Deconstruct protocol : explication put() : allocate slot in round-robin fashion acquire PTL for "put" access store message into slot associated with PTL index take() : Acquire PTL for "take" access // doorway step seq = fetchAdd (&Grant, 1) s = &Slots[seq & Mask] // waiting phase while s-Turn != seq : pause Extract : wait for s-mailbox to be full v = s-mailbox s-mailbox = null Release PTL for both "put" and "take" access s-Turn = seq + Mask + 1 * Slot round-robin assignment and lock "doorway" protocol leverage the same cursor and FetchAdd operation on that cursor FetchAdd (&Cursor,1) + round-robin slot assignment and dispersal + PTL/ticket lock "doorway" step waiting phase is via "Turn" field in slot * PTLQueue uses 2 cursors -- put and take. Acquire "put" access to slot via PTL-like lock Acquire "take" access to slot via PTL-like lock 2 locks : put and take -- at most one thread can access slot's mailbox Both locks use same "turn" field Like multilane : 2 cursors : put and take slot is simple 1-capacity mailbox instead of queue Borrow per-slot turn/grant from PTL Provides strict FIFO Lock slot : put-vs-put take-vs-take at most one put accesses slot at any one time at most one put accesses take at any one time reduction to 1-vs-1 instead of N-vs-M concurrency Per slot locks for put/take Release put/take by advancing turn * is instrumental in ... * P-V Semaphore vs lock vs K-exclusion * See also : FastQueues-excerpt.java dice-etc/queue-mpmc-bounded-blocking-circular-xadd/ * PTLQueue is the same as PTLQB - identical * Expedient return; ASAP; prompt; immediately * Lamport's Bakery algorithm : doorway step then waiting phase Threads arriving at doorway obtain a unique ticket number Threads enter in ticket order * In the terminology of Reed and Kanodia a ticket lock corresponds to the busy-wait implementation of a semaphore using an eventcount and a sequencer It can also be thought of as an optimization of Lamport's bakery lock was designed for fault-tolerance rather than performance Instead of spinning on the release counter, processors using a bakery lock repeatedly examine the tickets of their peers --

    Read the article

  • ISE (Germany) and Techdata Azlan: Exadata win over IBM at Immonet

    - by Javier Puerta
    Immonet, a subsidiary of German media company Axel Springer, provides cross-media real estate marketing via the Internet, newspapers, and other channels. The Immonet.de website is the number two German property portal with approximately 1.8 million unique visitors per month and over than 950,000 current online offerings. Read here how ISE solved with Exadata the performance problems that Immonet was experiencing.

    Read the article

  • Some notes from the Collaboration Summit

    <b>LWN.net:</b> "Your editor has just returned from the Linux Foundation's annual Collaboration Summit, held in San Francisco. LFCS is a unique event; despite becoming more developer-heavy over the years, it still pulls together an interesting combination of people from the wider Linux ecosystem."

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >