1 / 14

2007.4.9

PaRTiKle. 2007.4.9. Bai Shuwei baishw06@lzu.cn http://dslab.lzu.edu.cn/memebers/baishw. Contents. What is PaRTiKle Memory Management Interrupt Management Thread Management Device Management. What is PaRTiKle. PaRTiKle – Particular Real-Time Kernel RT-kernel and library

ghita
Download Presentation

2007.4.9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PaRTiKle 2007.4.9 Bai Shuwei baishw06@lzu.cn http://dslab.lzu.edu.cn/memebers/baishw

  2. Contents What is PaRTiKle Memory Management Interrupt Management Thread Management Device Management

  3. What is PaRTiKle PaRTiKle – Particular Real-Time Kernel RT-kernel and library C full support C++, Ada, Java non-full support GPL V2.0

  4. Linux System PaRTiKle USER APIs(ulibc) RT-KERNEL(klibc) Xm system calls XtratuM Kernel INTERRUPTS ANF TIMER PaRTiKle Architecture

  5. Domain Kernel pool Irq_mask Event heap User Dynamical others Memory Management Domain HEAP(3M) memory_pool ->KERNEL_DYNAMIC_MEMORY(1M) _dyn_mem_pool->USER_DYNAMIC_MEMORY(1M)

  6. Interrupt Management IRQ_NR: 16 (max: 32) -> xtratum domain events TRAP_NR: 16 (max: 20) event_handling_t

  7. Thread Management Posix thread (not all) Posix mutex Posix condition Posix semphone Non-Posix timer

  8. Device Management Device name add in prtkcf Device structure name are fixed **devtab root console

  9. Exmaple // A Hello World example #include <stdio.h> #include <time.h> #include <sys/io.h> int main (int argc, char **argv) { struct timespec t = {5, 0}; int ent; char buf [20]; printf ("Hello World!!!\n"); //printf->write_scr->printk scanf ("%d", &ent); scanf ("%s", buf); printf ("ent: %d\n", ent); printf ("buf: %s\n", buf); ent = inb (0x378); */ // while (1); nanosleep (&t, 0); // exit (0); return 0; }

  10. Exmaple Create the new in the c_example directory ;;Compile the new file # make ;;Run the new file # ../../../../xtratum/user_tools/xmloader/loader.xm hello_world.prtk ;;Check the result # dmesg >> PaRTiKle Core << Detected 1602.317 MHz processor. Setting up the dynamic memory manager (2048 kbytes at 0x200400c) Free system memory 3071 Kb PaRTiKle (54 Kb [.text=34 .data=8 .rodata=2 .bss=6] Kb) App. (34 Kb [.text=17 .data=1 .rodata=9 .bss=0] Kb) - init console: ok - init root: ok - init test: ok - init rtf: ok Jumping to the user's code Hello World!!! System exit status: 0. System halted.

  11. Appendix I prtkcf dev cons cons-xm root test rtf # tty lib c port dev errno fs heap ……

  12. Appendix I prtkcf heap irqs pthread rtl sched semaphore setup signal syscalls time link koutput rtc tsc xmtimer # files are taken relative to the PaRTiKle $ROOT root /dev / /tmp / /usr / /usr/NOTES /NOTES

  13. Appendix II rtf-device ……….. int init_rtf(void) { int index; for(index = 0; index < MAX_FIFO_COUNT; index ++) { fifos[index].rtf_flag = 0; fifos[index].rtf_minor = -1; } return 0; } struct Dev rtfdevtab = { dc: 'c', name: "rtf", init: init_rtf, open: rtf_open, read: rtf_read, write: rtf_write, close: rtf_close, ioctl: rtf_ioctl, mmap: rtf_mmap };

  14. Thank You!

More Related