US7289998B2 - Method to update a data structure disposed in an embedded device - Google Patents

Method to update a data structure disposed in an embedded device Download PDF

Info

Publication number
US7289998B2
US7289998B2 US10/877,312 US87731204A US7289998B2 US 7289998 B2 US7289998 B2 US 7289998B2 US 87731204 A US87731204 A US 87731204A US 7289998 B2 US7289998 B2 US 7289998B2
Authority
US
United States
Prior art keywords
data structure
thread
indicate
computer readable
readable program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related, expires
Application number
US10/877,312
Other versions
US20050289544A1 (en
Inventor
Matthew J. Kalos
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Google LLC
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to US10/877,312 priority Critical patent/US7289998B2/en
Assigned to INTERNATIONAL BUSINESS MACHINES CORPORATION reassignment INTERNATIONAL BUSINESS MACHINES CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: KALOS, MATTHEW J.
Publication of US20050289544A1 publication Critical patent/US20050289544A1/en
Application granted granted Critical
Publication of US7289998B2 publication Critical patent/US7289998B2/en
Assigned to GOOGLE INC. reassignment GOOGLE INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: INTERNATIONAL BUSINESS MACHINES CORPORATION
Assigned to GOOGLE LLC reassignment GOOGLE LLC CHANGE OF NAME (SEE DOCUMENT FOR DETAILS). Assignors: GOOGLE INC.
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Definitions

  • This invention relates to a method for efficient serialization.
  • the invention relates to a method to update a data structure data read by multiple threads.
  • Automated media storage libraries are known for providing cost effective access to large quantities of stored media. These media libraries are often interconnected with one or more host computers. Those one or more host computers write information to one or more information storage media disposed in the library, and/or read information from those one or more information storage media.
  • embedded systems comprise special purposes systems requiring high performance but having relatively few dedicated resources.
  • embedded devices typically comprise relatively little memory, a low performance processor, few if any standard utilities, and no hard disks.
  • embedded devices typically do not comprise a conventional operating system.
  • a conventional operating system is written for flexibility.
  • An embedded system performs a single purpose. Therefore, such an embedded device operates using a device microcode written to optimize the device's single function.
  • a PCI card comprises such an embedded device.
  • Such a PCI card typically includes a processor, a flash memory, and SDRAM.
  • a FICON interface card comprises another such embedded device.
  • serialization is performed using “locks.”
  • One thread obtains a lock to update or read a data structure.
  • a second thread attempting to access the data structure must wait until the first thread completes its read/update. That second thread can then obtain the lock.
  • These prior art methods are inefficient for structures that are updated infrequently but read frequently, such as data structures disposed in an embedded device's microcode, because the embedded device's processor must contend for the lock before being able to read the data structure.
  • Applicant's invention includes a method to update a data structure without first obtaining a lock for that data structure.
  • Applicants' invention includes an apparatus and method to update a data structure disposed in an embedded device.
  • the method provides a data structure comprising first information, (N) non-preemptable threads, a thread dispatcher, and a data structure indicator.
  • the method receives a write thread comprising second information, and sets the data structure indicator to indicate that the data structure is unusable.
  • the method creates (N) thread indicators, and assigns each of said (N) indicators to a different one of said (N) threads.
  • the (i)th thread sees the data structure indicator which indicates that the data structure is unusable.
  • the method then sets the (i)th thread indicator.
  • the method determines if each of the (N) threads has seen the data structure indicator which indicates that the data structure is unusable. If each of the (N) threads has seen the data structure indicator which indicates that the data structure is unusable, then the method sets the data structure indicator to indicate that the data structure is invalid, updates the data structure to comprise the second information, and sets the data structure indicator to indicate that the data structure is valid.
  • FIG. 1 is a block diagram showing Applicant's information storage and retrieval system
  • FIG. 2 is a flow chart summarizing the steps of Applicant's method.
  • Applicants' information storage and retrieval system 100 includes a first cluster 101 A and a second cluster 101 B.
  • Each cluster includes a processor portion 130 / 140 and an input/output portion 160 / 170 , respectively.
  • Internal PCI buses in each cluster are connected via a Remote I/O bridge 155 / 165 between the processor portions 130 / 140 and device I/O portions 160 / 170 , respectively.
  • system 100 is capable of communicating with host computer 125 via communication link 127 .
  • communication link 127 is selected from a serial interconnection, such as RS-232 or RS-422, an ethernet interconnection, a SCSI interconnection, a Fibre Channel interconnection, an ESCON interconnection, a FICON interconnection, a Local Area Network (LAN), a private Wide Area Network (WAN), a public wide area network, Storage Area Network (SAN), Transmission Control Protocol/Internet Protocol (TCP/IP), the Internet, and combinations thereof.
  • Information storage and retrieval system 100 further includes a plurality of host adapters 102 - 105 , 107 - 110 , 112 - 115 , and 117 - 120 , disposed in four host bays 101 , 106 , 111 , and 116 .
  • Each host adapter may comprise one or more Fibre Channel ports, one or more FICON ports, one or more ESCON ports, or one or more SCSI ports.
  • Each host adapter is connected to both clusters through one or more Common Platform Interconnect bus 121 such that each cluster can handle I/O from any host adapter.
  • Processor portion 130 includes processor 132 and cache 134 . In certain embodiments, processor portion 130 further include memory 133 . In certain embodiments, memory device 133 comprises random access memory. In certain embodiments, memory device 133 comprises non-volatile memory.
  • Processor portion 140 includes processor 142 and cache 144 . In certain embodiments, processor portion 140 further include memory 143 . In certain embodiments, memory device 143 comprises random access memory. In certain embodiments, memory device 143 comprises non-volatile memory.
  • I/O portion 160 includes non-volatile storage (“NVS”) 162 and NVS batteries 164 .
  • I/O portion 170 includes NVS 172 and NVS batteries 174 .
  • I/O portion 160 further comprises a plurality of device adapters, such as device adapters 165 , 166 , 167 , and 168 , and information storage media organized into two arrays, namely array “A” and array “B”.
  • the illustrated embodiment of FIG. 1 shows two information storage arrays. In other embodiments, Applicants' information storage and retrieval system includes more than two information storage arrays. Each such information storage array appears to a host computer as one or more logical devices.
  • Applicants' information storage media comprise magnetic media, such as for example hard disks disposed in individual hard disk drive units.
  • Applicants' information storage media comprise optical media, such as for example CDs, DVDs, and the like.
  • Applicants' information storage media comprise electronic storage media, such as PROMs, EPROMs, EEPROMs, Flash PROMs, compactflash, smartmedia, and the like.
  • arrays “A” and “B” utilize a RAID protocol.
  • arrays “A” and “B” comprise what is sometimes called a JBOD array, i.e. “Just a Bunch Of Disks” where the array is not configured according to RAID.
  • a RAID (Redundant Array of Independent Disks) rank comprises independent information storage media configured in an array to obtain performance, capacity and reliability that exceeds that of a single large storage medium.
  • array “A” includes hard disk drives 181 , 182 , 183 , 191 , 192 , 193 , and 194
  • array “B” includes hard disk drives 185 , 186 , 187 , 188 , 196 , 197 , and 198 .
  • FIG. 2 summarizes the steps of Applicant's method.
  • Applicant's method provides a data structure comprising first information.
  • the data structure of step 210 comprises a control flag to begin or end special processing.
  • step 215 Applicant's method provides a write thread comprising second information.
  • a thread is a path of execution of a process, and the thread context is the task.
  • the write thread of step 215 is provided by a host computer interconnected to Applicant's information storage and retrieval system.
  • the write thread of step 215 is provided by a processor disposed in Applicant's information storage and retrieval system.
  • the write thread of step 215 is provided by a processor disposed in an embedded device, such as for example a host adapter or a device adapter, disposed in Applicant's information storage and retrieval system.
  • the write thread of step 215 comprises part of device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system, such as for example device microcode 102 A ( FIG. 1 ) disposed in host adapter 102 ( FIG. 1 ) or device microcode 165 A ( FIG. 1 ) disposed in device adapter 165 ( FIG. 1 ).
  • step 220 Applicant's method provides (N) non-preemptable threads.
  • non-preemptable threads Applicant means a thread which will return to the dispatcher in a finite amount of time. As those skilled in the art will appreciate, most operating systems allow a thread to never return to the dispatcher, but those operating systems may periodically preempt such non-reporting threads and switch to other threads.
  • One or more of these (N) non-preemptable threads comprise read threads.
  • one or more of the (N) threads of step 220 comprise part of device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system, such as for example device microcode 102 A ( FIG. 1 ) disposed in host adapter 102 ( FIG. 1 ) or device microcode 165 A ( FIG. 1 ) disposed in device adapter 165 ( FIG. 1 ).
  • Applicant's method provides a thread dispatcher.
  • this thread dispatcher comprises part of device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system.
  • step 230 Applicant's method posts the write thread of step 215 .
  • step 230 is performed by device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system.
  • step 235 Applicant's method marks the data structure of step 210 as unusable.
  • step 235 includes providing a data structure indicator.
  • that data structure indicator comprises a pointer.
  • Applicant's device microcode includes such a pointer pointing to the data structure of step 210 .
  • step 235 includes setting that pointer to indicate that the data structure is unusable.
  • step 235 is performed by device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system.
  • step 235 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system.
  • step 235 is performed by the write thread of step 215 .
  • step 240 Applicant's method, in response to the posting of the write thread in step 230 , creates (N) indicators, where each of those (N) indicators is assigned to a different one of the (N) threads, and where each of those indicators can be set to one of two values, and where each of those indicators is initially set to the first value. If the (i)th indicator is set to the first value, then the (i)th thread has not examined the data structure indicator set in step 235 . Alternatively, if the (i)th indicator is set to the second value, then subsequent dispatches of the (i)th read thread will see the data structure indicator which indicates that the data structure is unusable.
  • the (N) indicators of step 240 comprise a bitmask which includes (N) bits. Each of those bits can be set to either a first value or a second value. In certain embodiments, the first value comprises a “0”, and the second value comprises a “1.”
  • step 240 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 240 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 240 is performed by a processor using device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 240 is performed by the write thread of step 215 . In certain embodiments, step 240 is performed by the thread dispatcher of step 225 .
  • step 245 After the (i)th thread returns to the thread dispatcher and sees the data structure indicator which indicates that the data structure is unusable, Applicant's method sets the (i) thread indicator to the second value, i.e. to indicate that upon subsequent dispatches the (i)th thread will see the data structure marked as unusable. In certain embodiments, step 245 is performed by the thread dispatcher.
  • step 250 the method determines if each of the (N) threads has seen the data structure indicator showing that the data structure is unusable, i.e. if the thread indicator for each of the (N) threads is set to the second value.
  • step 250 is performed by a processor disposed in Applicant's information storage and retrieval system.
  • step 250 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system.
  • steps 250 is performed by the write thread of step 215 .
  • step 250 is performed by the thread dispatcher of step 225 .
  • step 250 determines in step 250 that each of the (N) threads has not seen the indication that the data structure is unusable, then the method transitions from step 255 to step 245 and continues.
  • step 250 determines in step 250 that each of the (N) threads indicators is set to the second value, i.e. upon a subsequent dispatch each of the (N) threads has seen the indication that the data structure is unusable, then the method transitions from step 250 to step 260 wherein the method sets the data structure indicator of step 235 to indicate that the data structure is invalid.
  • step 260 includes setting a pointer pointing to that data structure to indicate that the data structure is invalid.
  • step 260 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 260 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 260 is performed by the write thread of step 215 . In certain embodiments, step 260 is performed by the thread dispatcher of step 230 .
  • step 270 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 270 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, steps 270 is performed by the write thread of step 215 . In certain embodiments, step 270 is performed by the thread dispatcher of step 225 .
  • Applicant's method transitions from step 270 to step 280 wherein the write thread updates the data structure to comprise second information.
  • Applicant's method transitions from step 280 to step 290 wherein the method sets the data structure indicator to indicate that the data structure is valid.
  • step 290 includes setting a pointer pointing to that data structure to indicate that the data structure is valid.
  • step 290 is performed by a processor disposed in Applicant's information storage and retrieval system.
  • step 290 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system.
  • step 290 is performed by the write thread of step 215 .
  • step 290 is performed by the thread dispatcher of step 225 .
  • Applicants' invention includes instructions residing in memory 133 ( FIG. 1 ), where those instructions are executed by processor 132 ( FIG. 1 ) to performs steps 230 , 235 , 240 , 245 , 250 , 260 , 270 , 280 , and 290 , recited in FIG. 2 .
  • Applicants' invention includes instructions residing in any other computer program product, where those instructions are executed by a computer external to, or internal to, system 100 , to perform steps 230 , 235 , 240 , 245 , 250 , 260 , 270 , 280 , and 290 , recited in FIG. 2 .
  • the instructions may be encoded in an information storage medium comprising, for example, a magnetic information storage medium, an optical information storage medium, an electronic information storage medium, and the like.
  • an information storage medium comprising, for example, a magnetic information storage medium, an optical information storage medium, an electronic information storage medium, and the like.
  • electronic storage media Applicants mean, for example, a device such as a PROM, EPROM, EEPROM, Flash PROM, compactflash, smartmedia, and the like.

Abstract

A method to update a data structure is disclosed. The method receives a write thread, and sets a data structure indicator to indicate that the data structure is unusable. The method creates (N) thread indicators, and assigns each of said (N) indicators to a different one of said (N) threads. Upon return to the thread dispatcher, the (i)th thread sees the data structure indicator which shows that the data structure is unusable. The method then sets the (i)th thread indicator to indicate that upon subsequent dispatches the (i)th thread will see the data structure indicator that shows that the data structure is unusable. After each of the (N) threads has seen the data structure indicator marking the data structure as unusable, the method sets the data structure indicator to indicate that the data structure is invalid, updates the data structure, and sets the data structure indicator to indicate that the data structure is valid.

Description

FIELD OF THE INVENTION
This invention relates to a method for efficient serialization. In certain embodiments, the invention relates to a method to update a data structure data read by multiple threads.
BACKGROUND OF THE INVENTION
Automated media storage libraries are known for providing cost effective access to large quantities of stored media. These media libraries are often interconnected with one or more host computers. Those one or more host computers write information to one or more information storage media disposed in the library, and/or read information from those one or more information storage media.
The various components of such media storage libraries often include what are sometimes referred to as “embedded” systems, applications, or devices. Such embedded systems comprise special purposes systems requiring high performance but having relatively few dedicated resources. For example, embedded devices typically comprise relatively little memory, a low performance processor, few if any standard utilities, and no hard disks.
In addition, embedded devices typically do not comprise a conventional operating system. A conventional operating system is written for flexibility. An embedded system, however, performs a single purpose. Therefore, such an embedded device operates using a device microcode written to optimize the device's single function.
A PCI card comprises such an embedded device. Such a PCI card typically includes a processor, a flash memory, and SDRAM. A FICON interface card comprises another such embedded device.
Using prior art methods, serialization is performed using “locks.” One thread obtains a lock to update or read a data structure. A second thread attempting to access the data structure must wait until the first thread completes its read/update. That second thread can then obtain the lock. These prior art methods are inefficient for structures that are updated infrequently but read frequently, such as data structures disposed in an embedded device's microcode, because the embedded device's processor must contend for the lock before being able to read the data structure.
What is needed is a method to update a data structure without first obtaining a lock. Applicant's invention includes a method to update a data structure without first obtaining a lock for that data structure.
SUMMARY OF THE INVENTION
Applicants' invention includes an apparatus and method to update a data structure disposed in an embedded device. The method provides a data structure comprising first information, (N) non-preemptable threads, a thread dispatcher, and a data structure indicator.
The method receives a write thread comprising second information, and sets the data structure indicator to indicate that the data structure is unusable. The method, creates (N) thread indicators, and assigns each of said (N) indicators to a different one of said (N) threads. Upon returning to the thread dispatcher, the (i)th thread sees the data structure indicator which indicates that the data structure is unusable. The method then sets the (i)th thread indicator.
The method determines if each of the (N) threads has seen the data structure indicator which indicates that the data structure is unusable. If each of the (N) threads has seen the data structure indicator which indicates that the data structure is unusable, then the method sets the data structure indicator to indicate that the data structure is invalid, updates the data structure to comprise the second information, and sets the data structure indicator to indicate that the data structure is valid.
BRIEF DESCRIPTION OF THE DRAWINGS
The invention will be better understood from a reading of the following detailed description taken in conjunction with the drawings in which like reference designators are used to designate like elements, and in which:
FIG. 1 is a block diagram showing Applicant's information storage and retrieval system; and
FIG. 2 is a flow chart summarizing the steps of Applicant's method.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
This invention is described in preferred embodiments in the following description with reference to the Figures, in which like numbers represent the same or similar elements. The invention will be described as embodied in an information storage and retrieval subsystem for use in a data processing environment. The following description of Applicant's method to update a data structure read by multiple threads is not meant, however, to limit Applicant's invention to either data storage and retrieval systems, or to data processing applications, as the invention herein can be applied to updating a data structure in general.
In the illustrated embodiment of FIG. 1, Applicants' information storage and retrieval system 100 includes a first cluster 101A and a second cluster 101B. Each cluster includes a processor portion 130/140 and an input/output portion 160/170, respectively. Internal PCI buses in each cluster are connected via a Remote I/O bridge 155/165 between the processor portions 130/140 and device I/O portions 160/170, respectively.
In the illustrated embodiment of FIG. 1, system 100 is capable of communicating with host computer 125 via communication link 127. In certain embodiments, communication link 127 is selected from a serial interconnection, such as RS-232 or RS-422, an ethernet interconnection, a SCSI interconnection, a Fibre Channel interconnection, an ESCON interconnection, a FICON interconnection, a Local Area Network (LAN), a private Wide Area Network (WAN), a public wide area network, Storage Area Network (SAN), Transmission Control Protocol/Internet Protocol (TCP/IP), the Internet, and combinations thereof.
Information storage and retrieval system 100 further includes a plurality of host adapters 102-105, 107-110, 112-115, and 117-120, disposed in four host bays 101, 106, 111, and 116. Each host adapter may comprise one or more Fibre Channel ports, one or more FICON ports, one or more ESCON ports, or one or more SCSI ports. Each host adapter is connected to both clusters through one or more Common Platform Interconnect bus 121 such that each cluster can handle I/O from any host adapter.
Processor portion 130 includes processor 132 and cache 134. In certain embodiments, processor portion 130 further include memory 133. In certain embodiments, memory device 133 comprises random access memory. In certain embodiments, memory device 133 comprises non-volatile memory.
Processor portion 140 includes processor 142 and cache 144. In certain embodiments, processor portion 140 further include memory 143. In certain embodiments, memory device 143 comprises random access memory. In certain embodiments, memory device 143 comprises non-volatile memory.
I/O portion 160 includes non-volatile storage (“NVS”) 162 and NVS batteries 164. I/O portion 170 includes NVS 172 and NVS batteries 174.
I/O portion 160 further comprises a plurality of device adapters, such as device adapters 165, 166, 167, and 168, and information storage media organized into two arrays, namely array “A” and array “B”. The illustrated embodiment of FIG. 1 shows two information storage arrays. In other embodiments, Applicants' information storage and retrieval system includes more than two information storage arrays. Each such information storage array appears to a host computer as one or more logical devices.
In certain embodiments, Applicants' information storage media comprise magnetic media, such as for example hard disks disposed in individual hard disk drive units. In certain embodiments, Applicants' information storage media comprise optical media, such as for example CDs, DVDs, and the like. In certain embodiments, Applicants' information storage media comprise electronic storage media, such as PROMs, EPROMs, EEPROMs, Flash PROMs, compactflash, smartmedia, and the like.
In certain embodiments, arrays “A” and “B” utilize a RAID protocol. In certain embodiments, arrays “A” and “B” comprise what is sometimes called a JBOD array, i.e. “Just a Bunch Of Disks” where the array is not configured according to RAID. As those skilled in the art will appreciate, a RAID (Redundant Array of Independent Disks) rank comprises independent information storage media configured in an array to obtain performance, capacity and reliability that exceeds that of a single large storage medium.
In the certain embodiments, array “A” includes hard disk drives 181, 182, 183, 191, 192, 193, and 194, and array “B” includes hard disk drives 185, 186, 187, 188, 196, 197, and 198.
FIG. 2 summarizes the steps of Applicant's method. Referring now to FIG. 2, in step 210 Applicant's method provides a data structure comprising first information. In certain embodiments, the data structure of step 210 comprises a control flag to begin or end special processing.
In step 215, Applicant's method provides a write thread comprising second information. As those skilled in the art will appreciate, a thread is a path of execution of a process, and the thread context is the task. In certain embodiments, the write thread of step 215 is provided by a host computer interconnected to Applicant's information storage and retrieval system. In certain embodiments, the write thread of step 215 is provided by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, the write thread of step 215 is provided by a processor disposed in an embedded device, such as for example a host adapter or a device adapter, disposed in Applicant's information storage and retrieval system. In certain embodiments, the write thread of step 215 comprises part of device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system, such as for example device microcode 102A (FIG. 1) disposed in host adapter 102 (FIG. 1) or device microcode 165A (FIG. 1) disposed in device adapter 165 (FIG. 1).
In step 220, Applicant's method provides (N) non-preemptable threads. By “non-preemptable threads,” Applicant means a thread which will return to the dispatcher in a finite amount of time. As those skilled in the art will appreciate, most operating systems allow a thread to never return to the dispatcher, but those operating systems may periodically preempt such non-reporting threads and switch to other threads. One or more of these (N) non-preemptable threads comprise read threads. In certain embodiments, one or more of the (N) threads of step 220 comprise part of device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system, such as for example device microcode 102A (FIG. 1) disposed in host adapter 102 (FIG. 1) or device microcode 165A (FIG. 1) disposed in device adapter 165 (FIG. 1).
In step 225, Applicant's method provides a thread dispatcher. In certain embodiments, this thread dispatcher comprises part of device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system.
In step 230, Applicant's method posts the write thread of step 215. In certain embodiments, step 230 is performed by device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system.
In step 235, Applicant's method marks the data structure of step 210 as unusable. In certain embodiments, step 235 includes providing a data structure indicator. In certain embodiments, that data structure indicator comprises a pointer. In certain embodiments, Applicant's device microcode includes such a pointer pointing to the data structure of step 210. In these embodiments, step 235 includes setting that pointer to indicate that the data structure is unusable. In certain embodiments, step 235 is performed by device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 235 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 235 is performed by the write thread of step 215.
In step 240, Applicant's method, in response to the posting of the write thread in step 230, creates (N) indicators, where each of those (N) indicators is assigned to a different one of the (N) threads, and where each of those indicators can be set to one of two values, and where each of those indicators is initially set to the first value. If the (i)th indicator is set to the first value, then the (i)th thread has not examined the data structure indicator set in step 235. Alternatively, if the (i)th indicator is set to the second value, then subsequent dispatches of the (i)th read thread will see the data structure indicator which indicates that the data structure is unusable.
In certain embodiments, the (N) indicators of step 240 comprise a bitmask which includes (N) bits. Each of those bits can be set to either a first value or a second value. In certain embodiments, the first value comprises a “0”, and the second value comprises a “1.”
In certain embodiments, step 240 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 240 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 240 is performed by a processor using device microcode disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 240 is performed by the write thread of step 215. In certain embodiments, step 240 is performed by the thread dispatcher of step 225.
Each time the thread dispatcher dispatches one of the (N) threads, that dispatched thread returns to the thread dispatcher after completing its task. In addition, each of the (N) threads returns to the thread dispatcher after a specified time interval. Upon returning to the thread dispatcher, the (i)th thread sees the data structure indicator set in step 235. In step 245, after the (i)th thread returns to the thread dispatcher and sees the data structure indicator which indicates that the data structure is unusable, Applicant's method sets the (i) thread indicator to the second value, i.e. to indicate that upon subsequent dispatches the (i)th thread will see the data structure marked as unusable. In certain embodiments, step 245 is performed by the thread dispatcher.
In step 250, the method determines if each of the (N) threads has seen the data structure indicator showing that the data structure is unusable, i.e. if the thread indicator for each of the (N) threads is set to the second value. In certain embodiments, step 250 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 250 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, steps 250 is performed by the write thread of step 215. In certain embodiments, step 250 is performed by the thread dispatcher of step 225.
If Applicant's method determines in step 250 that each of the (N) threads has not seen the indication that the data structure is unusable, then the method transitions from step 255 to step 245 and continues. Alternatively, if Applicant's method determines in step 250 that each of the (N) threads indicators is set to the second value, i.e. upon a subsequent dispatch each of the (N) threads has seen the indication that the data structure is unusable, then the method transitions from step 250 to step 260 wherein the method sets the data structure indicator of step 235 to indicate that the data structure is invalid. In certain embodiments, step 260 includes setting a pointer pointing to that data structure to indicate that the data structure is invalid.
In certain embodiments, step 260 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 260 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 260 is performed by the write thread of step 215. In certain embodiments, step 260 is performed by the thread dispatcher of step 230.
Applicant's method transitions from step 260 to step 270 wherein the method dispatches the write thread posted in step 230. In certain embodiments, step 270 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 270 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, steps 270 is performed by the write thread of step 215. In certain embodiments, step 270 is performed by the thread dispatcher of step 225.
Applicant's method transitions from step 270 to step 280 wherein the write thread updates the data structure to comprise second information. Applicant's method transitions from step 280 to step 290 wherein the method sets the data structure indicator to indicate that the data structure is valid. In certain embodiments, step 290 includes setting a pointer pointing to that data structure to indicate that the data structure is valid. In certain embodiments, step 290 is performed by a processor disposed in Applicant's information storage and retrieval system. In certain embodiments, step 290 is performed by a processor disposed in an embedded device disposed in Applicant's information storage and retrieval system. In certain embodiments, step 290 is performed by the write thread of step 215. In certain embodiments, step 290 is performed by the thread dispatcher of step 225.
In certain embodiments, individual steps recited in FIG. 2 may be combined, eliminated, or reordered.
In certain embodiments, Applicants' invention includes instructions residing in memory 133 (FIG. 1), where those instructions are executed by processor 132 (FIG. 1) to performs steps 230, 235, 240, 245, 250, 260, 270, 280, and 290, recited in FIG. 2. In other embodiments, Applicants' invention includes instructions residing in any other computer program product, where those instructions are executed by a computer external to, or internal to, system 100, to perform steps 230, 235, 240, 245, 250, 260, 270, 280, and 290, recited in FIG. 2. In either case, the instructions may be encoded in an information storage medium comprising, for example, a magnetic information storage medium, an optical information storage medium, an electronic information storage medium, and the like. By “electronic storage media,” Applicants mean, for example, a device such as a PROM, EPROM, EEPROM, Flash PROM, compactflash, smartmedia, and the like.
While the preferred embodiments of the present invention have been illustrated in detail, it should be apparent that modifications and adaptations to those embodiments may occur to one skilled in the art without departing from the scope of the present invention as set forth in the following claims.

Claims (19)

1. A method to update a data structure disposed in an embedded device, comprising the steps of:
providing a data structure comprising first information;
providing a write thread comprising second information;
providing (N) non-preemptable threads, wherein (N) is greater than 1;
providing a thread dispatcher; providing a data structure indicator;
setting said data structure indicator to indicate that said data structure is unusable;
creating (N) thread indicators comprising a bitmask which includes (N) bits, wherein each of those bits can be set to either a first value or a second value, and wherein each bit is initially set to said first value;
assigning each of said (N) thread indicators to a different one of said (N) threads; upon return of the (i)th thread to the thread dispatcher, setting the (i)th thread indicator to said second value, wherein (i) is greater than or equal to 1 and less than or equal to (N);
determining if the thread indicators for each of said (N) threads are set to said second value; operative if the thread indicators for each of said (N) threads are set to said second value:
setting said data structure indicator to indicate that said data structure is invalid;
updating said data structure to comprise said second information;
and setting said data structure indicator to indicate that said data structure is valid.
2. The method of claim 1, further comprising the step of providing a computing device comprising an embedded device, wherein said embedded device comprises device microcode, and wherein said microcode includes said data structure.
3. The method of claim 1, further comprising the steps of:
dispatching the (i)th thread by said thread dispatcher;
returning to said thread dispatcher by said (i)th thread.
4. The method of claim 3, further comprising the step of:
providing a pointer for said data structure;
wherein said step setting a data structure indicator to indicate that said data structure is unusable further comprises setting said pointer to indicate that said data structure is unusable;
wherein said step setting said data structure indicator to indicate that said data structure is invalid further comprises setting said pointer to indicate that said data structure is invalid;
wherein said step setting said data structure indicator to indicate that said data structure is valid further comprises setting said pointer to indicate that said data structure is valid.
5. The method of claim 1, wherein said assigning step further comprises assigning each of said (N) bits to a different one of said (N) threads.
6. The method of claim 1, further comprising the step of posting said write thread using said thread dispatcher.
7. The method of claim 6, further comprising the steps of:
determining if a write thread is posted;
operative if a write thread is posted, creating said (N) indicators.
8. The method of claim 7, wherein the step setting said data structure indicator to indicate that said data structure is invalid further comprises the step of dispatching said write thread by said thread dispatcher.
9. An article of manufacture comprising:
microcode which includes a data structure comprising first information, (N) non-preemptable threads, a thread dispatcher, a data structure indicator, and computer readable storage medium having computer readable program code disposed therein to update said data structure, wherein (N) is greater than 1, the computer readable program code comprising a series of computer readable program steps to effect:
receiving a write thread comprising second information;
setting said data structure indicator to indicate that said data structure is unusable;
creating (N) thread indicators comprising a bitmask which includes (N) bits, wherein each of those bits can be set to either a first value or a second value, and wherein each bit is initially set to said first value;
assigning each of said (N) thread indicators to a different one of said (N) threads;
upon return of the (i)th thread to the thread dispatcher, setting the (i)th thread indicator to said second value, wherein (i) is greater than or equal to 1 and less than or equal to (N);
determining if the thread indicators for each of said (N) threads are set to said second value;
operative if the thread indicators for each of said (N) threads are set to said second value:
setting said data structure indicator to indicate that said data structure is invalid;
updating said data structure to comprise said second information; and
setting said data structure indicator to indicate that said data structure is valid.
10. The article of manufacture of claim 9, wherein said microcode further comprises a pointer for said data structure, wherein:
the computer readable program code to set said data structure indicator to indicate that said data structure is unusable further comprises a series of computer readable program steps to effect setting said pointer to indicate that said data structure, is unusable;
the computer readable program code to set said data structure indicator to indicate that said data structure is invalid further comprises a series of computer readable program steps to effect setting said pointer to indicate that said data structure is invalid;
the computer readable program code set said data structure indicator to indicate that said data structure is valid further comprises a series of computer readable program steps to effect setting said pointer to indicate that said data structure is valid.
11. The article of manufacture of claim 9, further comprising the step of assigning each of said (N) bits to a different one of said (N) threads.
12. The article of manufacture of claim 9, said computer readable program code further comprising a series of computer readable program steps to effect posting said write thread.
13. The article of manufacture of claim 12, said computer readable program code further comprising a series of computer readable program steps to effect:
determining if a write thread is posted; operative if a write thread is posted, creating said (N) thread indicators.
14. The article of manufacture of claim 13, said computer readable program code further comprising a series of computer readable program steps to effect dispatching said write thread after setting said data structure indicator to indicate that the data structure is invalid.
15. A computer program product:
embodied in computer readable storage medium, said computer program product being useable with a programmable computer processor to update a data structure disposed in device microcode, wherein said device microcode further comprises (N) non-preemptable threads, a thread dispatcher, a data structure indicator, and wherein said data structure comprises first information, wherein (N]) is greater than 1, comprising:
computer readable program code which causes said programmable computer processor to receive a write thread comprising second information;
computer readable program code which causes said programmable computer processor to set said data structure indicator to indicate that said data structure is unusable;
computer readable program code which causes said programmable computer processor to create (N) thread indicators comprising a bitmask which includes (N) bits, wherein each of those bits can be set to either a first value or a second value, and wherein each bit is initially set to said first value;
computer readable program code which causes said programmable computer processor to assign each of said (N) thread indicators to a different one of said (N) threads;
computer readable program code which, upon return of the (i)th thread to the thread dispatcher, causes said programmable computer processor to set the (i)th thread indicator to said second value, wherein (i) is greater than or equal to 1 and less than or equal to (N);
computer readable program code which causes said programmable computer processor to determine if the thread indicators for each of said (N) threads are set to indicate that upon a subsequent dispatch each of those (N) threads will see said data structure indicator indicating that said data structure is unusable;
computer readable program code which, if the thread indicators for each of said (N) threads are set said second value, causes said programmable computer processor to:
set said data structure indicator to indicate that said data structure is invalid;
update said data structure to comprise said second information;
and set said data structure indicator to indicate that said data structure is valid.
16. The computer program product of claim 15, further comprising computer readable program code which causes said programmable computer processor to assign each of said (N) bits to a different one of said (N) threads.
17. The computer program product of claim 15, further comprising computer readable program code which causes said programmable computer processor to post said write thread.
18. The computer program product of claim 17, further comprising:
computer readable program code which causes said programmable computer processor to determining if a write thread is posted;
computer readable program code which, if a write thread is posted, causes said programmable computer processor to create said (N) thread indicators.
19. The computer program product of claim 18, further comprising computer readable program code which causes said programmable computer processor to dispatch said write thread after setting said data structure indicator to indicate that said data structure is invalid.
US10/877,312 2004-06-24 2004-06-24 Method to update a data structure disposed in an embedded device Expired - Fee Related US7289998B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US10/877,312 US7289998B2 (en) 2004-06-24 2004-06-24 Method to update a data structure disposed in an embedded device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US10/877,312 US7289998B2 (en) 2004-06-24 2004-06-24 Method to update a data structure disposed in an embedded device

Publications (2)

Publication Number Publication Date
US20050289544A1 US20050289544A1 (en) 2005-12-29
US7289998B2 true US7289998B2 (en) 2007-10-30

Family

ID=35507616

Family Applications (1)

Application Number Title Priority Date Filing Date
US10/877,312 Expired - Fee Related US7289998B2 (en) 2004-06-24 2004-06-24 Method to update a data structure disposed in an embedded device

Country Status (1)

Country Link
US (1) US7289998B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120143836A1 (en) * 2010-12-01 2012-06-07 International Business Machines Corporation Validation of access to a shared data record subject to read and write access by multiple requesters
US8788465B2 (en) 2010-12-01 2014-07-22 International Business Machines Corporation Notification of configuration updates in a cluster system
US20140282568A1 (en) * 2013-03-15 2014-09-18 International Business Machines Corporation Dynamic Library Replacement
US8943082B2 (en) 2010-12-01 2015-01-27 International Business Machines Corporation Self-assignment of node identifier in a cluster system
US9069571B2 (en) 2010-12-01 2015-06-30 International Business Machines Corporation Propagation of unique device names in a cluster system
US9183148B2 (en) 2013-12-12 2015-11-10 International Business Machines Corporation Efficient distributed cache consistency

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868231B (en) * 2021-12-03 2022-03-18 南昌龙旗信息技术有限公司 Data structure updating method and device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5630136A (en) 1995-06-09 1997-05-13 Sun Microsystems, Inc. Method and apparatus for serializing access to multithreading unsafe resources
US5878237A (en) * 1997-07-11 1999-03-02 Compaq Computer Corp. Apparatus, method and system for a comuter CPU and memory to PCI bridge having a pluarlity of physical PCI buses
US6073253A (en) * 1997-12-19 2000-06-06 International Business Machines Corporation Enhanced reset and built-in self-test mechanisms for single function and multifunction input/output devices
US6430638B1 (en) 1997-06-30 2002-08-06 Sun Microsystems, Inc. Thread synchronization via selective object locking
US6487571B1 (en) 1999-10-07 2002-11-26 International Business Machines Corporation Method and system for generating actual random numbers within a multiprocessor system
US20030005103A1 (en) * 1998-06-15 2003-01-02 Narad Charles E. Cumulative status of arithmetic operations
US6507903B1 (en) 2000-06-20 2003-01-14 International Business Machines Corporation High performance non-blocking parallel storage manager for parallel software executing on coordinates
US20030051113A1 (en) * 1999-03-03 2003-03-13 Beardsley Brent Cameron Method and system for managing meta data
US6578131B1 (en) 1999-04-27 2003-06-10 Microsoft Corporation Scaleable hash table for shared-memory multiprocessor system
US20030131119A1 (en) * 2002-01-04 2003-07-10 Noonan Robert L. Method and apparatus for passive PCI throttling in a remote server management controller
US20030158993A1 (en) * 2002-02-15 2003-08-21 International Business Machines Corporation Method and apparatus embedding PCI-to PCI bridge functions in PCI devices using PCI configuration header type 0
US20040230815A1 (en) * 2003-04-29 2004-11-18 International Business Machines Corporation. Target self-security for upgrades for an embedded device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5630136A (en) 1995-06-09 1997-05-13 Sun Microsystems, Inc. Method and apparatus for serializing access to multithreading unsafe resources
US6430638B1 (en) 1997-06-30 2002-08-06 Sun Microsystems, Inc. Thread synchronization via selective object locking
US5878237A (en) * 1997-07-11 1999-03-02 Compaq Computer Corp. Apparatus, method and system for a comuter CPU and memory to PCI bridge having a pluarlity of physical PCI buses
US6073253A (en) * 1997-12-19 2000-06-06 International Business Machines Corporation Enhanced reset and built-in self-test mechanisms for single function and multifunction input/output devices
US20030005103A1 (en) * 1998-06-15 2003-01-02 Narad Charles E. Cumulative status of arithmetic operations
US20030051113A1 (en) * 1999-03-03 2003-03-13 Beardsley Brent Cameron Method and system for managing meta data
US6578131B1 (en) 1999-04-27 2003-06-10 Microsoft Corporation Scaleable hash table for shared-memory multiprocessor system
US6487571B1 (en) 1999-10-07 2002-11-26 International Business Machines Corporation Method and system for generating actual random numbers within a multiprocessor system
US6507903B1 (en) 2000-06-20 2003-01-14 International Business Machines Corporation High performance non-blocking parallel storage manager for parallel software executing on coordinates
US20030131119A1 (en) * 2002-01-04 2003-07-10 Noonan Robert L. Method and apparatus for passive PCI throttling in a remote server management controller
US20030158993A1 (en) * 2002-02-15 2003-08-21 International Business Machines Corporation Method and apparatus embedding PCI-to PCI bridge functions in PCI devices using PCI configuration header type 0
US20040230815A1 (en) * 2003-04-29 2004-11-18 International Business Machines Corporation. Target self-security for upgrades for an embedded device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8943082B2 (en) 2010-12-01 2015-01-27 International Business Machines Corporation Self-assignment of node identifier in a cluster system
US20120209821A1 (en) * 2010-12-01 2012-08-16 International Business Machines Corporation Validation of access to a shared data record subject to read and write access by multiple requesters
US8788465B2 (en) 2010-12-01 2014-07-22 International Business Machines Corporation Notification of configuration updates in a cluster system
US20120143836A1 (en) * 2010-12-01 2012-06-07 International Business Machines Corporation Validation of access to a shared data record subject to read and write access by multiple requesters
US9069571B2 (en) 2010-12-01 2015-06-30 International Business Machines Corporation Propagation of unique device names in a cluster system
US20140282568A1 (en) * 2013-03-15 2014-09-18 International Business Machines Corporation Dynamic Library Replacement
US20140282462A1 (en) * 2013-03-15 2014-09-18 International Business Machines Corporation Dynamic library replacement
US9529585B2 (en) * 2013-03-15 2016-12-27 International Business Machines Corporation Dynamic library replacement
US9535686B2 (en) * 2013-03-15 2017-01-03 International Business Machines Corporation Dynamic library replacement
US20170075683A1 (en) * 2013-03-15 2017-03-16 International Business Machines Corporation Dynamic Library Replacement
US10423440B2 (en) * 2013-03-15 2019-09-24 International Business Machines Corporation Dynamic library replacement
US9183148B2 (en) 2013-12-12 2015-11-10 International Business Machines Corporation Efficient distributed cache consistency
US9262324B2 (en) 2013-12-12 2016-02-16 International Business Machines Corporation Efficient distributed cache consistency

Also Published As

Publication number Publication date
US20050289544A1 (en) 2005-12-29

Similar Documents

Publication Publication Date Title
US10089012B1 (en) Zero on demand operations based on zeroed chunk tables of storage drive objects stored in main memory
US7047355B2 (en) Updated data write method using journal log
US8782360B2 (en) Preserving an existing volume map in re-initializing a data storage volume
US7958302B2 (en) System and method for communicating data in a storage network
US20080082525A1 (en) File storage system, file storing method and file searching method therein
US20060224928A1 (en) Apparatus and method to generate and save run time data
US7783823B2 (en) Hardware device data buffer
US20060109792A1 (en) Apparatus and method to check data integrity when handling data
US8346721B2 (en) Apparatus and method to replicate remote virtual volumes to local physical volumes
US20090055616A1 (en) Maintaining reserved free space for segmented logical volumes
US8024519B2 (en) Catalog recovery through system management facilities reverse transversal
US7289998B2 (en) Method to update a data structure disposed in an embedded device
US7856540B2 (en) System and article of manufacture for removing alias addresses from an alias address pool
US20090144463A1 (en) System and Method for Input/Output Communication
US10606501B2 (en) Management of paging in compressed storage
US6732194B1 (en) Method and apparatus for multi-sequential data operations
EP3555774B1 (en) Efficient database management system utilizing silo and manifest
US7562163B2 (en) Apparatus and method to locate a storage device disposed in a data storage system
US7921324B2 (en) Providing file system availability during local path failure of a non-server node
US20090300309A1 (en) Storage apparatus
US6170034B1 (en) Hardware assisted mask read/write
US10338850B2 (en) Split-page queue buffer management for solid state storage drives
US8135922B2 (en) Apparatus and method to validate the configuration of an information storage and retrieval system
US8055868B2 (en) Apparatus and method to store original point-in-time data
CN100428188C (en) Apparatus and method to transfer information from a first information storage to a second information storage

Legal Events

Date Code Title Description
AS Assignment

Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:KALOS, MATTHEW J.;REEL/FRAME:015266/0992

Effective date: 20040614

REMI Maintenance fee reminder mailed
FPAY Fee payment

Year of fee payment: 4

SULP Surcharge for late payment
AS Assignment

Owner name: GOOGLE INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:INTERNATIONAL BUSINESS MACHINES CORPORATION;REEL/FRAME:026664/0866

Effective date: 20110503

FEPP Fee payment procedure

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20151030

AS Assignment

Owner name: GOOGLE LLC, CALIFORNIA

Free format text: CHANGE OF NAME;ASSIGNOR:GOOGLE INC.;REEL/FRAME:044142/0357

Effective date: 20170929