DEENESPTFRRUARHIKOZHNL

AUTOSAR Classic Operating System

क्लस्टर गाइडएआई जनित

नियतात्मक रीयल-टाइम शेड्यूलिंग, मेमोरी सुरक्षा, मल्टी-कोर सिंक्रोनाइज़ेशन और त्रुटि नियंत्रण प्रदान करता है।
एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 9b7f8380b9ff उद्गम
कारणात्मक एंकर: R20-11 R20-11 से मान्य इस विनिर्देश संस्करण के लिए नए सिरे से संश्लेषित।
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

नियतात्मक रीयल-टाइम शेड्यूलिंग, मेमोरी सुरक्षा, मल्टी-कोर सिंक्रोनाइज़ेशन और त्रुटि नियंत्रण प्रदान करता है।

मॉड्यूल क्लस्टर Operating System विभाजित OS-Applications में टास्क और ISRs के लिए नियतात्मक रीयल-टाइम शेड्यूलिंग के साथ-साथ मेमोरी सुरक्षा और त्रुटि एनकैप्सुलेशन प्रदान करता है [SWS_Os_00445]। यह क्रॉस-कोर स्पिनलॉक, एसिंक्रोनस टास्क एक्टिवेशन और Inter-OS-Application Communicator (IOC) [SWS_Os_00686], [SWS_Os_00824] के माध्यम से मल्टी-कोर सिस्टम का समर्थन करता है। सुरक्षा उल्लंघनों की स्थिति में, OS कॉन्फ़िगर करने योग्य हुक के माध्यम से रनटाइम पर व्यक्तिगत विभाजनों को लक्षित रूप से समाप्त करने या नियंत्रित पुनः आरंभ करने में सक्षम बनाता है ApplicationLevelErrorHandling पृ. 53।

मॉड्यूल क्लस्टर “Operating System” AUTOSAR Classic में सॉफ़्टवेयर घटकों और बुनियादी सॉफ़्टवेयर मॉड्यूल के लिए मूलभूत निष्पादन और सुरक्षा अवसंरचना प्रदान करता है। ऑपरेटिंग सिस्टम टास्क, ISRs, अलार्म और काउंटर जैसे संसाधनों को OS-Applications [SWS_Os_00445] में एनकैप्सुलेट करता है और MPU मेमोरी सुरक्षा के आधार पर सख्त त्रुटि नियंत्रण सुनिश्चित करने के लिए विश्वसनीय (trusted) और गैर-विश्वसनीय विभाजनों के बीच अंतर करता है [SWS_Os_00446], SafetyConceptStatusReport पृ. 49। मल्टी-कोर सिस्टम में, OS मानकीकृत कोर-IDs [SWS_Os_00790] के माध्यम से लॉजिकल कोर का प्रबंधन करता है और कोर और विभाजनों के बीच डेटा और घटना-आधारित विनिमय के लिए Inter-OS-Application Communicator (IOC) प्रदान करता है [SWS_Os_00824]।

os_architecture cluster_os Operating System (OS) RTE Runtime Environment (RTE) OS_KERNEL OS Core / Scheduler (Tasks, ISRs, Events) RTE->OS_KERNEL ActivateTask(), SetEvent(), CallTrustedFunction() IOC Inter-OS-Application Communicator (IOC) RTE->IOC IocSend(), IocWrite(), IocReceive(), IocRead() ECUM ECU State Manager (EcuM) ECUM->OS_KERNEL StartCore(), StartOS(), ShutdownAllCores() STBM Synchronized Time-Base Manager (StbM) ST_MGM Schedule Table & Counter Management STBM->ST_MGM SyncScheduleTable(), GetScheduleTableStatus() PROT Protection & Memory Access Control OS_KERNEL->PROT Fault containment HW Microcontroller / MPU / Core HW OS_KERNEL->HW Spinlocks, Timer, IRQ Ctrl PROT->HW MPU-Konfiguration, Privilege Level

संदर्भ आरेख: AUTOSAR बेसिक सॉफ़्टवेयर आर्किटेक्चर में OS-क्लस्टर का एम्बेडिंग और EcuM, StbM, RTE तथा हार्डवेयर के लिए इंटरफेस। स्रोत: [SWS_Os_00445], [SWS_Os_00790], SWS_BSWGeneral पृ. 48।

घटना-संचालित टास्क शेड्यूलिंग के अलावा, OS Schedule Tables [SWS_Os_00783] के माध्यम से समय-नियंत्रित निष्पादन ट्रैकिंग सक्षम बनाता है। इन्हें Synchronized Time-Base Manager (StbM) के माध्यम से SyncScheduleTable का उपयोग करके वैश्विक वाहन समय आधारों के साथ अनुकूलित किया जा सकता है [SWS_Os_00199], SWS_SynchronizedTimeBaseManager पृ. 220। कोर सीमाओं के पार सिंक्रोनाइज़ेशन के लिए, मॉड्यूल एकीकृत डेडलॉक पहचान के साथ हार्डवेयर-स्तरीय स्पिनलॉक प्रदान करता है [SWS_Os_00686], जबकि क्रॉस-कोर टास्क एक्टिवेशन को एसिंक्रोनस रूप से ActivateTaskAsyn के साथ निष्पादित किया जा सकता है [SWS_Os_91022]।

त्रुटि की स्थिति में (उदाहरण के लिए मेमोरी ओवररन के मामले में), OS ProtectionHook को सक्रिय करता है [SWS_Os_00538]। इसके रिटर्न मान के माध्यम से, एक दोषपूर्ण OS-Application को अलग किया जा सकता है और नियंत्रित रूप से समाप्त किया जा सकता है या संपूर्ण सिस्टम को रीसेट किए बिना एक समर्पित पुनरारंभ टास्क के माध्यम से पुन: प्रारंभ किया जा सकता है [SWS_Os_00787], ApplicationLevelErrorHandling पृ. 53।

app_lifecycle init ACCESSIBLE APPLICATION_ACCESSIBLE (Normalbetrieb, Tasks/ISRs aktiv) init->ACCESSIBLE StartOS() RESTARTING APPLICATION_RESTARTING (क्वारंटीन, केवल OsRestartTask सक्रिय) ACCESSIBLE->RESTARTING ProtectionHook() -> PRO_TERMINATEAPPL_RESTART या TerminateApplication(RESTART) TERMINATED APPLICATION_TERMINATED (Endzustand, Partition deaktiviert) ACCESSIBLE->TERMINATED ProtectionHook() -> PRO_TERMINATEAPPL या TerminateApplication(NO_RESTART) RESTARTING->ACCESSIBLE OsRestartTask beendet Bereinigung & schaltet Partition frei RESTARTING->TERMINATED पुनरारंभ के दौरान त्रुटि या एस्केलेशन

स्थिति आरेख: त्रुटि की स्थिति में AUTOSAR OS-Application का जीवन चक्र और विभाजन स्थितियाँ। स्रोत: [SWS_Os_00773], [SWS_Os_00258], ApplicationLevelErrorHandling पृ. 53।

1. सिस्टम आर्किटेक्चर और मॉड्यूल क्लस्टर की भूमिका

मॉड्यूल क्लस्टर “Operating System” AUTOSAR लेयर्ड मॉडल में सभी रीयल-टाइम सॉफ़्टवेयर घटकों और बेसिक सॉफ़्टवेयर मॉड्यूल के निष्पादन और समन्वय के लिए System Services की मौलिक नींव बनाता है। कोर मॉड्यूल [SWS_Os_00445] कॉन्फ़िगर करने योग्य निष्पादन इकाइयों, तथाकथित OS-Applications में टास्क, इंटरप्ट सर्विस रूटीन (ISRs), अलार्म, काउंटर और शेड्यूलिंग तालिकाओं (Schedule Tables) को एनकैप्सुलेट करता है। इसमें, ऑपरेटिंग सिस्टम आवश्यक स्केलेबिलिटी वर्गों के अनुसार कार्यात्मक सुरक्षा और मेमोरी सुरक्षा प्रदान करने के लिए विश्वसनीय (trusted) और गैर-विश्वसनीय (non-trusted) OS-Applications [SWS_Os_00446] के बीच कड़ाई से अंतर करता है SafetyConceptStatusReport पृ. 49।

मल्टी-कोर आर्किटेक्चर में, OS लॉजिकल कोर का प्रबंधन करता है जिन्हें CoreIdType प्रकार के अद्वितीय पहचानकर्ताओं के माध्यम से संदर्भित किया जाता है [SWS_Os_00790]। कोर-IDs शून्य-आधारित और क्रमिक रूप से व्यवस्थित हैं [SWS_Os_00825], जहाँ स्थिरांक OS_CORE_ID_MASTER मास्टर कोर की पहचान करता है SWS_OS पृ. 111। एकीकृत Inter-OS-Application Communicator (IOC) के माध्यम से, ऑपरेटिंग सिस्टम सुरक्षित, क्रॉस-पार्टीशन और क्रॉस-कोर डेटा ट्रांसमिशन के लिए तंत्र प्रदान करता है [SWS_Os_00824]। OSEK OS के अनुसार इंटरफेस के मानकीकरण और उनके AUTOSAR-विशिष्ट विस्तारों के माध्यम से, OS उच्च-स्तरीय मॉड्यूल जैसे कि ECU State Manager (EcuM), Synchronized Time-Base Manager (StbM) और रनटाइम परिवेश RTE के लिए नियतात्मक रीयल-टाइम व्यवहार की गारंटी देता है SWS_BSWGeneral पृ. 48।

os_architecture cluster_os Operating System (OS) RTE Runtime Environment (RTE) OS_KERNEL OS Core / Scheduler (Tasks, ISRs, Events) RTE->OS_KERNEL ActivateTask(), SetEvent(), CallTrustedFunction() IOC Inter-OS-Application Communicator (IOC) RTE->IOC IocSend(), IocWrite(), IocReceive(), IocRead() ECUM ECU State Manager (EcuM) ECUM->OS_KERNEL StartCore(), StartOS(), ShutdownAllCores() STBM Synchronized Time-Base Manager (StbM) ST_MGM Schedule Table & Counter Management STBM->ST_MGM SyncScheduleTable(), GetScheduleTableStatus() PROT Protection & Memory Access Control OS_KERNEL->PROT Fault containment HW Microcontroller / MPU / Core HW OS_KERNEL->HW Spinlocks, Timer, IRQ Ctrl PROT->HW MPU-Konfiguration, Privilege Level

संदर्भ आरेख: AUTOSAR बेसिक सॉफ़्टवेयर आर्किटेक्चर में OS-क्लस्टर का एम्बेडिंग और EcuM, StbM, RTE तथा हार्डवेयर के लिए इंटरफेस। स्रोत: [SWS_Os_00445], [SWS_Os_00790], SWS_BSWGeneral पृ. 48।

2. मॉड्यूल के बीच परस्पर क्रिया और इंटरैक्शन पथ

OS ऑब्जेक्ट्स और AUTOSAR आर्किटेक्चर की लेयर्स के बीच इंटरैक्शन स्पष्ट रूप से परिभाषित कंट्रोल और डेटा पाथ्स के माध्यम से होता है। क्रॉस-पार्टीशन डेटा एक्सचेंज के लिए, IOC unqueued (“data”, IocWrite / IocRead) या queued सेमेंटिक्स (“event”, IocSend / IocReceive) के साथ टाइप्ड कम्युनिकेशन फ़ंक्शंस जनरेट करता है [SWS_Os_00718], [SWS_Os_00738]। ग्रुप ट्रांसमिशन के लिए सर्विसेज IocSendGroup या IocReceiveGroup उपयोग में आती हैं [SWS_Os_00728], [SWS_Os_00746]। यदि रिसीवर का एक इंटरनल बफ़र भर जाता है, तो IOC सेंडर को IOC_E_LIMIT स्टेटस के साथ इसका संकेत देता है और आगामी रीड ऑपरेशन्स के लिए एक IOC_E_LOST_DATA दर्ज करता है SWS_OS पृ. 225।

जब किसी नॉन-ट्रस्टेड OS-Application को किसी ट्रस्टेड पार्टीशन की प्रिविलेज्ड सर्विसेज तक पहुँचने की आवश्यकता होती है, तो नियंत्रित कॉन्टेक्स्ट स्विच सिस्टम सर्विस CallTrustedFunction के माध्यम से होता है [SWS_Os_00097]। इसमें पैरामीटर्स TrustedFunctionParameterRefType प्रकार के पॉइंटर स्ट्रक्चर के माध्यम से पास किए जाते हैं [SWS_Os_00776]। ऑपरेटिंग सिस्टम MPU अनुमतियों को अस्थायी रूप से टारगेट एप्लिकेशन की अनुमतियों में बदल देता है SWS_OS पृ. 172। फ़ंक्शन GetCurrentApplicationID इस निष्पादन के दौरान कॉल की गई Trusted Application का आइडेंटिफ़ायर लौटाता है, जबकि GetApplicationID मूल कॉलर एप्लिकेशन प्रदान करता है [SWS_Os_00797]।

बाहरी टाइम बेसों के साथ टेम्पोरल अलाइनमेंट के लिए, StbM मॉड्यूल OS इंटरफ़ेस के माध्यम से स्पष्ट रूप से कॉन्फ़िगर किए गए Schedule Tables को सिंक्रोनाइज़ करता है। StbM पहले GetScheduleTableStatus के माध्यम से चक्रीय रूप से सिंक्रोनाइज़ेशन स्थिति की जांच करता है [SWS_Os_00227] और फिर SyncScheduleTable के माध्यम से वर्तमान सिंक्रोनाइज़ेशन मान को OS को सौंपता है [SWS_Os_00199]। ऑपरेटिंग सिस्टम इसके बाद एक्सपायरी पॉइंट्स (Expiry Points) से विचलन की गणना करता है और देरी के समय को क्रमिक रूप से समायोजित करता है, जब तक कि तालिका ग्लोबल टाइम बेस के साथ सिंक्रोनस रूप से नहीं चलने लगती SWS_OS पृ. 57, SWS_SynchronizedTimeBaseManager पृ. 220।

OS शेड्यूल तालिका का स्पष्ट सिंक्रोनाइज़ेशनStbMOsGetScheduleTableStatus(ScheduleTableID, &ScheduleStatus)E_OK (Status: SCHEDULETABLE_RUNNING / WAITING)altStatus == WAITING | RUNNING | RUNNING_AND_SYNCHRONOUSSyncScheduleTable(ScheduleTableID, GlobalTimeTick)स्थानीय तालिका और समय आधार के बीच ड्रिफ्ट की गणना करेंएक्स्पायरी बिंदुओं पर विलंब समायोजन लागू करेंE_OKAbweichung <= OsScheduleTblExplicitPrecisionSetze Zustand: SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS

अनुक्रम आरेख: Synchronized Time-Base Manager (StbM) द्वारा OS-Schedule-Table का स्पष्ट सिंक्रोनाइज़ेशन। स्रोत: [SWS_Os_00199], [SWS_Os_00227], SWS_SynchronizedTimeBaseManager पृ. 220।

3. सिंक्रोनाइज़ेशन, रीएंट्रेंसी और टास्क संदर्भ

रनटाइम मॉडल टास्क स्तर, श्रेणी 1 इंटरप्ट स्तर (Cat 1 ISR) और श्रेणी 2 (Cat 2 ISR) के साथ-साथ हुक रूटीन के बीच स्पष्ट अंतर करता है। जबकि Cat 1 ISRs बिना ऑपरेटिंग सिस्टम ओवरहेड के निष्पादित होते हैं और उन्हें किसी भी OS सर्विस को कॉल करने की अनुमति नहीं होती है, Cat 2 ISRs पूरी तरह से OS द्वारा प्रबंधित किए जाते हैं [SWS_Os_00782]। सक्रिय ISR आइडेंटिफ़ायर को GetISRID का उपयोग करके निर्धारित किया जा सकता है; Cat 2 ISR के बाहर कॉल किए जाने पर, सर्विस INVALID_ISR लौटाती है [SWS_Os_00511]। व्यक्तिगत इंटरप्ट स्रोतों को इंटरप्ट कंट्रोलर स्तर पर EnableInterruptSource, DisableInterruptSource और ClearPendingInterrupt के माध्यम से लक्षित रूप से नियंत्रित किया जा सकता है [SWS_Os_91020], [SWS_Os_91019], [SWS_Os_91021]।

प्रोसेसर कोर सीमाओं के पार क्रिटिकल सेक्शन्स के सिंक्रोनाइज़ेशन के लिए, OS स्पिनलॉक प्रदान करता है [SWS_Os_00791]। एक स्पिनलॉक को GetSpinlock के साथ सिंक्रोनस रूप से ब्लॉक करते हुए अधिग्रहित किया जाता है [SWS_Os_00686] या TryToGetSpinlock के माध्यम से नॉन-ब्लॉकिंग रूप से जाँचा जाता है [SWS_Os_00703]। रिलीज ReleaseSpinlock के माध्यम से होता है [SWS_Os_00695]। डेडलॉक को रोकने के लिए, OS विस्तारित स्थिति में नेस्टिंग और ओवरलैपिंग त्रुटियों (E_OS_INTERFERENCE_DEADLOCK, E_OS_NESTING_DEADLOCK) की जांच करता है SWS_OS पृ. 199।

क्रॉस-कोर टास्क एक्टिवेशन और इवेंट सेटिंग के लिए, OS एसिंक्रोनस API वेरिएंट प्रदान करता है: ActivateTaskAsyn और SetEventAsyn टारगेट कोर पर निष्पादन की प्रतीक्षा किए बिना कॉलर को तुरंत लौटते हैं [SWS_Os_91022], [SWS_Os_91023]। संभावित त्रुटियां कॉलर को वापस नहीं की जाती हैं, बल्कि कॉन्फ़िगर किए गए एरर हुक्स के माध्यम से लॉग की जाती हैं [SWS_Os_00816], SWS_OS पृ. 203।

4. विशिष्ट जीवनचक्र और परिचालन मोड

सिस्टम स्टार्टअप मुख्य रूप से ECU State Manager (EcuM) द्वारा समन्वित किया जाता है। मास्टर कोर पर, EcuM ऑपरेटिंग सिस्टम शुरू होने से पहले OS सर्विस StartCore के माध्यम से सबऑर्डिनेट कोरों को शुरू करता है [SWS_Os_00676], SWS_ECUStateManager पृ. 82। इसके बाद प्रत्येक शुरू किया गया कोर स्वतंत्र रूप से StartOS को कॉल करता है। StartOS को कॉल करने के बाद, स्टार्टअप हुक्स निष्पादित होने से पहले ऑपरेटिंग सिस्टम सभी कॉन्फ़िगर किए गए OS-Applications को APPLICATION_ACCESSIBLE स्थिति में बदल देता है SWS_OS पृ. 62। सफलतापूर्वक शुरू किए गए कोरों की संख्या को रनटाइम पर GetNumberOfActivatedCores के साथ प्राप्त किया जा सकता है SWS_OS पृ. 196।

Schedule Tables एक स्पष्ट रूप से परिभाषित स्टेट मशीन के अधीन हैं। उन्हें StartScheduleTableAbs [SWS_Os_00358] के माध्यम से एब्सोल्यूट रूप से, StartScheduleTableRel [SWS_Os_00347] के माध्यम से रिलेटिव रूप से या StartScheduleTableSynchron के माध्यम से सिंक्रोनस रूप से शुरू किया जा सकता है [SWS_Os_00201]। तालिकाओं को श्रृंखलाबद्ध किया जा सकता है (NextScheduleTable, स्थिति SCHEDULETABLE_NEXT) [SWS_Os_00191] या StopScheduleTable के साथ तुरंत निष्क्रिय स्थिति SCHEDULETABLE_STOPPED में स्थानांतरित किया जा सकता है [SWS_Os_00006]। एक चालू स्पष्ट सिंक्रोनाइज़ेशन को SetScheduleTableAsync के माध्यम से निरस्त किया जा सकता है, जिससे Expiry Points का निष्पादन जारी रहता है [SWS_Os_00422]।

आइडल मोड में ऊर्जा बचत मोड के लिए, OS इंटरफ़ेस ControlIdle प्रदान करता है, जिससे EcuM व्यक्तिगत कोरों की स्लीप स्थिति को कॉन्फ़िगर कर सकता है [SWS_Os_00769]। शटडाउन के दौरान, EcuM सभी लेयर्स के डी-इनिशियलाइज़ेशन का समन्वय करता है और अंत में संपूर्ण सिस्टम को नियंत्रित तरीके से रोकने के लिए ShutdownAllCores या ShutdownOS को कॉल करता है SWS_ECUStateManager पृ. 90।

5. त्रुटि हैंडलिंग, DET ट्रेसिंग और डिग्रेडेशन

सुरक्षा उल्लंघन (जैसे मेमोरी ओवरफ्लो या टाइमिंग उल्लंघन) ग्लोबल ProtectionHook के सक्रियण की ओर ले जाते हैं [SWS_Os_00538]। त्रुटि के आधार पर, हुक ProtectionReturnType प्रकार के रिटर्न मान के माध्यम से रिकवरी रणनीति का निर्णय करता है [SWS_Os_00787]: ट्रिगरिंग एंटिटी को समाप्त करना (PRO_TERMINATETASKISR), प्रभावित पार्टीशन को पूरी तरह से समाप्त करना (PRO_TERMINATEAPPL), एक नियंत्रित पार्टीशन पुनरारंभ शुरू करना (PRO_TERMINATEAPPL_RESTART) या ECU को शट डाउन करना (PRO_SHUTDOWN) ApplicationLevelErrorHandling पृ. 60।

यदि कोई OS-Application समाप्त या पुनरारंभ की जाती है, तो OS इसे APPLICATION_ACCESSIBLE स्थिति से APPLICATION_RESTARTING या APPLICATION_TERMINATED में स्थानांतरित करता है [SWS_Os_00773]। पार्टीशन के सभी सक्रिय टास्क्स, ISRs, अलार्म्स और Schedule Tables को तुरंत रोक दिया जाता है और सभी इंटरप्ट्स को निष्क्रिय कर दिया जाता है [SWS_Os_00447]। सामान्य ऑपरेशन को फिर से अनुमति देने से पहले, क्लीनअप करने के लिए APPLICATION_RESTARTING स्थिति में विशेष रूप से OsRestartTask निष्पादित किया जाता है ApplicationLevelErrorHandling पृ. 53, ApplicationLevelErrorHandling पृ. 76।

app_lifecycle init ACCESSIBLE APPLICATION_ACCESSIBLE (Normalbetrieb, Tasks/ISRs aktiv) init->ACCESSIBLE StartOS() RESTARTING APPLICATION_RESTARTING (क्वारंटीन, केवल OsRestartTask सक्रिय) ACCESSIBLE->RESTARTING ProtectionHook() -> PRO_TERMINATEAPPL_RESTART या TerminateApplication(RESTART) TERMINATED APPLICATION_TERMINATED (Endzustand, Partition deaktiviert) ACCESSIBLE->TERMINATED ProtectionHook() -> PRO_TERMINATEAPPL या TerminateApplication(NO_RESTART) RESTARTING->ACCESSIBLE OsRestartTask beendet Bereinigung & schaltet Partition frei RESTARTING->TERMINATED पुनरारंभ के दौरान त्रुटि या एस्केलेशन

स्थिति आरेख: त्रुटि की स्थिति में AUTOSAR OS-Application का जीवन चक्र और विभाजन स्थितियाँ। स्रोत: [SWS_Os_00773], [SWS_Os_00258], ApplicationLevelErrorHandling पृ. 53।

निवारक त्रुटि रोकथाम के लिए, ऑपरेटिंग सिस्टम मेमोरी सुरक्षा जाँच फ़ंक्शंस जैसे CheckTaskMemoryAccess और CheckISRMemoryAccess [SWS_Os_00512], [SWS_Os_00513] के साथ-साथ CheckObjectAccess और CheckObjectOwnership के माध्यम से एक्सेस अनुमति जाँच प्रदान करता है [SWS_Os_00256], [SWS_Os_00017]। इन मानकीकृत जांचों के माध्यम से यह सुनिश्चित किया जा सकता है कि गैर-भरोसेमंद घटक मेमोरी में कोई अनधिकृत राइट या निष्पादन एक्सेस न करें SWS_OS पृ. 73।

इस गाइड का संदर्भ: रिलीज़ R20-11 के लिए AUTOSAR Classic विनिर्देशों के आधार पर निर्मित। सभी इंटरफेस और स्टेट ट्रांज़िशन संदर्भित SWS आवश्यकताओं द्वारा कड़ाई से सिद्ध हैं।

Das AUTOSAR Operating System ist ein statisch konfiguriertes, echtzeitfähiges preemptives Betriebssystem nach OSEK/VDX mit Tasks, Events, Alarmen, Schedule-Tables und Speicherschutz.

Module im Cluster

AUTOSAR OS

Real-time operating system managing priority-based preemptive task scheduling, events, alarms, and schedule tables (OSEK/VDX derivative).

BSW ID 1 79 APIs (48 Funktionen, 31 Typen) #include "Os.h"

Os

<ReceiverPullCB> फ़ंक्शन

This callback function can be configured for the receiver of a communication. If configured, IOC calls this callback on the receiving core for each data reception. is the callback function name configured by the receiver in the Os Ioc Re ceiver Pull CB attribute to be called on data reception."

void <ReceiverPullCB> (void);
AccessTypeCheckObjectAccess फ़ंक्शन

This service determines if the OS - Applications, given by Appl ID, is allowed to use the IDs of a Task, Resource, Counter, Alarm or Schedule Table in API calls.

ObjectAccessType CheckObjectAccess (ApplicationType ApplID, ObjectTypeType ObjectType, void ...);
ActivateTaskAsyn फ़ंक्शन

Asynchronous version of the Activate Task() function. Intended to be used for cross core task activation. Possible errors are not returned to the caller, but may be reported via error hooks.

void ActivateTaskAsyn (TaskType id);
AllowAccess फ़ंक्शन

This service sets the own state of an OS - Application from AP PLICATION_ RESTARTING to APPLICATION_ ACCESSIBLE.

StatusType AllowAccess (void);
CallTrustedFunction फ़ंक्शन

A (trusted or non - trusted) OS - Application uses this service to call a trusted function

StatusType CallTrustedFunction (TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams);
CheckISRMemoryAccess फ़ंक्शन

This service checks if a memory region is write/ read/ execute accessible and also returns information if the memory region is part of the stack space.

AccessType CheckISRMemoryAccess (ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size);
CheckObjectOwnership फ़ंक्शन

This service determines to which OS - Application a given Task, ISR, Counter, Alarm or Schedule Table belongs

ApplicationType CheckObjectOwnership (ObjectTypeType ObjectType, void ...);
CheckTaskMemoryAccess फ़ंक्शन

This service checks if a memory region is write/ read/ execu te accessible and also returns information if the memory region is part of the stack space.

AccessType CheckTaskMemoryAccess (TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size);
ClearPendingInterrupt फ़ंक्शन

Service ClearPendingInterrupt.

StatusType ClearPendingInterrupt (ISRType ISRID);
ControlIdle फ़ंक्शन

This API allows the caller to select the idle mode action which is performed during idle time of t he OS (e.g. if no Task/ ISR is active). It can be used to implement energy savings. The real idle modes are hardware dependent and not standardized. The default idle mode on each core is IDLE_ NO_ HALT.

StatusType ControlIdle (CoreIdType CoreID, IdleModeType IdleMode);
DisableInterruptSource फ़ंक्शन

Disables the interrupt source by modifying the interrupt controller registers.

StatusType DisableInterruptSource (ISRType ISRID);
EnableInterruptSource फ़ंक्शन

Service EnableInterruptSource.

StatusType EnableInterruptSource (ISRType ISRID, boolean ClearPending);
GetApplicationID फ़ंक्शन

This service determines the OS - Application (a unique identifier has to be allocated to each application) where the caller originally belongs to (was configured t o).

ApplicationType GetApplicationID (void);
GetApplicationState फ़ंक्शन

This service returns the current state of an OS - Application.

StatusType GetApplicationState (ApplicationType Application, ApplicationStateRefType Value);
GetCoreID फ़ंक्शन

The function returns a unique core identifier.

CoreIdType GetCoreID (void);
GetCounterValue फ़ंक्शन

This service reads the current count value of a counte r (returning either the hardware timer ticks if counter is driven by hardware or the software ticks when user drives counter).

StatusType GetCounterValue (CounterType CounterID, TickRefType Value);
GetCurrentApplicationID फ़ंक्शन

This service determines the OS - Application where the caller of the service is currently executing. Note that if the caller is not within a Call Trusted Function() call the value is eq ual to the result of Get Application ID().

ApplicationType GetCurrentApplicationID (void);
GetElapsedValue फ़ंक्शन

This service gets the number of ticks between the current tick value and a previously read tick value.

StatusType GetElapsedValue (CounterType CounterID, TickRefType Value, TickRefType ElapsedValue);
GetISRID फ़ंक्शन

This service returns the identifier of the currently executing ISR.

ISRType GetISRID (void);
GetNumberOfActivatedCores फ़ंक्शन

The function returns the number of cores activated by the Start Core function. This function might be a macro. AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

uint32 GetNumberOfActivatedCores (void);
GetScheduleTableStatus फ़ंक्शन

This service queries the state of a schedule table (also with respect to synchronization).

StatusType GetScheduleTableStatus (ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus);
GetSpinlock फ़ंक्शन

Get Spinlock tries to occupy a spin - lock variable. If the function returns, either the lock is successfully taken or an error has occurred. The spinlock mechanism is an active polling mechanism. The function does not cause a de - scheduling.

StatusType GetSpinlock (SpinlockIdType SpinlockId);
IncrementCounter फ़ंक्शन

This service increments a software counter.

StatusType IncrementCounter (CounterType CounterID);
IocInit फ़ंक्शन

This service initializes the data structures of the IOC. Tags: atp.Status=draft

void IocInit (void);
ModifyPeripheral16 फ़ंक्शन

This service modifies a given memory location () with the formula: * = ((* & ) | )

StatusType ModifyPeripheral16 (AreaIdType Area, uint16* Address, uint16 Clearmask, uint16 Setmask);
ModifyPeripheral32 फ़ंक्शन

This service modifies a given memory location () with the formula: * = ((* & ) | )

StatusType ModifyPeripheral32 (AreaIdType Area, uint32* Address, uint32 Clearmask, uint32 Setmask);
ModifyPeripheral8 फ़ंक्शन

This service modifies a given memory location () with the formula: * = ((* & ) | )

StatusType ModifyPeripheral8 (AreaIdType Area, uint8* Address, uint8 Clearmask, uint8 Setmask);
NextScheduleTable फ़ंक्शन

This service switches the processing from one schedule table to another schedule table.

StatusType NextScheduleTable (ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To);
ProtectionHook फ़ंक्शन

The protection hook is always called if a serious error occurs. E.g. exceeding the worst case execution time or violating against the memory protection.

ProtectionReturnType ProtectionHook (StatusType Fatalerror);
ReadPeripheral16 फ़ंक्शन

This service returns the content of a given memory location (

StatusType ReadPeripheral16 (AreaIdType Area, const uint16* Address, uint16* ReadValue);
ReadPeripheral32 फ़ंक्शन

This service returns the content of a given memory location (

StatusType ReadPeripheral32 (AreaIdType Area, const uint32* Address, uint32* ReadValue);
ReadPeripheral8 फ़ंक्शन

This service returns the content of a given memory location (

StatusType ReadPeripheral8 (AreaIdType Area, const uint8* Address, uint8* ReadValue);
ReleaseSpinlock फ़ंक्शन

Release Spinlock releases a spinlock variable that was occupied before. Before terminating a TASK all spinlock variables that have been occupied with Get Spinlock() shall be released. Before calling Wait EVENT all Spinlocks shall be released.

StatusType ReleaseSpinlock (SpinlockIdType SpinlockId);
SetEventAsyn फ़ंक्शन

Asynchronous version of the Set Event() function. Intended to be used for cross core event setting. Possible errors are not returned to the caller, but may be reported via error hooks.

void SetEventAsyn (TaskType id, EventMaskType m);
SetScheduletableAsync फ़ंक्शन

This service stops synchronization of a schedule table.

StatusType SetScheduletableAsync (ScheduleTableType ScheduleTableID);
ShutdownAllCores फ़ंक्शन

After this service the OS on all AUTOSAR cores is shut down. Allowed at TASK level and ISR level and also internally by the OS. The function will never return. The function will force other cores into a shutdown.

void ShutdownAllCores (StatusType Error);
StartCore फ़ंक्शन

It is not supported to call this function after Start OS(). The function starts the core specified by the parameter Core ID. The OUT parameter allows the caller to check whether the operation was successful or no t. If a core is started by means of this function Start OS shall be called on the core.

void StartCore (CoreIdType CoreID, StatusType* Status);
StartNonAutosarCore फ़ंक्शन

The function start s the core specified by the parameter Core ID. It is allowed to call this function after Start OS(). The OUT parameter allows the caller to check whether the operation was successful or not. It is not allowed to call Start OS on cores activated by Start No n Autosar Core. Otherwise the behaviour is unspecified.

void StartNonAutosarCore (CoreIdType CoreID, StatusType* Status);
StartScheduleTableAbs फ़ंक्शन

This service starts the processing o f a schedule table at an absolute value "Start" on the underlying counter.

StatusType StartScheduleTableAbs (ScheduleTableType ScheduleTableID, TickType Start);
StartScheduleTableRel फ़ंक्शन

This service starts the processing of a schedule table at "Offset" relative to the "Now" value on the underlying counter.

StatusType StartScheduleTableRel (ScheduleTableType ScheduleTableID, TickType Offset);
StartScheduleTableSynchron फ़ंक्शन

This service starts an explicitly synchronized schedule table synchronously.

StatusType StartScheduleTableSynchron (ScheduleTableType ScheduleTableID);
StopScheduleTable फ़ंक्शन

This service cancels the processing of a schedule table immediately at any point while the schedule table is running.

StatusType StopScheduleTable (ScheduleTableType ScheduleTableID);
SyncScheduleTable फ़ंक्शन

Service SyncScheduleTable.

StatusType SyncScheduleTable (ScheduleTableType ScheduleTableID, TickType Value);
TerminateApplication फ़ंक्शन

Service TerminateApplication.

StatusType TerminateApplication (ApplicationType Application, RestartType RestartOption);
TryToGetSpinlock फ़ंक्शन

Try To Get Spinlock has the same functionality as Get Spinlock with the difference that if the spinlock is already occupied by a TASK on a d ifferent core the function sets the OUT parameter "Success" and returns with E_ OK.

StatusType TryToGetSpinlock (SpinlockIdType SpinlockId, TryToGetSpinlockType* Success);
WritePeripheral16 फ़ंक्शन

This service writes the to a given memory location (). Available vi a Os.h

StatusType WritePeripheral16 (AreaIdType Area, uint16* Address, uint16 WriteValue);
WritePeripheral32 फ़ंक्शन

This service writes the to a given memory location ().

StatusType WritePeripheral32 (AreaIdType Area, uint32* Address, uint32 WriteValue);
WritePeripheral8 फ़ंक्शन

This service writes the to a given memory location (). Available vi a Os.h

StatusType WritePeripheral8 (AreaIdType Area, uint8* Address, uint8 WriteValue);
AccessType टाइप

This type holds information how a specific memory region can be accessed.

AlarmType टाइप

This data type represents an AUTOSAR OS alarm identifier.

typedef uint8 AlarmType;

This data type points to location where a Application State Type can be stored.

This data type identifies the state of an OS - Application. AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

ApplicationType टाइप

This data type identifies the OS - Application.

AppModeType टाइप

App Mode of the core shall be inherited from another core.

AreaIdType टाइप

Area Id Type identifies a peripheral area and is used by the API functions: Read Peripheral X, Write Peripheral X and Modify Peripheral X AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

CoreIdType टाइप

Core Id Type is a scalar that allows identifying a single core. The Core Id Type shall represent t he logical Core ID

CounterType टाइप

This data type identifies a counter.

EventMaskType टाइप

This data type represents an event mask for extended tasks.

IdleModeType टाइप

This data type identifies the idle mode behavior.

ISRType टाइप

This data type identifies an interrupt service routine (ISR).

MemorySizeType टाइप

This data type holds the size (in bytes) of a memory region.

This data type is a pointer which is able to point to any location in the MCU address space.

ObjectAccessType टाइप

This data type identifies if an OS - Application has access to an object.

ObjectType टाइप

This data type identifies an object.

PhysicalTimeType टाइप

This data type is used for values returned by the conversion macro (see SWS_ Os_00393) OS_ TICKS2_(). AUTOSAR CP R20 - o f Document ID : AUTOSAR_SWS_OS

This data type identifies a value which controls further actions of the OS on return from the protection hook.

RestartType टाइप

This data type defines the use of a Restart Task after terminating an OS - Application.

This data type points to a variable of the data type Schedule Table Status Type.

This type describes the status of a schedule. The status can be one of the following: o The schedule table is not started (SCHEDULETABLE_ STOPPED) o The schedule table will be started after the end of currently running schedule table (sched ule table was used in Next Schedule Table() service) (SCHEDULETABLE_ NEXT) o The schedule table uses explicit synchronization, has been started and is waiting for the global time. (SCHEDULETABLE_ WAITING) o The schedule table is running, but is currently n ot synchronous to a global time source (SCHEDULETABLE_ RUNNING) o The schedule table is running and is synchronous to a global time source (SCHEDULETABLE_ RUNNING_ AND_ SYNCHRONOUS)

ScheduleTableType टाइप

This data type identifies a schedule table.

SpinlockIdType टाइप

Spinlock Id Type identifies a spinlock instance and is used by the API functions: Get Spinlock, Release Spinlock and Try To Get Spinlock.

StatusType टाइप

This data type represents standard OSEK OS status codes (e.g. E_OK, E_OS_ACCESS).

typedef uint8 StatusType;
TaskType टाइप

This data type identifies an AUTOSAR OS task.

typedef uint8 TaskType;
TickType टाइप

This data type represents count values in ticks.

typedef uint32 TickType;
TotalNumberOfCores टाइप

The total number of cores

This data type identifies a trusted function.

This data type points to a structure which holds the arguments for a call to a trusted function.

The Try To Get Spinlock Type indicates if the spinlock has been occupied or not.