pthread realtime scheduling with SCHED_FIFO and SCHED_OTHER

by Daniel » Thu, 30 Jul 2009 11:48:16 GMT


Sponsored Links
 ello,
I observed some strange behaviour with scheduling realtime pthreads on
Linux (2.6.26, Android 1.5).

In the first scenario we have a process that contains only one
realtime thread (SCHED_FIFO) with priority 99 and no more other
threads.
This thread has to run every 5737 microseconds and do something (runs
just a few microseconds). This scenario works perfectly even under
really high load.

Then, in the second scenario, we used the code from the first scenario
and put it into another process that also contains some other threads.
These threads are no realtime threads and there is currently no
synchronization between the realtime thread and the others. Now, the
strange thing is that the realtime thread occasionally misses some
deadline and is scheduled only after 20 milliseconds or more.

I don't have any explanation for this. Any ideas why this isn't
working and how to fix it?
We do not use group scheduling.

Above is our kernel configuration.

Best regards,
Daniel

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_MMU=y
# CONFIG_NO_IOPORT is not set
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_ZONE_DMA=y
CONFIG_ARCH_MTD_XIP=y
CONFIG_OPROFILE_ARMV6=y
CONFIG_OPROFILE_ARM11_CORE=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_CGROUPS is not set
# CONFIG_GROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_PANIC_TIMEOUT=0
CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_COMPAT_BRK=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_ASHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
# CONFIG_MARKERS is not set
CONFIG_OPROFILE=y
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
# CONFIG_HAVE_DMA_ATTRS is not set
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE



pthread realtime scheduling with SCHED_FIFO and SCHED_OTHER

by ruckuus » Sun, 02 Aug 2009 19:35:01 GMT


 i Daniel,

On Jul 30, 6:47pm, Daniel <daniel.himmel...@googlemail.com> wrote:

You might want to hook up on arm-linux-kernel mail-list for this.
IMHO, this is not android specific issue.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Other Threads

1. Market aneh

Entah kenapa sudah 2 hari ini bbrp software yg biasanya bisa di search di 
market kok sekarang ngga bisa muncul ya di andro saya.
kemarin saya cari software any web copy, ngga nemu.
trus cari ebuddy, eh ngga nemu juga.

Ada yg ngalamin?



@SEVEN on google Android-

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

2. Rooting Dream (new method)! mohon bimbingan...

Dear Suhu2, mohon bimbingannya ya hehe

============================================
Requirements & File-file yang perlu di download

   1. Download File
FlashRec.apk<http://android.lucidrem.us/_fd.php?file=files/howto-root/flashrec-20090904.apk>
   2. Download file recovery image milik Amon-RA
disini<http://android.lucidrem.us/_fd.php?file=files/howto-root/recovery-RAv1.2.1G.img>
   3. Download Custom ROM
disini<http://android.lucidrem.us/_fd.php?file=files/enomther/USA/CRC1/OTA/update.zip>untuk
G1 versi US
   *ATAU* download
disini<http://android.lucidrem.us/_fd.php?file=files/enomther/EUR/CRC37/OTA/update.zip>untuk
G1 versi EUR

 Root your G1 instruction (New Method aka One Click Root)

   1. Copy semua file yang sudah anda download tadi di root dari SDCard anda

   2. Gunakan ASTRO file manager (jika belum ada, download di Market, search
   Astro) untuk menginstall aplikasi FlashRec.apk
   3. Jalankan program FlashRec tersebut
   4. Pilih BackUpRecoveryImage dan tunggu sampai selesai
   5. Ketik "/sdcard/recovery-RAv1.2.1G.img" pada text box yang tersedia ->
   Pilih "Flash Custom Recovery Image"
   6. Matikan ponsel anda
   7. Boot ke recovery screen (tekan dan tahan Home button + tekan tombol
   power)
   8. Flash file update.zip atau tekan Alt + S


And that's it! :)

Yep, dengan langkah-langkah tersebut anda akan memiliki root akses :) Untuk
lebih jelasnya mungkin bisa melihat video tutorialnya
disini<http://theunlockr.com/2009/08/22/how-to-root-the-mytouch-3g-or-g1-in-one-click/>sumber:
the
unlocker - one touch
root<http://theunlockr.com/2009/08/22/how-to-root-the-mytouch-3g-or-g1-in-one-click/>

Goodluck! :)
==============================

amunisi sudah di donlot : FlashRec(flashrec-20090904.apk),
Amon-RA(recovery-RAv1.2.1G), custom ROM versi US(update.zip), ASTRO file
manager sudah di install

sebelumnya nanya gmn cara copy downloaded files ke root folder, secara saya
liat di desktop ga ada folder root, apa perlu di format/partisi dulu micro
sd nya?

waiting for next step...

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

3. Music: file names, album recognition, etc?

4. Detecting a Tidal Wave of Android Apps

5. Cupcake : "Removed SD Card" notification after 1.5 upgrade

6. How to build Android emulator for special platform?

7. Cupcake : "Removed SD Card" notification after 1.5 upgrade