Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, August 13, 2014

Interview Questions

http://www.extramaster.net/tools/downloadFromSlideshare/
http://www7.flamingtext.in/
http://www.tracephonenumber.in/

int(*(*fptr)(int, char))(float);
fptr is pointer to function (int, char) returning pointer to function (float) returning int

tasklet, priority inheritance
what are the step to add decoder in stagefright
how to use c++ function in c
lock vs spinlock, priority inversion,
how to collect ram dump,

how hashmap is implemented
diff. between dequeue and list
semophore and mutex
types of semophore
deleting null ptr, delete ptr twice

sleep and wait difference
pthread_exit and return function
what are the different way of threads synchronisation
what segments of a process are shared among threads
what is process. diff between threads and process
how to wait for completion of all threads execution without pthread_join()

how negotiation occur in gstreamer
stagefright, gstreamer, omxil. kernel av codecs

How is an Interrupt handled in Linux?
https://en.wikipedia.org/wiki/Longjmp#Simple_example
multithreading, test use of pthread_join(), pthread_detach(), pthread_exit

what is role of omx core
http://maemo.org/api_refs/5.0/beta/libomxil-bellagio/group__core.html

http://www.geeksforgeeks.org/multithreading-c-2/
http://www.alexonlinux.com/how-inheritance-encapsulation-and-polymorphism-work-in-cpp#introduction
http://www.studytonight.com/cpp/cpp-and-oops-concepts.php
http://www.ncooltips.com/2012/12/how-to-change-core-dump-file-path.html
http://www.moythreads.com/wordpress/2011/10/06/linux-core-dumps/
http://stackoverflow.com/questions/5311515/gcc-fpic-option
http://www.thegeekstuff.com/2013/01/mix-c-and-cpp/
http://koti.mbnet.fi/niclasw/MutexSemaphore.html
http://www.go4expert.com/articles/virtual-table-vptr-t16544/
http://www.programmerinterview.com/index.php/c-cplusplus/how-vtables-work/
http://www.studytonight.com/cpp/virtual-functions.php
http://www.learncpp.com/cpp-tutorial/125-the-virtual-table/
http://www.mytechinterviews.com/nth-to-last-element-in-a-singly-linked-list
http://ccppcoding.blogspot.in/2012/08/android-multimedia-interview-questions.html
http://cs-fundamentals.com/c-programming/memory-layout-of-c-program-code-data-segments.php
http://nandu310.wordpress.com/2009/11/09/memory-areas-in-c-language/
http://shareprogrammingtips.com/c-language-programming-tips/structure-of-a-c-program-in-memory-how-heapstackdata-and-code-segments-are-stored-in-memory/
http://www.devshed.com/c/a/braindump/the-mmap-system-call-in-linux/
http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/
http://rsquared.sdf.org/gdb/mlats.html

An abstract class has at least one pure virtual function. This is standard C++ terminology.
Some people use the term pure abstract class to describe a class that has nothing but pure virtual functions
(in other words, no data members and no concrete functions). This is equivalent to Java interfaces.

http://stackoverflow.com/questions/8359322/how-to-share-semaphores-between-processes-using-shared-memory
semaphore is atomic counter which indicate the number of resource available.
Also, It is used for synchronization between threads.
sem_wait() decrements semaphore

Semaphore: Use a semaphore when you (thread) want to sleep till some other thread tells you to wake up.
Mutex: Use a mutex when you (thread) want to execute code that should not be executed by any other thread at the same time.
Spinlock: Use a spinlock when you really want to use a mutex but your thread is not allowed to sleep. e.g.: An interrupt handler within OS kernel must never sleep. If it does the system will freeze / crash. If you need to insert a node to globally shared linked list from the interrupt handler, acquire a spinlock - insert node - release spinlock.