Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!umich!sharkey!bnlux1.bnl.gov!kushmer From: kushmer@bnlux1.bnl.gov (christopher kushmerick) Newsgroups: comp.lang.pascal Subject: Re: Priority queue Message-ID: <1991Mar20.205125.6186@bnlux1.bnl.gov> Date: 20 Mar 91 20:51:25 GMT References: <26282@adm.brl.mil> Organization: Brookhaven National Laboratory, Upton, NY 11973 Lines: 28 In article <26282@adm.brl.mil> TAIBI91%SNYNEWVM.BITNET@uga.cc.uga.edu (S. Taibi) writes: >I don't have the code handy, but here is a suggestion: > >Make the node of the linked list like this: >NODE = RECORD > PRIORITY : INTEGER; ... > >Insert to the list by simply appending to the end of the list, and >worry about checking priority only when removing a node from the list. >This is probably the simplest way to implement a prority queue, But what heppens when an event of high priority is queued while an event of lower priority is hapening? How does this scheme allow for preemption? Dummyline Dummyline Dummyline Dummyline Dummyline Dummyline Dummyline Dummyline -- Chris Kushmerick kciremhsuK sirhC kushmer@bnlux1.bnl.gov <===Try this one first kushmerick@pofvax.sunysb.edu