పాఠం 1స్టాటిక్ కాంటెక్స్ట్ల కోసం కొట్లిషన్ వ్యూహం ఎంచుకోవడం: ఓపెన్ అడ్రెసింగ్ vs అరేలతో స్టాటిక్ సెపరేట్ చైనింగ్ఫిక్స్డ్-మెమరీ సిస్టమ్ల కోసం ఓపెన్ అడ్రెసింగ్ మరియు స్టాటిక్ సెపరేట్ చైనింగ్ను పోల్చి, క్యాష్ బిహేవియర్, ఫ్రాగ్మెంటేషన్, ఇంప్లిమెంటేషన్ కాంప్లెక్సిటీని విశ్లేషించి, ఎంబెడెడ్ సి ప్రాజెక్ట్లలో కొట్లిషన్ వ్యూహాన్ని ఎంచుకోవడానికి మార్గదర్శకాలను అందిస్తుంది.
Review of open addressing propertiesReview of static separate chainingMemory layout and cache friendlinessComplexity and implementation effortGuidelines for strategy selectionపాఠం 2మెమరీ మరియు టైమ్ కాంప్లెక్సిటీ: వర్స్ట్ మరియు ఎక్స్పెక్టెడ్ ప్రోబ్లు డాక్యుమెంట్ చేయడం, ఎంబెడెడ్ కోసం టేబుల్ లోడ్ ఫ్యాక్టర్ సిఫార్సులుస్టాటిక్ హాష్ టేబుల్ల మెమరీ మరియు టైమ్ కాంప్లెక్సిటీని విశ్లేషిస్తుంది, వర్స్ట్-కేస్ మరియు ఎక్స్పెక్టెడ్ ప్రోబ్ కౌంట్లను డాక్యుమెంట్ చేస్తుంది, లోడ్ ఫ్యాక్టర్ లిమిట్లు, మరియు ఎంబెడెడ్ సెన్సార్ అప్లికేషన్లకు అనుకూలమైన ప్రాక్టికల్ సైజింగ్ సిఫార్సులు.
Worst-case probe length analysisExpected probes under random hashingImpact of load factor on performanceMemory footprint and table sizingEmbedded-specific tuning guidelinesపాఠం 3సురక్షిత పాయింటర్ హ్యాండ్లింగ్: పాయింటర్లకు బదులు ఇండెక్స్లు ఉపయోగించడం, బౌండ్స్ చెక్స్లు, మరియు నల్ డీరెఫరెన్స్లు నిరోధించడంస్టాటిక్ హాష్ టేబుల్లలో సురక్షిత పాయింటర్ హ్యాండ్లింగ్ను రా పాయింటర్లకు బదులు ఇండెక్స్లను ఉపయోగించి, బౌండ్స్ చెక్స్లను అమలు చేసి, సి కోడ్లో నల్ డీరెఫరెన్స్లు మరియు డాంగ్లింగ్ రెఫరెన్స్లను నిరోధించే APIs డిజైన్ చేయడం కవర్ చేస్తుంది.
Indices vs pointers in static tablesImplementing robust bounds checkingAvoiding NULL and dangling referencesConverting indices to pointers safelyAPI patterns that enforce safetyపాఠం 4ఓపెన్ అడ్రెసింగ్ టెక్నిక్లు: లీనియర్ ప్రోబింగ్, క్వాడ్రాటిక్ ప్రోబింగ్, టాంబ్స్టోన్లు, మరియు డైనమిక్ మెమరీ లేకుండా డిలీషన్ సెమాంటిక్స్స్టాటిక్ టేబుల్లలో ఓపెన్ అడ్రెసింగ్ను వివరిస్తుంది, లీనియర్ మరియు క్వాడ్రాటిక్ ప్రోబింగ్, టాంబ్స్టోన్ మార్కర్లు, మరియు డైనమిక్ అలాకేషన్ నిరోధించి ప్రోబ్ చైన్లను సంరక్షించి ప్రెడిక్టబుల్ పెర్ఫార్మెన్స్ను కాపాడే డిలీషన్ రూల్స్ ఉన్నాయి.
Linear probing: algorithm and trade-offsQuadratic probing: clustering behaviorDesigning and using tombstone markersDeletion semantics and probe chain repairDetecting full table and failure modesపాఠం 5సర్క్యులర్ బఫర్తో ఇంటిగ్రేషన్: లేటెస్ట్ రీడింగ్ ఉంచడం మరియు స్థిరత్వం కోసం పాలసీలు (రైట్-ఆర్డర్, టైమ్స్టాంప్లు)స్టాటిక్ హాష్ టేబుల్ సర్క్యులర్ బఫర్తో ఎలా సహకరిస్తుందో అన్వేషిస్తుంది, లేటెస్ట్ సెన్సార్ రీడింగ్లను ఉంచడం, రైట్ ఆర్డరింగ్ నిర్వచించడం, ఫ్రెష్నెస్ కోసం టైమ్స్టాంప్లు ఉపయోగించడం, మరియు అప్డేట్లు లేదా కన్కరెంట్-లాంటి యాక్సెస్లలో స్థిరత్వాన్ని కాపాడటం.
Mapping sensor IDs to circular buffer slotsStoring only most recent reading per sensorTimestamp fields and monotonic orderingHandling overwrite and wrap-around casesConsistency rules for concurrent-style accessపాఠం 6init_table: ఎంప్టీ మార్కర్లను సెట్ చేయడం, ఫ్రీ లిస్ట్లు లేదా టాంబ్స్టోన్లను ఇనిషియలైజ్ చేయడంinit_table బాధ్యతలను వివరిస్తుంది, ఎంప్టీ మార్కర్లను సెట్ చేయడం, ఫ్రీ లిస్ట్లు లేదా టాంబ్స్టోన్లను ఇనిషియలైజ్ చేయడం, మెటాడేటాను క్లియర్ చేయడం, మరియు మొదటి ఉపయోగానికి ముందు టేబుల్ స్థిరమైన, వెరిఫైయబుల్ స్టేట్లో ప్రారంభమవ్వాలి.
Choosing and setting empty markersInitializing tombstone and state flagsBuilding initial free-list structuresZeroing or sanitizing table memoryValidation checks after initializationపాఠం 7insert_or_update_reading: ఇన్సర్ట్, అప్డేట్, ఫుల్ టేబుల్ హ్యాండ్లింగ్, మరియు రిటర్న్ కోడ్లుinsert_or_update_reading APIని వివరిస్తుంది, ఇన్సర్షన్, ఇన్-ప్లేస్ అప్డేట్, ఫుల్ టేబుల్ హ్యాండ్లింగ్, రిటర్న్ కోడ్లు, మరియు కొట్లిషన్ హ్యాండ్లింగ్ను ఇంటిగ్రేట్ చేస్తూ సి లో ఇంటర్ఫేస్ను సింపుల్ మరియు రాబస్ట్గా ఉంచడం.
Function prototype and parameter choicesInsert path for new sensor IDsUpdate path for existing sensor IDsHandling full table and error returnsDesigning clear status and error codesపాఠం 8బకెట్ అరే డిజైన్: టేబుల్ సైజు ఎంపిక, ప్రైమ్ సైజింగ్, మరియు కంపైల్-టైమ్ కాన్స్టాంట్లుబకెట్ అరేను ఎలా డిజైన్ చేయాలో వివరిస్తుంది, టేబుల్ సైజు ఎంచుకోవడం, ప్రైమ్ లేదా పవర్-ఆఫ్-టూ సైజింగ్, కంపైల్-టైమ్ కాన్స్టాంట్లు, మరియు మెమరీ ఉపయోగం, స్పీడ్, మరియు హాష్ ఫంక్షన్ సింప్లిసిటీ మధ్య ట్రేడ్-ఆఫ్లు.
Prime vs power-of-two table sizesRelating table size to key capacityUsing compile-time constants in CBalancing memory and performancePlanning for future size adjustmentsపాఠం 9అరేలతో స్టాటిక్ చైనింగ్: నోడ్ పూల్ డిజైన్, నెక్స్ట్ ఇండెక్స్లు, మరియు స్టాటిక్ మెమరీలో ఫ్రీ-లిస్ట్ మేనేజ్మెంట్అరేలతో స్టాటిక్ సెపరేట్ చైనింగ్ను కవర్ చేస్తుంది, నోడ్ పూల్ లేఅవుట్, నెక్స్ట్ ఇండెక్స్ లింక్లు, స్టాటిక్ మెమరీలో ఫ్రీ-లిస్ట్ మేనేజ్మెంట్, మరియు హీప్ అలాకేషన్ లేకుండా ఇన్సర్షన్, డిలీషన్, మరియు ట్రావర్సల్ ఇంప్లిమెంట్ చేయడం.
Designing the node pool array layoutUsing next indexes instead of pointersManaging a free-list in static memoryInsertion and deletion in static chainsDetecting pool exhaustion and errorsపాఠం 10కీ మరియు వాల్యూ రిప్రెజెంటేషన్లు: uint8_t సెన్సార్ id మరియు సెన్సార్రీడింగ్ కాపీ సెమాంటిక్స్uint8_t సెన్సార్ idలు మరియు సెన్సార్రీడింగ్ స్ట్రక్ట్లను ఉపయోగించి కీలు మరియు వాల్యూలను ఎలా రిప్రెజెంట్ చేయాలో వివరిస్తుంది, కాపీ సెమాంటిక్స్, అలైన్మెంట్, ప్యాడింగ్, మరియు స్టాటిక్ హాష్ టేబుల్లో అలైయాసింగ్ లేదా లైఫ్టైమ్ సమస్యలను నిరోధించడంపై దృష్టి పెడుతుంది.
Choosing uint8_t for sensor ID keysDesigning the SensorReading structCopy semantics vs pointer semanticsAlignment, padding, and struct layoutValidating and normalizing sensor IDsపాఠం 11చిన్న కీస్పేస్ కోసం హాష్ ఫంక్షన్ ఎంపికలు: ఐడెంటిటీ, మల్టిప్లికేటివ్, మరియు 0–255 idల కోసం మాస్కింగ్చిన్న uint8_t కీస్పేస్ల కోసం హాష్ ఫంక్షన్ ఎంపికలను చర్చిస్తుంది, ఐడెంటిటీ మ్యాపింగ్, మల్టిప్లికేటివ్ హాషింగ్, మాస్కింగ్, మరియు 0–255 సెన్సార్ idల కోసం సింప్లిసిటీ, డిస్ట్రిబ్యూషన్ క్వాలిటీ, మరియు కంప్యూటేషనల్ కాస్ట్ను బ్యాలెన్స్ చేయడం.
Identity hash for dense ID rangesMultiplicative hashing for uint8_t keysBit masking and table index derivationAvoiding systematic clustering patternsTesting distribution with sample dataపాఠం 12find_reading_by_id: ప్రోబ్ సీక్వెన్స్లు, నాట్-ఫౌండ్ vs ఫౌండ్ రెస్పాన్స్లు, మరియు సురక్షిత కాపీ-అవుట్ ప్యాటర్న్లుfind_reading_by_idపై దృష్టి పెడుతుంది, ప్రోబ్ సీక్వెన్స్లు, ఫౌండ్ vs నాట్-ఫౌండ్ను వేరు చేయడం, టేబుల్ నుండి సెన్సార్రీడింగ్ సురక్షిత కాపీ-అవుట్, మరియు సి లో అన్డిఫైన్డ్ బిహేవియర్ లేదా స్టేల్ డేటా ఎక్స్పోజర్ నిరోధించడం.
Function signature and return patternsImplementing probe sequences for lookupHandling not-found vs found resultsSafe copy-out of SensorReading valuesAvoiding stale or partially written data