`Szymanski etal.
`
`119
`
`CIOYA
`US005566337A
`(1) Patent Number:
`[45] Date of Patent:
`
`5,566,337
`Oct. 15, 1996
`
`[54] METHOD AND APPARATUS FOR
`veING EVENTS IN AN OPERATING
`
`FOREIGN PATENT DOCUMENTS
`0528222
`2/1993 European Pat. Off.
`.
`WO91/03017
`3/1991 WIPO .
`
`(75]
`
`Inventors: Steven J. Szymanski, Cupertino;
`Thomas E. Saulpaugh, San Jose;
`William J. Keenan, RedwoodCity, all
`of Calif.
`
`[73] Assignee: Apple Computer, Inc., Cupertino,
`Calif.
`
`(21] Appl. No.: 242,204
`
`Filed:
`May 13, 1994
`(22]
`6
`Tint, Ce cecccccssssssesssesesssesesseessnsensneensneeessees GO06F 9/00
`[5 1]
`TLS. Che ceeeeeeessecseesesseenes 395/733; 395/650; 395/700
`[52]
`[58] Field of Search .o....cccccecececesseeteseeee 395/650, 725,
`395/700, 775
`
`.
`
`OTHER PUBLICATIONS
`.
`.
`‘OS/2 2.0 Presentation Manager Programming
`IBM:
`Guide’, Mar._1992, QUE, USA,p. 31-5, last paragrph, p.
`31-6, paragraph 3.
`
`Primary Examiner—Jack B. Harvey
`Assistant Examiner—Sumati Lefkowitz
`Attorney, Agent, or Firm—Bumns, Doane, Swecker & Mathis
`
`(57]
`
`ABSTRACT
`
`In a computer including an operating system, an event
`producer for gencrating an event and detecting that an event
`has occurred in the computer and an event consumer which
`need to be informed when events occur in the computer, a
`system for distributing events including a store for storing a
`specific set of events of which the at least one event
`consumeris to be informed, an event manager control unit
`for receiving the event from the event producer, comparing
`the received event to the stored set of events, and distrib-
`uting an appropriate event to an appropriate event consumer,
`and a distributorfor receiving the eventfrom the control unit
`and directing the control unit to distribute an appropriate
`event to an appropriate event consumer.
`
`24 Claims, 10 Drawing Sheets
`
`(56]
`
`References Cited
`U.S. PATENT DOCUMENTS
`.
`5,155,842 10/1992 Rubin wo....ceeccseseesceseetsseesesees 3
`95/182.2
`
`5,237,684
`8/1993 Recordet al.
`aoe
`395/650
`5,291,608
`3/1994 Flurry ..........
`-- 395/725
`"
`5,305,454
`4/1994 Recordet al.
`~ 395/650
`«- 395/650
`5,321,837
`6/1994 Danielet al.....
`395/650
`5,355,484 10/1994 Record et al.
`5,430,875
`7/1995 Ma sivecssessssesssesscessesscsaeeenreesnes 395/650
`
`
`
`#3
`
`SEQUENTIAL
`CONSUMER
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 1
`
`
`
`U.S. Patent
`
`Oct. 15, 1996
`
`Sheet 1 of 10
`
`5,566,337
`
`FIG.
`
`1
`
`12
`
`INPUT
`DEVICE 20
`
` PROCESSOR
`
`
`
`
`
`
`
`OUTPUT
`DEVICE 22
`
` MEMORY 24
`
`OPERATING SYSTEM
`28
`
`EVENT
`MANAGER 30
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 2
`
`
`
`
`U.S. Patent
`
`
`
`Oct. 15, 1996
`
`
`
`
`
`
`
`
`Sheet 2 of 10
`
`
`
`5,566,337
`
`
`
`310
`
`
`BROADCAST
`
`CONSUMER
`
`#}
`
`
`[BROADCAST
`
`CONSUMER
`
`#2
`
`
`BROADCAST
`
`cone
`
`
`
`
`ROADCAST
`CONSUMER
`
`
`
`
`
`
`
`
`
`
`
`| |
`
`|
`
`|
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`SEQUENTIAL
`CONSUMER
`
`#1
`
`
`
`
`
`SEQUENTIAL
`CONSUMER
`
`#2
`
`
`EQUENTIAL
`
`CONSUMER
`
`#3
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`|
`
`| |
`
`|;
`
`| | |
`
`305Nye
`
`
`
`
`
`320
`
`
`
`
`
`EVENT
`
`
`QUEUE
`#1
`
`
`SUBSCRIPTION
`MATRIX
`
`
`
`
`EVENT
`
`QUEUE
`
`#2
`
`
`EVENT
`
`
`QUEUE
`#3
`
`
`EVENT
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`| | ||B
`
`
`
`
`SEQUENTIAL
`CONSUMER
`
`DATABASE
`
`
`
`
`
`
`
`
`
`EVENT
`
`EVENT
`
`
`
`DISTRIBUTOR
`DISTRIBUTOR
`
`
`
`
`
`
`#2
`
`
`
`| | | | 1|S
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`#3
`
`
`EVENT
`EVENT
`EVENT
`EVENT
`
`
`
`
`
`PRODUCER
`
`PRODUCER PRODUCER||PRODUCER
`
`
`
`
`we
`#1
`#2
`
`
`
`
`
`
`FIG. 2
`
`
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 3
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 3
`
`
`
`
`U.S. Patent
`
`
`
`Oct. 15, 1996
`
`
`
`
`
`Sheet 3 of 10
`
`
`
`
`
`
`5,566,337
`
`
`
`
`FIG. 3
`
`
`
`
`FIG. 6
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`EVENT ARRAY
`
`
`
`
`
`
`
`
`
`
`
`
`3310
`
`
`
`NEXT HEADER
`
`
`
`
`DISTRIBUTOR OBJECT ID
`
`
`
`
`EVENT IDENTIFIER
`
`
`
`
`
`FIRST SUBSCRIPTION
`
`LAST SUBSCRIPTION
`
`
`
`
`FIG. 7
`
`
`45
`
`
`
`
`EVENT SERVICE
`
`x
`
`EVENT KIND
`
`
`
`
`FIG. 8
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`FIG. 5a
`ae
`
`3300
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`,
`
`
`
`
` EVENT SUBJECT
`
`
`
`
`
`
`FIG. 5b
`
`
`EVENT IDENTIFIER
`
`
`
`
`EVENT SUBJECT
`
`
`
`3500
`
`
`
`
`
`
`
`
`
`
`SEQUENTIAL CONSUMER OBJECT ID
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 4
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 4
`
`
`
`U.S. Patent
`
`Oct. 15, 1996
`
`Sheet 4 of 10
`
`5,566,337
`
`SUBSCRIPTION
`MATRIX
`330
`
`| | E
`
`SUBSCRIPTION
`STRUCTURES
`
`I
`|
`
`EVENT
`QUEUES
`320
`
`FIG. 4
`
`VENT KIND
`HEADERS
`
`331
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 5
`
`
`
`U.S. Patent
`
`Oct. 15, 1996
`
`Sheet 5 of 10
`
`5,566,337
`
`FIG. 9A
`
`604
`
`PRODUCER
`GENERATES
`DESCRIPTION OF
`EVENT
`602
`
`CALL EVENT MANAGER
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 6
`
`
`
`USS. Patent
`
`Oct. 15, 1996
`
`Sheet 6 of 10
`
`5,566,337
`
`FIG. 9B
`
`
`
`ASYNCHRONOUS
`PROCESSING?
`
`.
`
`PRODUCER 608
`
`
`
`
`PROCESS
`
`ASYNCHRONOUSLY
`610
`
`
`
`
`
`
`
`
`
`
`EVENT MANAGER SENDS EVENT TO EACH
`SEQUENTIAL CONSUMER WITH
`MATCHING DATABASE ENTRIES
`614
`
`SEQUENTIAL CONSUMER INDICATES
`IF PROCESSING OF EVENT SHOULD
`CONTINUE OR STOP
`616
`
`EVENT HANDLED?
`618
`
`
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 7
`
`
`
`U.S. Patent
`
`Oct. 15, 1996
`
`Sheet 7 of 10
`
`5,566,337
`
`FIG. 9C
`
`
`
`EVENT MANAGER SENDS
`
`EVENT TO DISTRIBUTOR TO
`DISTRIBUTE TO BROADCAST
`
`
`
`
` ENQUEUE EVENTS
`ACCORDING TO CALLS
`625
`
`YES
`
`RETURN TO
`PRODUCER
`618
`
`630
`
`REPLY TO
`PRODUCER
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 8
`
`
`
`U.S. Patent
`
`Oct. 15, 1996
`
`Sheet 8 of 10
`
`5,566,337
`
`FIG. 9D
`
`
`
`
`
`
`
`USE
`
`PLACEHOLDER
`FOR DATA?
`6240
`
`Yes
`
` USE
`GiveToAllConsumers
`
`CALL
`6244
`
`USE
`GiveToSelectConsumers
`CALL
`6246
`
`
`
`
`
`
`
`
`
`
` USE
`
`GivePlaceholderToAllConsumers
`CALL
`6250
`
`
`
` USE
`
`GivePlacehoiderToSeiectConsumers
`CALL
`
`6252
`
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 9
`
`
`
`U.S. Patent
`
`Oct. 15, 1996
`
`Sheet 9 of 10
`
`5,566,337
`
`FIG. 10
`
`SEQUENTIAL
`
`
`
`CALL EVENT MANAGER
`TO GET INSTALLED
`700
`
`WAIT FOR EVENT
`702
`
`RECEIVED?
`
`704
`
` EVENT
`
`
`
`
`ACT ON EVENT
`
`704
`
`EVENT TO BE PASSED
`TO NEXT SEQUENTIAL
`CONSUMER
`709
`
`
`
`
`
`
`
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 10
`
`
`
`
`U.S. Patent
`
`
`
`Oct. 15, 1996
`
`
`
`
`
`Sheet 10 of 10
`
`
`
`
`
`5,566,337
`
`
`
`
`FIG. 11
`
`
`
`
`BROADCAST
`
`CONSUMERS
`
`
`
`
`
`
`
`
`
`REGISTER WITH
`
`
`EVENT MANAGER
`
`800
`
`
`
`
`
`BROADCAST CONSUMER
`
`
`
`
`CALLS EVENT MANAGER TO
`SUBSCRIBE TO KINDS OF
`
`
`
`
`
`EVENTS
`804
`
`
`
`
`
`
`
`EVENT CREATES
`
`
`
`
`
`EVENT QUEUE AND
`RETURNS
`
`
`802
`
`
`
`
`
`
`
`
`
`EVENT MANAGER ADDS
`
`
`
`
`
`ENTRIES TO SUBSCRIPTION
`
`MATRIX
`
`806
`
`
`
`
`
`
`BROADCAST CONSUMER
`
`
`
`
`
`CALLS EVENT MANAGER TO
`
`
`
`GET NEXT EVENT
`
`808
`
`
`
`
`
`ACT ON EVENT
`810
`
`
`
`
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 11
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 11
`
`
`
`5,566,337
`
`
`
`
`1
`METHOD AND APPARATUS FOR
`
`
`
`
`DISTRIBUTING EVENTS IN AN OPERATING
`
`
`
`
`
`SYSTEM
`
`
`CROSS-REFERENCE TO RELATED
`
`
`APPLICATIONS
`
`
`
`
`The present application is related to a patent application
`
`
`
`
`
`
`
`
`No. 08/245,141 entitled “Method and Apparatus for Han-
`
`
`
`
`
`
`
`dling Requests Regarding Information Stored in A File
`
`
`
`
`
`
`
`System”, in the name of Steven James Szymanski and Bill
`
`
`
`
`
`
`
`
`
`Monroe Bruffey, filed on May 13, 1994, herein incorporated
`
`
`
`
`
`
`
`
`by reference.
`
`
`
`
`
`
`
`
`
`BACKGROUND
`
`
`
`
`
`
`
`The present invention is directed to a method and appa-
`
`
`
`
`
`
`
`
`
`ratus for distributing information about events occurring in
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`a computer, and in particular an event manager which
`
`
`
`
`
`
`
`
`manages the distribution of those events to the appropriate
`entities within the computer.
`
`
`
`
`For purposes of this description, an event is any occur-
`
`
`
`
`
`
`
`
`
`rence in a computer of which software programs running on
`
`
`
`
`
`
`
`
`
`that computer or on a connected computer might need to be
`
`
`
`
`
`
`
`
`
`
`informed. Events may include occurrences such as, for
`
`
`
`
`
`
`
`
`example, a keystroke, a mouse click, disk insertion and
`
`
`
`
`
`
`
`
`
`ejection, network connection and disconnection, the com-
`
`
`
`
`
`
`puter entering a ‘sleep mode” shutdown, a window uncov-
`
`
`
`
`
`
`
`
`ercd (i.c., the contents of the window need to be redis-
`
`
`
`
`
`
`
`
`
`
`played), a newfile created, a directory renamed, the contents
`
`
`
`
`
`
`
`
`offile changed, andthe tree space.on a volume changed,etc.
`
`
`
`
`
`
`
`
`
`
`
`Interrupts and error conditions may also be counted as
`
`
`
`
`
`
`
`
`
`atypical examples of events. In particular, interrupts need to
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`be handled by a program so an event manager is an inap-
`propriate solution. However, the code which does handle the
`
`
`
`
`
`
`
`
`
`interrupt might generate an event based onthe interpretation
`
`
`
`
`
`
`
`
`
`of the interrupt. For example, the computer might generate
`
`
`
`
`
`
`
`
`
`an interrupt whenthe userinserts a floppy disk. The interrupt
`
`
`
`
`
`
`
`
`
`
`itself is unlikely to be propagated by the event manager, but
`
`
`
`
`
`
`
`
`
`
`
`it would be reasonable for the interrupt handler to produce
`
`
`
`
`
`
`
`
`
`
`a “disk inserted”event. Error conditions are similar. Most of
`
`
`
`
`
`
`
`
`
`
`the time it is necessary for one of the computer programs on
`
`
`
`
`
`
`
`
`
`
`
`
`the system to handle the error, therefore more direct pointto
`
`
`
`
`
`
`
`
`
`
`
`point mechanisms are appropriate. However,there are kinds
`
`
`
`
`
`
`
`
`of errors which are more advisory in nature which would be
`
`
`
`
`
`
`
`
`
`
`
`appropriate to be sent via events. For example, some por-
`
`
`
`
`
`
`
`
`
`table computers take various actions to reduce power con-
`
`
`
`
`
`
`
`
`
`sumption whenthe battery gets low. It would be appropriate
`
`
`
`
`
`
`
`
`
`to produce an event called “battery low” to inform all
`
`
`
`
`
`
`
`
`
`
`software programs of the condition, and have all of the
`
`
`
`
`
`
`
`
`
`
`software which can reduce power consumption consume
`
`
`
`
`
`
`
`these events.
`
`
`Currently, known operating systemsall have some type of
`
`
`
`
`
`
`
`
`
`mechanism for managing the events that occur within the
`
`
`
`
`
`
`
`
`
`computer. However, these mechanismsuse a point-to-point
`
`
`
`
`
`
`
`method of managing the events. That.is, the entities pro-
`
`
`
`
`
`
`
`
`
`ducing or detecting events distribute the events to the
`
`
`
`
`
`
`
`
`
`entities using the events. To accomplish this, all of the
`
`
`
`
`
`
`
`
`
`
`entities producing or detecting events must know which
`
`
`
`
`
`
`
`
`entities they must notify when a particular event is generated
`
`
`
`
`
`
`
`
`
`within the computer. This configuration is very cumbersome
`
`
`
`
`
`
`
`
`and inefficient. Further, it is resource intensive since all
`
`
`
`
`
`
`
`
`
`entities producing or detecting events must have information
`
`
`
`
`
`
`
`
`on all the events they produce or detect and also onall the
`
`
`
`
`
`
`
`
`
`
`
`
`
`entities interested in those events. This information is both
`
`
`
`
`
`
`
`
`
`extensive and constantly changing, causing modifications to
`
`
`
`
`
`
`
`be difficult.
`
`
`
`
`
`
`
`
`
`20
`
`
`
`25
`
`
`
`
`
`
`40
`
`
`45
`
`
`
`
`
`
`
`
`
`
`
`
`2
`Further, point-to-point mechanismslackflexibility. Under
`
`
`
`
`
`
`point-to-point schemes, if there is a new consumer of an
`
`
`
`
`
`
`
`
`
`
`event, a new version of the producer must be released which
`
`
`
`
`
`
`
`
`
`
`knowsabout the new consumer. Or if a new kind of event
`
`
`
`
`
`
`
`
`
`
`
`becomes necessary, a new version of the event manager
`
`
`
`
`
`
`
`
`
`must be released which knows how to distribute the new
`
`
`
`
`
`
`
`
`
`
`kind of event.
`
`
`
`It is desirable to provide an apparatus for efficiently
`
`
`
`
`
`
`
`
`
`dealing with all kinds of events in an operating system and
`
`
`
`
`
`
`
`
`
`
`
`for distributing information regarding specific kinds of
`
`
`
`
`
`
`
`events to programs which require such information. To this
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`end, it is also desirable to improve the system performance
`
`
`
`
`
`
`
`
`and reduce the resources required to distribute such infor-
`mation. To meet these goals, it is desirable to provide an
`
`
`
`
`
`
`
`
`
`
`
`apparatus for managing events in which communication
`
`
`
`
`
`
`
`between the event producers and consumersis facilitated
`
`
`
`
`
`
`
`
`without requiring each event producer to be aware ofall of
`
`
`
`
`
`
`
`
`
`
`
`the event consumers.
`
`
`
`
`BRIEF STATEMENT OF THE INVENTION
`
`
`
`
`
`
`
`
`
`
`
`
`In accordance with the present invention, the foregoing
`
`
`
`
`
`
`
`
`objectives, as well as others, are achieved through central-
`
`
`
`
`
`
`
`
`ization of event management, and in particular, by providing
`
`
`
`
`
`
`
`
`an event manager for handling the distribution of events
`
`
`
`
`
`
`
`
`within the computer.
`
`
`
`According to one embodiment, in a computer includingat
`
`
`
`
`
`
`
`
`least one event producer for detecting that an event has
`
`
`
`
`
`
`
`
`
`
`occurred in the computer and generating an event and at
`
`
`
`
`
`
`
`
`
`
`least one event consumer which need to be informed when
`
`
`
`
`
`
`
`
`
`
`events occur in the computer, a system is provided for
`
`
`
`
`
`
`
`
`
`
`distributing information about events. The system includes
`
`
`
`
`
`
`
`storing meansforstoring a specific set of events of which the
`
`
`
`
`
`
`
`
`
`
`
`event consumers are to be informed, an event manager
`
`
`
`
`
`
`
`
`
`control means for receiving the event from the event pro-
`
`
`
`
`
`
`
`
`
`ducer, comparing the received event to the stored set of
`
`
`
`
`
`
`
`
`
`events, and distributing an appropriate cvent to an appro-
`
`
`
`
`
`
`
`
`priate event consumer, and a distributor for receiving the
`
`
`
`
`
`
`
`
`
`event from the control means and directing the control
`
`
`
`
`
`
`
`
`
`meansto disiribute an appropriate event to an appropriate
`
`
`
`
`
`
`
`
`
`event consumer.
`
`
`According to another embodiment, a system is provided
`
`
`
`
`
`
`
`
`for distributing events occurring in a computer. The system
`
`
`
`
`
`
`
`
`comprises event producers for detecting that an event has
`
`
`
`
`
`
`
`
`
`occurred in the computer, generating an event, and gener-
`
`
`
`
`
`
`
`
`ating a description of the event and event consumers which
`
`
`
`
`
`
`
`
`
`need to be informed when events occur in the computer, the
`
`
`
`
`
`
`
`
`
`
`
`event consumers comprising a first and a second class of
`
`
`
`
`
`
`
`
`
`
`consumers. The system further comprises storing means for
`
`
`
`
`
`
`
`
`storing a specific set of events of which the event consumers
`
`
`
`
`
`
`
`
`
`
`am to be informed, event manager control means for receiv-
`
`
`
`
`
`
`
`
`
`ing the event from the event producers and comparing the
`
`
`
`
`
`
`
`
`
`
`received event to the stored set of events, distributor means,
`
`
`
`
`
`
`
`
`
`
`responsive to the event control means, for deciding if an
`
`
`
`
`
`
`
`
`
`
`event should be passed to an cvent consumer. The event
`
`
`
`
`
`
`
`
`
`
`manager control means comprises first means for sending an
`
`
`
`
`
`
`
`
`
`event to appropriate event consumers of a fixst type in
`
`
`
`
`
`
`
`
`
`
`accordance with the stored set of events, and second means
`
`
`
`
`
`
`
`
`
`
`for sending the event to appropriate event consumers of a
`
`
`
`
`
`
`
`
`
`second type responsive to the distributor means.
`
`
`
`
`
`
`
`According to another embodiment, a method is provided
`
`
`
`
`
`
`
`
`for distributing events occurring in a computer. The method
`
`
`
`
`
`
`
`
`comprises the steps of determining that an event has been
`
`
`
`
`
`
`
`
`
`
`detected by an event producer in the computer, storing, in a
`
`
`
`
`
`
`
`
`
`
`
`storing means, a specific set of events of which an event
`
`
`
`
`
`
`
`
`
`
`
`consumeris to be informed, receiving the event in an event
`
`
`
`
`
`
`
`
`
`
`
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 12
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 12
`
`
`
`5,566,337
`
`
`
`
`3
`control means from the event producer and comparing the
`
`
`
`
`
`
`
`
`
`received eventto the stored set of events. The method further
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`comprises receiving the event in a distributor means from
`the control means, directing the control meansto distribute
`
`
`
`
`
`
`
`
`
`an appropriate event to an appropriate event consumer, and
`
`
`
`
`
`
`
`
`
`distributing, via the control means, an appropriate event to
`
`
`
`
`
`
`
`
`
`an appropriate event consumer.
`
`
`
`
`Still other objects, features and attendant advantages of
`
`
`
`
`
`
`
`
`the present invention will become apparent to those skilled
`
`
`
`
`
`
`
`
`
`in the art from a reading of the following detailed description
`
`
`
`
`
`
`
`
`
`
`of the embodiments constructed in accordance therewith,
`
`
`
`
`
`
`
`taken in conjunction with the accompanying drawings.
`
`
`
`
`
`
`
`
`BRIEF DESCRIPTION OF THE DRAWINGS
`
`
`
`
`
`
`
`
`
`The present invention will now be described in more
`
`
`
`
`
`
`
`
`
`detail with reference to preferred embodiments of the
`
`
`
`
`
`
`
`
`method and apparatus, given only by way of example, and
`
`
`
`
`
`
`
`
`
`
`with reference to the accompanying drawings, in which:
`
`
`
`
`
`
`
`
`
`FIG. 1 is a block diagram of an exemplary computer on
`
`
`
`
`
`
`
`
`
`
`which the present invention can be implemented;
`
`
`
`
`
`
`
`
`FIG. 2 is a block diagram of the architecture for the event
`
`
`
`
`
`
`
`
`
`
`manager according to onc embodimentof the present inven-
`
`
`
`
`
`
`
`
`tion;
`
`FIG. 3 is an exemplary embodimentof the event queue
`
`
`
`
`
`
`
`
`
`
`data structure according to the present invention;
`
`
`
`
`
`
`
`FIG. 4 is an exemplary embodiment of the subscription
`
`
`
`
`
`
`
`
`matrix according to the present invention;
`
`
`
`
`
`
`FIG. 5a is an exemplary embodimentof the subscription
`
`
`
`
`
`
`
`
`data structure according to the present invention;
`
`
`
`
`
`
`
`FIG. 5b is an exemplary embodiment of the sequential
`
`
`
`
`
`
`
`
`consumerentry structure accordingto the present invention;
`
`
`
`
`
`
`
`FIG. 6 is an exemplary embodiment of the event kind
`
`
`
`
`
`
`
`
`
`header data structure according to the present invention;
`
`
`
`
`
`
`
`
`FIG. 7 is an exemplary embodiment of the event name
`
`
`
`
`
`
`
`
`
`data structure according to the present invention;
`
`
`
`
`
`
`
`FIG. 8 is an exemplary embodiment of the event data
`
`
`
`
`
`
`
`
`
`structure according to the present invention;
`
`
`
`
`
`
`FIGS. 9A, 9B, 9C and 9D are flowchart illustrating the
`
`
`
`
`
`
`
`
`
`event handling process from the event producers’ and the
`
`
`
`
`
`
`
`
`event distributors’ point of view according to one embodi-
`
`
`
`
`
`
`
`
`ment of the present invention;
`
`
`
`
`
`FIG. 10 is a flowchart illustrating the event handling
`
`
`
`
`
`
`
`
`
`process from the sequential consumers’ point of view
`
`
`
`
`
`
`
`
`according to one embodimentof the present invention; and
`
`
`
`
`
`
`
`
`
`FIG. 11 is a flowchart illustrating the event handling
`
`
`
`
`
`
`
`
`
`process from the broadcast consumers’ point of view
`
`
`
`
`
`
`
`
`according to one embodiment of the present invention.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`4
`
`which needs to be communicatedis referred to as the event.
`
`
`
`
`
`
`
`
`
`
`
`According to one embodiment, the event is described by
`
`
`
`
`
`
`
`
`
`three pans, an event identifier which indicates the kind of
`
`
`
`
`
`
`
`
`
`
`event, an event subject, which identifies the entity which the
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`event happened to, and event information which describes
`how the event occurred. The entities within the computer
`
`
`
`
`
`
`
`
`
`which are the sources of the information are referred to as
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`the producers of the event. In particular, an event producer
`is any software on a computer that
`is responsible for
`
`
`
`
`
`
`
`
`
`
`generating an event or for detecting that
`the computer
`
`
`
`
`
`
`
`
`
`hardware has generated an event. The event producer then
`
`
`
`
`
`
`
`
`
`generatesa description for each eventit produces ordetects.
`
`
`
`
`
`
`
`
`
`The entities within the computer which need to receive the
`
`
`
`
`
`
`
`
`
`
`information are referred to as consumers of the event. In
`
`
`
`
`
`
`
`
`
`
`particular, an event consumer is any program that needs to
`
`
`
`
`
`
`
`
`
`
`be informed when an event has occurred and needs to be
`
`
`
`
`
`
`
`
`
`
`
`informed of the description of the event. Any intermediate
`
`
`
`
`
`
`
`
`
`service which moderates the connection between the pro-
`
`
`
`
`
`
`
`ducers and consumers of an event is referred to as the
`
`
`
`
`
`
`
`
`
`
`distributor of the cvent.
`
`
`
`
`According to one embodiment of the present invention,
`
`
`
`
`
`
`
`
`there are two classcs of event consumers which differ in their
`
`
`
`
`
`
`
`
`
`
`
`relationships to other consumers of an event, namely broad-
`
`
`
`
`
`
`
`
`cast consumers and sequential consumers. Broadcast con-
`
`
`
`
`
`
`sumers have norelationship with other consumers. They do
`
`
`
`
`
`
`
`
`
`not need to know if other consumers exist, nor in what order
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`consumers arc informed of the event, as long as they
`themselves are eventually informed. Sequential consumers,
`
`
`
`
`
`
`onthe other hand, have very definite relationships with other
`
`
`
`
`
`
`
`
`
`
`consumers. They require that no other consumer be told
`
`
`
`
`
`
`
`
`
`about an event while they themselvesare still processing it,
`
`
`
`
`
`
`
`
`
`
`and they require the ability to influence when in the
`
`
`
`
`
`
`
`
`
`
`sequence they receive the event. In addition, many sequen-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`tial consumers require the ability to modify the eventitself,
`and even block an event from being received by other
`
`
`
`
`
`
`
`
`
`
`consumers. Consumers are defined as sequential or broad-
`
`
`
`
`
`
`
`cast based on whether they haveto react to an event without
`
`
`
`
`
`
`
`
`
`
`
`
`fail. In particular, a sequential consumer must react to the
`
`
`
`
`
`
`
`
`
`
`kinds of events in whichit is interested and so a distributor
`
`
`
`
`
`
`
`
`
`
`
`
`should not withhold those events from the sequential con-
`
`
`
`
`
`
`
`
`sumer. For example, a communications program would be a
`
`
`
`
`
`
`
`sequential consumer of events which notify of the dropping
`
`
`
`
`
`
`
`
`
`of a connection, since the communication program would
`
`
`
`
`
`
`
`need to respond to such an event.
`
`
`
`
`
`
`
`Broadcast consumers typically have a set of kinds of
`
`
`
`
`
`
`
`
`
`events in which they are interested and wantto be notified
`
`
`
`
`
`
`
`
`
`
`
`of the next event from this set as simply as possible. Many
`
`
`
`
`
`
`
`
`
`
`
`
`broadcast consumers arc interested in events that occur only
`
`
`
`
`
`
`
`
`
`to a limited set of subjects, and so one embodimentof the
`
`
`
`
`
`
`
`
`
`
`
`
`present invention provides a method for filtering events
`
`
`
`
`
`
`
`
`based on “who” they involve. In addition, the set of events
`
`
`
`
`
`
`
`
`
`
`
`in which the broadcast consumers are interested changes
`
`
`
`
`
`
`
`
`over time as does the immediacy of the interest. Thus, one
`
`
`
`
`
`
`
`
`
`
`
`embodiment of the present invention provides a method
`
`
`
`
`
`
`
`
`which aliows the consumerto modify the set of events which
`
`
`
`
`
`
`
`
`
`
`
`will be delivered to the consumer. Lastly, there is no clear
`
`
`
`
`
`
`
`
`
`
`
`pattern as to whether broadcast consumers wantto poll the
`
`
`
`
`
`
`
`
`
`
`event manager control unit to collect an event, or if they
`
`
`
`
`
`
`
`
`
`
`
`want to be notified asynchronously. Therefore, according to
`
`
`
`
`
`
`
`
`one embodiment, both options are supported.
`
`
`
`
`
`
`FIG. 1 is a block diagram showing an exemplary com-
`
`
`
`
`
`
`
`
`
`puter on which the software according to the present inven-
`
`
`
`
`
`
`
`
`
`tion can be implemented. The computer 10 includes a
`
`
`
`
`
`
`
`
`
`processor (CPU) 12, an external storage device 14, a disk
`
`
`
`
`
`
`
`
`
`
`
`
`
`storage device 16, an input/output (I/O) controller 18, an
`
`
`
`
`
`
`input device 20, an output device 22, a memory 24, and a
`
`
`
`
`
`
`
`
`
`
`
`
`
`common system bus 26 connecting each of the above
`
`
`
`
`
`
`
`
`
`
`
`roy 0
`
`
`
`
`
`20
`
`
`
`25
`
`
`30
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`65
`
`
`DETAILED DESCRIPTION
`
`
`
`
`
`
`
`
`
`
`In general, the invention recognizes the needforefficient
`
`
`
`
`
`
`
`
`communications between different entities within the com-
`
`
`
`
`
`
`puter concerning events occurring within the computer. In
`
`
`
`
`
`
`
`particular, communications are required to inform entities
`
`
`
`
`
`
`within the computer about the events produced by other
`
`
`
`
`
`
`
`
`entities. The method required to handle these commnunica-
`
`
`
`
`
`
`
`tions is complicated by the fact that the entities involved do
`
`
`
`
`
`
`
`
`
`
`
`not know the identity of the other entities. The method is
`
`
`
`
`
`
`
`
`
`
`
`further complicated by the fact that the identity of the
`
`
`
`
`
`
`
`
`
`
`entities needing to know about events andthelists of events
`
`
`
`
`
`
`
`
`
`
`
`which can occur are subject to constant change.
`
`
`
`
`
`
`
`
`Onc goal for the event manager according to the present
`
`
`
`
`
`
`
`
`
`invention is to provide a common service which supports a
`
`
`
`
`
`
`
`
`
`majority of these kinds of communications. The information
`
`
`
`
`
`
`
`
`
`
`
`
`Petitioner Riot Games,Inc. - Ex. 1024, p. 13
`
`Petitioner Riot Games, Inc. - Ex. 1024, p. 13
`
`
`
`5,566,337
`
`
`
`
`
`
`
`
`
`20
`
`
`
`
`
`
`
`35
`
`
`
`
`
`
`
`
`
`
`
`
`
`5
`
`6
`
`
`
`
`
`
`
`
`
`
`elements. Only one input device and one output device is
`
`
`
`
`
`
`
`
`to messaging system clients. These objects may represent,
`
`
`
`
`
`
`
`
`
`
`for example, devices, files, or windows managedbya server.
`shown in FIG. 1 for ease of readability purposes. However,
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`it will be appreciated that the computer 10 can include more
`
`
`
`
`
`
`
`
`Clients send messages to objects, which objects are identi-
`
`
`
`
`
`
`
`
`
`
`fied by an identification labelled ObjectID.
`than one such device. The processor 12, the external storage
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`device 14,the disk storage device 16 and the memory 24 are
`
`
`
`
`
`
`
`
`Messageports are abstractentities that represent a service.
`
`
`also connected through the bus 26 and the I/O controller 18
`
`
`
`
`
`
`
`
`
`These ports may represent, for example, a device driver, a
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`to the input and output devices 20 and 22. In addition, the
`
`
`
`
`
`
`
`
`file system, or a window manager. Servers receive messages
`
`
`
`
`
`
`
`
`
`
`computer 10 can also be adapted for communicating with a
`
`
`
`
`
`
`
`
`
`
`from ports, which ports are identified by a label PortID.
`network 27.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Objects are assigned to a port, A message sent to an object
`
`
`
`
`
`
`
`
`
`
`Stored within the memory 24 of the computer 10 are a
`is receivedat that object’s port. Ports and objects are created
`
`
`
`
`
`
`
`
`
`
`
`numberof pieces of software which can be executed by the
`
`
`
`
`
`
`
`
`
`
`by the messaging system on behalf of a server. The creation
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`processor 12. One ofthose pieces of software is an operating
`of an object requires designating a port from which mes-
`
`
`
`
`
`
`
`
`
`
`
`system 28. In one embodiment, the operating system 28 is a
`
`
`
`
`
`
`
`
`sages sent to the object will be retrieved.
`
`
`
`
`
`
`
`
`microkerne] operating system capable of maintaining mul-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`According to one embodiment, the messaging system is
`tiple address spaces. An event manager 30 resides within the
`
`
`
`
`
`
`
`
`
`used by the event managerin that the event distributors have
`
`
`
`
`
`
`
`
`
`
`
`operating system. In an exemplary embodiment, the com-
`
`
`
`
`
`
`
`an associated port and object, the sequential consumers have
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`puter system 16 of the present invention is an Apple Macin-
`
`
`
`
`
`
`
`
`
`an associated port and object, and the event manager main-
`
`
`
`
`
`
`
`
`
`tosh™ computer system made by Apple Computer, Inc., of
`tains a port and objects assigned to that port for each
`
`
`
`
`
`
`
`
`
`
`
`Cupertino, Calif., and having a microprocessor and a
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`broadcast consumer. The events are passed as messages by
`
`
`
`
`
`
`
`
`memory whercin a microkernel operating system 28 that
`
`
`
`
`
`
`
`
`
`the event producersto the distributor’s associated object, the
`includes the event manager 30 resides. The components of
`
`
`
`
`
`
`
`
`
`sequential consumers receive the messages from their asso-
`
`
`
`
`
`
`
`the computer system can be changed within the skill of the
`
`
`
`
`
`
`
`
`
`
`
`ciated port, and the broadcast consumers send messages to
`
`
`
`
`
`
`
`
`
`ordinary artisan once in possession of the instantdisclosurc.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`request events to the event manager via the object main-
`Although the present invention is described in a Macin-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`tained for that broadcast consumer. Additionally, according
`tosh™ environment, it is within the scope ofthe invention,
`
`
`
`
`
`
`
`
`
`
`to one embodiment, the event manager uses the message
`
`
`
`
`
`
`
`
`
`and within the skill of the ordinarily skilled artisan,
`to
`
`
`
`
`
`
`
`
`
`
`filter mechanism provided in a messaging system to imple-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`implementthe invention in a DOS, Unix, or other computer
`environment.
`ment sequential consumers. For each sequential consumer, a
`
`
`
`
`
`
`
`
`message filter is created on the distributor’s ObjectID. The
`
`
`
`
`
`
`
`
`
`The present invention relates to an architecture for an
`
`
`
`
`
`
`
`
`
`code which receives messages throughthefilter checks for
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`event manager for managing events that occur in an oper-
`matches (on the what and who provided) and forwards the
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`ating system. Clients of the event manager include event
`appropriate messages to the sequential consumer. One
`
`
`
`
`
`
`
`consumers and event producers, that is, applications pro-
`
`
`
`
`
`
`
`example of such a message filtering mechanism is described
`
`
`
`
`
`
`
`
`grams and the variousparts of the operating system, such as
`
`
`
`
`
`
`
`
`
`
`
`in the above-referenced patent application in the name of
`
`
`
`
`
`
`
`
`
`for example, a file manager.
`
`
`
`
`
`Thomas E, Saulpaugh and Steven J. Szymanski.
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`the present invention
`According to one embodiment,
`
`FIG.2 is a block diagram of the architecture for the event
`
`
`
`
`
`
`
`
`
`
`cooperates with an operating system with a microkemel
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`manager 30 shownin FIG. 1. The event manager 30 (shown
`architecture in which the kernel provides a semaphore
`
`
`
`
`
`
`
`
`by the dashed line in FIG. 2) is operationally connected to
`
`
`
`
`
`
`
`
`
`
`
`synchronization mechanism and a messaging system. The
`
`
`
`
`
`
`
`and communicates with a plurality of event distributors 340,
`
`
`
`
`
`
`
`
`messaging system creates and maintains a set of message
`
`
`
`
`
`
`
`
`
`corresponding in number to the different kinds of events
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`objects and one or more port objects. The messaging system
`possible within the system, a plurality of event consumers,
`
`
`
`
`
`
`
`
`
`has a numberoffeatures.It allows a creator-defined value to
`
`
`
`
`
`
`
`
`
`and a plurality of event producers 300.
`
`
`
`
`
`
`
`be associated with each object. The messaging system also
`
`
`
`
`
`
`
`
`
`According to one embodiment,
`the plurality of event
`
`
`
`
`
`
`
`
`allows multiple objects to be mapped to the same port and
`
`
`
`
`
`
`
`
`
`
`
`consumers can include broadcast consumers 310 and
`
`
`
`
`
`
`
`messages to be either received fromaport or have a function
`
`
`
`
`
`
`
`
`
`
`sequential consumers 360. It is appreciated that a given
`
`
`
`
`
`
`
`
`
`be called when a message of an appropriate type is sent to
`
`
`
`
`
`
`
`
`
`
`
`
`
`system may haveeither one or more broadcast consumers or
`
`
`
`
`
`
`
`
`
`
`that port. Further, the messaging system allows the receiver
`
`
`
`
`
`
`
`
`
`one or more sequential consumers, or both.
`
`
`
`
`
`
`
`of the message to determine the object to which the message
`
`
`
`
`
`
`
`
`
`
`
`was originally sent and to derive the creator-defined value
`
`
`
`
`
`
`
`
`
`According to the present invention, events are grouped
`
`
`
`
`
`
`
`
`into “kinds”, for example, all keystrokes are one kind of
`for that object. One example of such a microkernel archi-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`event, all mouse clicks are another kind of event, all new file
`tecture is provided by NUKERNEL™,used in Apple Macin-
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`tosh™ computers. The NuKERNEL™system is described
`