├── CPP ├── README.md └── questions │ ├── cpp_advanced.txt │ ├── cpp_medium.txt │ └── cpp_easy.txt ├── IPC ├── README.md └── questions │ └── IPC.txt ├── Generic ├── README.md └── questions │ ├── generic_questions_freshers_trainee_interns.txt │ └── generic_questions_experienced.txt ├── TODO ├── HAL │ ├── README.md │ └── questions │ │ └── HAL.txt ├── Bootloader │ ├── README.md │ └── questions │ │ ├── MLO.txt │ │ └── bootloaders_and_driver.txt ├── File_Systems │ ├── README.md │ └── questions │ │ └── File_Systems.txt ├── Development_tools │ ├── README.md │ └── questions │ │ ├── CVS.txt │ │ ├── JIRA.txt │ │ ├── Bit-Bucket.txt │ │ ├── Confluence.txt │ │ └── SourceTree.txt ├── Documentations │ ├── README.md │ └── questions │ │ └── Documetations.txt ├── Quality_Processes │ ├── README.md │ └── questions │ │ ├── CMMi.txt │ │ └── Agile_Scrum.txt ├── ATF_and_ARM_TrustZone │ ├── README.md │ └── questions │ │ ├── ARM_Trust_Zone.txt │ │ └── ATF_Arm_Trusted_Firmware.txt ├── BSP_Porting_Bringup │ ├── README.md │ └── questions │ │ └── BSP_Porting_Bringup.txt ├── Client_communications │ ├── README.md │ └── questions │ │ └── Client_communications.txt ├── Leadership_Management │ ├── README.md │ └── questions │ │ └── Leadership_Management_Planning.txt ├── PoC_Proof_of_Concept │ ├── README.md │ └── questions │ │ └── PoC.txt ├── Protocols │ ├── VoIP │ │ └── questions │ │ │ ├── H323.txt │ │ │ ├── RTP.txt │ │ │ └── SIP.txt │ ├── Network │ │ └── questions │ │ │ ├── BGP.txt │ │ │ ├── CAN.txt │ │ │ ├── ICMP.txt │ │ │ ├── IP.txt │ │ │ ├── SNMP.txt │ │ │ ├── TCP.txt │ │ │ └── UDP.txt │ ├── Routing │ │ └── questions │ │ │ ├── BGP.txt │ │ │ ├── OSPF.txt │ │ │ └── RIP.txt │ ├── Security │ │ └── questions │ │ │ ├── IPSec.txt │ │ │ ├── PGP.txt │ │ │ ├── SSH.txt │ │ │ ├── Kerberos.txt │ │ │ └── SSL_TLS.txt │ ├── Storage │ │ └── questions │ │ │ ├── FC.txt │ │ │ ├── NFS.txt │ │ │ ├── SCSI.txt │ │ │ └── SMB.txt │ ├── Transport │ │ └── questions │ │ │ ├── SCTP.txt │ │ │ ├── TCP.txt │ │ │ └── UDP.txt │ ├── Wireless │ │ └── questions │ │ │ ├── NFC.txt │ │ │ ├── WIFI_802.11.txt │ │ │ ├── Zigbee_802.15.4.txt │ │ │ └── Bluetooth_802.15.txt │ ├── File_Transfer │ │ └── questions │ │ │ ├── FTP.txt │ │ │ ├── SFTP.txt │ │ │ └── TFTP.txt │ ├── Generic │ │ └── questions │ │ │ └── protocols.txt │ ├── Internet_Layer │ │ └── questions │ │ │ ├── ICMP.txt │ │ │ ├── IGMP.txt │ │ │ └── IP.txt │ ├── Application_Layer │ │ └── questions │ │ │ ├── DNS.txt │ │ │ ├── FTP.txt │ │ │ ├── HTTP.txt │ │ │ ├── SMTP.txt │ │ │ ├── SNTP.txt │ │ │ └── WebSocket.txt │ ├── Display_Interface_Protocols │ │ └── questions │ │ │ ├── DVI.txt │ │ │ ├── HDMI.txt │ │ │ ├── MHL.txt │ │ │ ├── SDI.txt │ │ │ ├── VGA.txt │ │ │ ├── DisplayPort.txt │ │ │ ├── HDBaseT.txt │ │ │ └── Thunderbolt.txt │ └── Wireless_Display_Protocols │ │ └── questions │ │ ├── AirPlay.txt │ │ ├── Chromecast.txt │ │ └── Miracast.txt └── Debugging_tools │ ├── hardware_debugging │ ├── README.md │ └── questions │ │ ├── DSO_CRO.txt │ │ ├── Logic_Analyzer.txt │ │ └── Spectrum_Analyzer.txt │ └── software_debugging │ ├── README.md │ └── questions │ ├── ADB.txt │ ├── GDB.txt │ ├── JTAG.txt │ └── KGDB.txt ├── Yocto ├── README.md └── questions │ └── Yocto.txt ├── SoftSkills ├── README.md └── questions │ ├── TODO │ ├── Self-starter.txt │ ├── Positive_attitude.txt │ ├── creative_thinker.txt │ ├── problem_solving.txt │ ├── Attention_to_details.txt │ ├── Collaboration_Teamwork.txt │ ├── Communication_skills.txt │ ├── Continuous_Learning.txt │ ├── Documentation_Technical_Writing.txt │ ├── TimeManagement_and_Organization.txt │ └── Professionalism_and_Ethical_Conduct.txt │ ├── Analytical_Thinking.txt │ ├── Adaptibility.txt │ └── Logical_puzzles.txt ├── Toolchains ├── README.md └── questions │ └── toolchains.txt ├── Data_structures ├── README.md └── questions │ └── Data_structures.txt ├── Embedded_systems ├── README.md └── questions │ └── Embedded_systems.txt ├── Multimedia ├── questions │ ├── ffmpeg.txt │ ├── GPU.txt │ ├── multimedia_basics.txt │ └── video_coding.txt ├── README.md └── GStreamer │ ├── GStreamer_plugins_and_Development.txt │ └── GStreamer_basics.txt ├── Device_drivers ├── questions │ ├── TODO │ │ ├── MIPI_CSI2.txt │ │ ├── NFC_Driver.txt │ │ ├── SATA_Driver.txt │ │ ├── Bluetooth_Driver.txt │ │ ├── Linux_Block_Driver.txt │ │ ├── Linux_HDMI_driver.txt │ │ ├── Linux_PCI_Driver.txt │ │ ├── Linux_SCSI_Driver.txt │ │ ├── GPIO_Framework_driver.txt │ │ ├── Linux_Ethernet_Driver.txt │ │ └── Linux_Wireless_LAN_Driver.txt │ ├── Linux_USB_Driver.txt │ ├── Network_Driver.txt │ ├── Linux_SPI_I2C_UART_Driver.txt │ ├── V4L2_Media_Framework_Driver.txt │ ├── Device_Tree.txt │ ├── ALSA_Framework_Driver.txt │ └── Device_Driver_Basics.txt └── README.md ├── C_CPP_Combined ├── README.md └── questions │ └── c_cpp_easy.txt ├── Linux_Kernel ├── questions │ ├── TODO │ │ ├── IndustrialIO_or_IIO_subsystem.txt │ │ └── Voltage_and_current_regulator_API_Framework.txt │ ├── Linux_File_System.txt │ ├── Linux_Booting.txt │ ├── Linux_Kernel_Debugging.txt │ ├── Process_Management_scheduling.txt │ ├── Kernel_Topics.txt │ ├── DMA_in_Kernel.txt │ └── Interrupts_in_kernel.txt └── README.md ├── Version_Control_Systems ├── README.md └── questions │ └── GIT.txt ├── C ├── README.md └── questions │ ├── c_advanced.txt │ ├── c_easy.txt │ └── c_medium.txt └── README.md /CPP/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /IPC/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Generic/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/HAL/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Yocto/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Toolchains/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Data_structures/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Embedded_systems/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Bootloader/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/File_Systems/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/HAL/questions/HAL.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Multimedia/questions/ffmpeg.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Bootloader/questions/MLO.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Development_tools/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Documentations/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Quality_Processes/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/ATF_and_ARM_TrustZone/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/BSP_Porting_Bringup/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Client_communications/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Leadership_Management/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/PoC_Proof_of_Concept/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/VoIP/questions/H323.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/VoIP/questions/RTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/VoIP/questions/SIP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/MIPI_CSI2.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Self-starter.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Development_tools/questions/CVS.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Development_tools/questions/JIRA.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/BGP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/CAN.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/ICMP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/IP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/SNMP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/TCP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Network/questions/UDP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Routing/questions/BGP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Routing/questions/OSPF.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Routing/questions/RIP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Security/questions/IPSec.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Security/questions/PGP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Security/questions/SSH.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Storage/questions/FC.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Storage/questions/NFS.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Storage/questions/SCSI.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Storage/questions/SMB.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Transport/questions/SCTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Transport/questions/TCP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Transport/questions/UDP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless/questions/NFC.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Quality_Processes/questions/CMMi.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /C_CPP_Combined/README.md: -------------------------------------------------------------------------------- 1 | ## Useful links 2 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/NFC_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/SATA_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Positive_attitude.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/creative_thinker.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/problem_solving.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Development_tools/questions/Bit-Bucket.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Development_tools/questions/Confluence.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Development_tools/questions/SourceTree.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/File_Systems/questions/File_Systems.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/File_Transfer/questions/FTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/File_Transfer/questions/SFTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/File_Transfer/questions/TFTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Generic/questions/protocols.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Internet_Layer/questions/ICMP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Internet_Layer/questions/IGMP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Internet_Layer/questions/IP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Security/questions/Kerberos.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Security/questions/SSL_TLS.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Quality_Processes/questions/Agile_Scrum.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Bluetooth_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Linux_Block_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Linux_HDMI_driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Linux_PCI_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Linux_SCSI_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Attention_to_details.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Collaboration_Teamwork.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Communication_skills.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Continuous_Learning.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/hardware_debugging/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/software_debugging/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Application_Layer/questions/DNS.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Application_Layer/questions/FTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Application_Layer/questions/HTTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Application_Layer/questions/SMTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Application_Layer/questions/SNTP.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless/questions/WIFI_802.11.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless/questions/Zigbee_802.15.4.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/GPIO_Framework_driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Linux_Ethernet_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/ATF_and_ARM_TrustZone/questions/ARM_Trust_Zone.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/software_debugging/questions/ADB.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/software_debugging/questions/GDB.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/software_debugging/questions/JTAG.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/software_debugging/questions/KGDB.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Application_Layer/questions/WebSocket.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless/questions/Bluetooth_802.15.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Device_drivers/questions/TODO/Linux_Wireless_LAN_Driver.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/TODO/IndustrialIO_or_IIO_subsystem.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Documentation_Technical_Writing.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/TimeManagement_and_Organization.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Client_communications/questions/Client_communications.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/hardware_debugging/questions/DSO_CRO.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/DVI.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/HDMI.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/MHL.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/SDI.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/VGA.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless_Display_Protocols/questions/AirPlay.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SoftSkills/questions/TODO/Professionalism_and_Ethical_Conduct.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/ATF_and_ARM_TrustZone/questions/ATF_Arm_Trusted_Firmware.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/hardware_debugging/questions/Logic_Analyzer.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/DisplayPort.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/HDBaseT.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Display_Interface_Protocols/questions/Thunderbolt.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless_Display_Protocols/questions/Chromecast.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Protocols/Wireless_Display_Protocols/questions/Miracast.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Debugging_tools/hardware_debugging/questions/Spectrum_Analyzer.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/TODO/Voltage_and_current_regulator_API_Framework.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO/Bootloader/questions/bootloaders_and_driver.txt: -------------------------------------------------------------------------------- 1 | # boot loaders, secure boot 2 | # 3 | -------------------------------------------------------------------------------- /Multimedia/questions/GPU.txt: -------------------------------------------------------------------------------- 1 | # experience in any of the GPU, using APIs or CUDA programming. 2 | -------------------------------------------------------------------------------- /TODO/Documentations/questions/Documetations.txt: -------------------------------------------------------------------------------- 1 | #Requirement Specification, Design, Test Plan & Test cases 2 | -------------------------------------------------------------------------------- /TODO/BSP_Porting_Bringup/questions/BSP_Porting_Bringup.txt: -------------------------------------------------------------------------------- 1 | # board bring-ups for cross platforms 2 | # BSP Porting 3 | 4 | -------------------------------------------------------------------------------- /Version_Control_Systems/README.md: -------------------------------------------------------------------------------- 1 | ### Useful links 2 | 3 | - [git-practice](https://learngitbranching.js.org/?NODEMO) 4 | -------------------------------------------------------------------------------- /TODO/Leadership_Management/questions/Leadership_Management_Planning.txt: -------------------------------------------------------------------------------- 1 | #Effort estimation, planning, customer Interaction 2 | 3 | -------------------------------------------------------------------------------- /CPP/questions/cpp_advanced.txt: -------------------------------------------------------------------------------- 1 | 1. RAII (Resource Acquisition Is Initialization) 2 | 2. move semantics 3 | 3. smart pointers 4 | 4. STL containers -------------------------------------------------------------------------------- /C/README.md: -------------------------------------------------------------------------------- 1 | ## Useful links 2 | 3 | - [C++ Interview Questions for Experienced - A4Academics](https://a4academics.com/interview-questions/57-c-plus-plus/720-c-interview-questions-experienced) 4 | - [C FAQ - c-faq.com](https://c-faq.com/) 5 | - [Tons of C questions](https://www.grepper.com/answers/tag/c) 6 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/Linux_File_System.txt: -------------------------------------------------------------------------------- 1 | 1. what is /proc entry and how it is useful 2 | 2. What is file system , how to create 3 | 3. How to register file system 4 | 4. When fine system registered what happens 5 | 5. What are the diffirent types of file systems are there, give example 6 | 6. What is VFS? explain briefly? 7 | -------------------------------------------------------------------------------- /Device_drivers/questions/Linux_USB_Driver.txt: -------------------------------------------------------------------------------- 1 | 1. If there is a speech audio data to be received by USB device what type of data transfers will you chose. 2 | 2. What are the different types of device descriptors? 3 | 3. How many END point descriptors can be present per device? 4 | 4. What is a configuration descriptor? 5 | 5. What is a control type of data transfer? 6 | 6. USB driver project? 7 | 7. blocking and non-blocking USB calls 8 | 8. Explain about USB device Deriver? 9 | 9. How USB driver is registration mechanism? 10 | -------------------------------------------------------------------------------- /Device_drivers/questions/Network_Driver.txt: -------------------------------------------------------------------------------- 1 | 1. How to send information over network? (structure packing) 2 | 2. Ethernet driver how a packet get transferred in Ethernet drivers? 3 | 3. How a Reception of packet performed in a Ethernet device driver? (Explain from starting to reception of packet) 4 | 4. How Ethernet device is registered 5 | 5. How many interrupt lines you have been used in your driver development. 1. UART : 1 (RX). 2. Ethernet: 2 (RX & TX) 6 | 6. How to register, allocate NIC. 7 | 7. How a packet is sent in ethernet driver? 8 | 8. What happens as soon as a packet arrives from the network in Linux ? 9 | -------------------------------------------------------------------------------- /Generic/questions/generic_questions_freshers_trainee_interns.txt: -------------------------------------------------------------------------------- 1 | 01. most rewarding thing you've worked on 2 | 02. if you have too many things to work on, how do you decide what to do right now 3 | 03. tell me about your experience working with other teams 4 | 04. have you ever taught other students or helped other people work through understanding a problem? 5 | 05. what class have you liked the most ? why ? 6 | 06. most/least favorite languages on your list? why? 7 | 07. example of a day where everything went wrong 8 | 08. How do you handle stress and pressure at study? 9 | 09. How would you describe yourself? 10 | 10. How do you view yourself? Whom do you compare yourself to? 11 | 11. What are you passionate about? -------------------------------------------------------------------------------- /SoftSkills/questions/Analytical_Thinking.txt: -------------------------------------------------------------------------------- 1 | 01. How do you approach a complex problem when you don't have all the necessary information? 2 | 02. Describe a project where you had to analyze a large dataset. How did you approach 3 | the analysis, and what tools did you use? 4 | 03. Can you give an example of a time when you identified a problem before it 5 | became a major issue? How did you use analytical thinking to address it? 6 | 04. Describe a project where you had to analyze various options to make a decision. 7 | How did you weigh the pros and cons of each option? 8 | 05. Can you share an example of a time when you used analytical thinking to optimize 9 | a process or workflow? 10 | 06. Tell us about a time when you had to analyze risk factors before making a decision. 11 | How did you mitigate potential risks? 12 | -------------------------------------------------------------------------------- /Multimedia/README.md: -------------------------------------------------------------------------------- 1 | ## Useful links 2 | 3 | ### Multimedia 4 | - [Multimedia PDF - KSR College of Engineering](https://www.ksrce.ac.in/admin/file_manager/source/BE%20(CSE)/UG-CSE/2019-2020/Multimedia%20.pdf) 5 | - [Advanced Linux Character Driver Operations - Motionzen](http://interview-questions.motionzen.com/linux-device-driver/advanced-linux-character-driver-operations) 6 | - [Computer Notes: What is Frame Buffer](https://ecomputernotes.com/computer-graphics/basic-of-computer-graphics/what-is-frame-buffer) 7 | - [Bootlin: Linux Kernel Graphics Training Slides](https://bootlin.com/doc/training/graphics/graphics-slides.pdf) 8 | - [Embedded Wizard: Framebuffer Concepts](https://doc.embedded-wizard.de/framebuffer-concepts) 9 | - [Digital Video Introduction - GitHub (Leandro Moreira)](https://github.com/leandromoreira/digital_video_introduction#intro) 10 | 11 | ### GStreamer 12 | - [GStreamer articles](https://www.programmersought.com/article/23997677691/) 13 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/Linux_Booting.txt: -------------------------------------------------------------------------------- 1 | 1. What is booting process of linux Kernel. Explain each stage. 2 | >A> BIOS -> MBR -> GRUB -> Kernel -> Init -> Run-levels 3 | 2. What is primary and secondary bootloader. Why we need two bootloader. ? 4 | 3. Explain about the Linux boot sequence in case of ARM architecture? 5 | 4 . How are the command line arguments passed to Linux kernel by the u-boot (bootloader)? 6 | 5 . Explain about ATAGS? 7 | 6 . Explain about command line arguments that are passed to linux kernel and how/where they are parsed in kernel code? 8 | 7 . which process / directory is responsible for the kernel is decompresed during boot up ? 9 | 8 . Diff b/w MLO & IPL. 10 | 9 . What is greb loader 11 | 10. Embedded board Booting sequence 12 | 11. Booting Sequence of a board ? 13 | 12. How a user mode is transferred to kernel mode? 14 | 13. Why primary boot loader and secondary boot loader required? 15 | 14. What are types of boot loader? 16 | 15. How to decrease the time of booting processes 17 | -------------------------------------------------------------------------------- /Linux_Kernel/README.md: -------------------------------------------------------------------------------- 1 | ## Useful links 2 | 3 | ### DMA 4 | - [Linux Kernel Documentation: DMA-API-HOWTO.txt](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/DMA-API-HOWTO.txt) 5 | - [Linux Kernel Documentation: DMA-API.txt](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/DMA-API.txt) 6 | - [LWN Article: DMA Basics](https://lwn.net/Articles/396702/) 7 | - [LWN Article: DMA API Enhancements](https://lwn.net/Articles/486301/) 8 | - [BrainKart: DMA Controller Models](https://www.brainkart.com/article/DMA-controller-models_7674/) 9 | 10 | ### Linux kernel 11 | - [Interview questions](http://interview-questions.motionzen.com/linux-device-driver/linux-modules-interview-questions) 12 | - [lockdep](https://pixcellencetech.com/unlocking-linux-kernel-using-lockdep.html) 13 | - [Notification/Notifier chain](https://0xax.gitbooks.io/linux-insides/content/Concepts/linux-cpu-4.html) 14 | - [Boot memory allocator](https://www.kernel.org/doc/gorman/html/understand/understand008.html) 15 | - [Cache coherence](https://www.geeksforgeeks.org/cache-coherence/) 16 | -------------------------------------------------------------------------------- /SoftSkills/questions/Adaptibility.txt: -------------------------------------------------------------------------------- 1 | 01. Can you share an example of a time when you successfully adapted to a new 2 | technology or tool? What was your approach? 3 | 02. Tell us about a time when you had to work with a team member who had a 4 | drastically different work style or perspective. How did you adapt to ensure collaboration? 5 | 03. Have you ever faced a major shift in your job role or responsibilities? How did 6 | you adapt to excel in the new role? 7 | 04. Describe a project where the requirements changed frequently. How did you adapt 8 | to manage these changes effectively? 9 | 05. Can you give an example of a time when you adapted your communication style to 10 | effectively convey information to different stakeholders? 11 | 06. Describe a situation where you had to adapt to working with a remote team. What 12 | strategies did you use to ensure effective collaboration? 13 | 07. Have you ever encountered cultural differences in a work setting? How did you 14 | adapt to bridge those differences and work effectively with your colleagues? 15 | 08. Tell us about a time when you had to adapt to a tight deadline. How did you 16 | manage your time and resources to meet the deadline successfully? 17 | -------------------------------------------------------------------------------- /C/questions/c_advanced.txt: -------------------------------------------------------------------------------- 1 | Questions: 2 | ----------------- 3 | 4 | 5 | Programs: 6 | --------- 7 | 1. Implement a tic-tac-toe game for single player 8 | 2. sudoku puzzle: Given a partially filled 9×9 2D array sudoku[9][9], the goal is to assign 9 | digits (from 1 to 9) to the empty cells so that every row, column, and subgrid of size 10 | 3×3 contains exactly one instance of the digits from 1 to 9. 11 | 3. An expression will be given which can contain open and close parentheses and optionally 12 | some characters, No other operator will be there in string. We need to remove minimum number 13 | of parentheses to make the input string valid. If more than one valid output are possible 14 | removing same number of parentheses then print all such output 15 | Input: str = "()())()" - 16 | Output : ()()() 17 | (())() 18 | Input: str = "(()" 19 | Output : () 20 | 4. Given a number n, the task is to generate n bit Gray codes. i.e. generate bit patterns from 21 | 0 to 2^n-1 such that successive patterns differ by one bit) 22 | Input : 2 23 | Output : 0 1 3 2 24 | Explanation : 00 -> 01 -> 11 -> 10 25 | Input : 3 26 | Output : 000 -> 001 -> 011 -> 010 -> 110 -> 111 -> 101 -> 100 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Toolchains/questions/toolchains.txt: -------------------------------------------------------------------------------- 1 | 1. What is a toolchain in software development? 2 | 2. Explain the components of a typical toolchain. 3 | 3. What is the purpose of a compiler in a toolchain? 4 | 4. How does a linker fit into the toolchain? 5 | 5. What role does the assembler play in the toolchain? 6 | 6. What are cross-compilers, and when are they used? 7 | 7. Describe the significance of the build system in a toolchain. 8 | 8. What is the purpose of a debugger in the toolchain? 9 | 9. How does the version control system integrate with the toolchain? 10 | 10. What is continuous integration, and how does it relate to the toolchain? 11 | 11. Can you explain the concept of static vs. dynamic linking in the context of a toolchain? 12 | 12. How does the toolchain support code optimization? 13 | 13. Discuss the importance of code profiling and how it is facilitated by the toolchain. 14 | 14. Explain the concept of target platforms and how they are handled in a toolchain. 15 | 15. What are the challenges or considerations when integrating different tools within a toolchain? 16 | 16. How do you ensure compatibility and interoperability between the tools in a toolchain? 17 | 17. Discuss the benefits and challenges of customizing or extending a toolchain. 18 | 18. How does the toolchain contribute to the software development life cycle? 19 | 19. Can you provide an example of a popular toolchain used in a specific programming language or framework? 20 | 20. How do you evaluate and select a suitable toolchain for a particular development project? 21 | -------------------------------------------------------------------------------- /CPP/questions/cpp_medium.txt: -------------------------------------------------------------------------------- 1 | 1. Using “static” keyword? Static class members: static data and static functions. Belong to class but not the objects of the class. When can you access class static data? Before any objects are created! How to access class static data? ClassName::dataName. 2 | 2. Is “new” in C++ any better than old malloc()? new/delete? malloc()/free()? 3 | >A> Yes! It does more: 4 | - Object construction: “new” and “delete” create and destroy objects, while malloc() and free() merely allocate and deallocate memory. 5 | - Safety: “new” returns a correct type of pointer while malloc() return s void* which can be converted to any other types of point and it isn’t type safe. 6 | - Flexibility: “new” can be overloaded by a class. But malloc() can’t. 7 | Can we use “new” & free() or malloc() & delete? No. 8 | 3. What is dynamic binding (run-time) instead of static binding(compile time)? Polymorphism? Why is it needed? How to use it? Virtual keyword. 9 | 4. How does C++ compiler achieve dynamic binding or polymorphism? The cost? Virtual table “vtable” per class. Virtual point “vpointer” per object. 10 | 5. Using any C++ STL containers? vector? deque? list? What differences are among them? list vs forward_list? set vs multiset? set vs unordered_set? set vs map? 11 | 6. Using any C++ smart pointers? raw-pointer? unique_ptr? shared-ptr? weak_ptr? Why are they needed? How do they work? What differences are among them? Class destructor to release memory, reference count to share_ptr. Why weak_ptr? Ring or cycle of objects. 12 | 7. Using any C++ design patterns? Singleton? Factory? Or others? Give me an example. Why? How? -------------------------------------------------------------------------------- /Device_drivers/questions/Linux_SPI_I2C_UART_Driver.txt: -------------------------------------------------------------------------------- 1 | 1. What is the difference between I2C & SPI 2 | 2. How will you chosse which protocal to be used on board communication 3 | 3. How the communication difference b/w I2C & SPI 4 | 4. Is clock stretching is for Master or Slave in I2C protocol 5 | 5. What is Bit Binding in I2C protocol 6 | 6. What is i2c clock stretching 7 | 7. what is repeate sequence in I2C? How this signal will look on CRO? 8 | 8. How will you know if the I2C lines are noisy? 9 | 9. What monitoring tools have you used like I2C sniffer 10 | 10. how will you verify I2C communication?How will you know if there was a software or hw problem? 11 | 11. what is i2c bus error 12 | 12. I2C- dummy write, repeated start, arbitration, synchronization between masters 13 | 13. Lm475 temperature driver project 14 | 14. How can two slaves can communicate with master in i2c protocol at a time? 15 | 15. How can we address different devices from same vendor i2c? 16 | 16. What is the clock frequency used in your I2C driver designed? 17 | 17. What is the start bit condition in I2C? 18 | 18. How I2C protocol works? 19 | 19. What are different speeds the I2C had? 20 | 20. How the master knows what is the start condition ? 21 | 21. while in between I2C communication what happens if clocks happens to be dragged low which is not as per i2c standard? 22 | 22. What if the slave device is not responding or no acknowledge bit is sent by slave device? 23 | 23. I2C : what is I2C Clock Stretch, Bus line clear. 24 | 24. How many lines required for SPI communication? 25 | 25. Do you need to change Clock polarity and phase for SPI? 26 | 26. Who has control of SPI clock? 27 | 27. Diff btwn SPI & I2C 28 | -------------------------------------------------------------------------------- /C_CPP_Combined/questions/c_cpp_easy.txt: -------------------------------------------------------------------------------- 1 | 1. Can I directly use C header files in CPP source file ? What changes I have to make in C header file in order to work with CPP ? 2 | 2. Write down a C program, that will not work in C++. 3 | 3. How does void* differs between C and C++? 4 | >A> 5 | C allows a void* pointer to be assigned to any pointer type without a cast, whereas C++ does not; this idiom appears often in C code using malloc memory allocation. For example, the following is valid in C but not C++: 6 | void* ptr; 7 | int *i = ptr; // Implicit conversion from void* to int* 8 | 4. Difference between C and C++ structures 9 | >A> 10 | - Member functions inside structure: Structures in C cannot have member functions inside structure but Structures in C++ can have member functions along with data members. 11 | - Direct Initialization: We cannot directly initialize structure data members in C but we can do it in C++ 12 | - Using struct keyword: In C, we need to use struct to declare a struct variable. In C++, struct is not necessary. 13 | - Static Members: C structures cannot have static members but is allowed in C++. 14 | - sizeof operator: This operator will generate 0 for an empty structure in C whereas 1 for an empty structure in C++. 15 | - Data Hiding: C structures does not allow concept of Data hiding but is permitted in C++ as C++ is an object oriented language whereas C is not. 16 | - Access Modifiers: C structures does not have access modifiers as these modifiers are not supported by the language. C++ structures can have this concept as it is inbuilt in the language. 17 | 5. Difference between pointers in C and reference in CPP 18 | 6. Difference between Malloc and New 19 | 7. Difference between delete and free 20 | -------------------------------------------------------------------------------- /IPC/questions/IPC.txt: -------------------------------------------------------------------------------- 1 | 1. Different types of IPC mechanisms: 2 | >A> Signals, Pipes, Socket, Message Queues, Semaphores, Shared memory 3 | 2. What are necessary conditions which can lead to a deadlock situation in a system? 4 | >A> Deadlock situations occur when four conditions occur simultaneously in a system: 5 | Mutual exclusion; Hold and Wait; No preemption; and Circular wait. 6 | 3. What are real-time systems? 7 | >A> Real-time systems are used when rigid time requirements have been placed on the operation of a processor. 8 | It has well defined and fixed time constraints. 9 | 4. What is time- sharing system? 10 | In a Time-sharing system, the CPU executes multiple jobs by switching among them, also known as multitasking. 11 | This process happens so fast that users can interact with each program while it is running. 12 | 5. Synchronization mechanisms inside Linux kernel 13 | 6. Race condition and deadlock 14 | 7. atomic operations 15 | 8. Semaphores 16 | 9. spin-lock , in single processer? 17 | 10. Mutex and Semaphore 18 | 11. Threads and process 19 | 11.1. Process vs thread ? when to use which ? 20 | 12. Multutasking and multithreading 21 | 13. Scheduling mechanism and types 22 | 14. client and server socket init 23 | 15. when to use message queues and socket 24 | 16. can we use pipe on different machine 25 | 17. in which IPC shared memory be used? 26 | 18. For communication between threads why we should use IPC, instead of global variables? 27 | 19. What are differences between process vs thread? How to decide using process or thread? Any tradeoff? Give me an example? 28 | 20. What are differences between semaphore vs mutex? Protect sharing resources? Signaling and synchronization? 29 | 21. What is dead-lock? How to avoid it? 30 | 22. difference between poll and select. 31 | 23. What are spin locks, are they better then mutex ? 32 | 24. What are the differences between spinlock and mutex? 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /TODO/PoC_Proof_of_Concept/questions/PoC.txt: -------------------------------------------------------------------------------- 1 | 1. What is a proof of concept (PoC), and why is it important in the development process? 2 | 2. Can you explain the typical process of creating a proof of concept? 3 | 3. What are the key objectives of a proof of concept? 4 | 4. How do you determine the scope and success criteria for a proof of concept? 5 | 5. What factors do you consider when selecting technologies or approaches for a proof of concept? 6 | 6. How do you gather and analyze requirements for a proof of concept? 7 | 7. What challenges or risks do you anticipate when working on a proof of concept, and how do you address them? 8 | 8. How do you validate and test the feasibility of a proof of concept? 9 | 9. How do you measure and evaluate the success of a proof of concept? 10 | 10. Can you provide an example of a successful proof of concept that you have worked on in the past? 11 | 11. How do you document and communicate the findings and results of a proof of concept to stakeholders? 12 | 12. What role does collaboration play in the development of a proof of concept? 13 | 13. How do you handle feedback and iterate on a proof of concept to improve its outcomes? 14 | 14. Can you discuss any limitations or potential pitfalls when working on a proof of concept? 15 | 15. How do you estimate the resources and timeline required for a proof of concept? 16 | 16. Have you ever encountered a failed proof of concept? If so, what were the reasons, and what did you learn from it? 17 | 17. How do you ensure that the insights and lessons learned from a proof of concept are effectively 18 | transitioned into the subsequent development phases? 19 | 18. How do you balance the need for speed in developing a proof of concept with ensuring quality and reliability? 20 | 19. How do you stay updated with emerging technologies and innovative approaches for conducting proof of concepts? 21 | 20. Can you share your approach to managing multiple proof of concepts simultaneously and prioritizing them effectively? 22 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/Linux_Kernel_Debugging.txt: -------------------------------------------------------------------------------- 1 | 1. What are available Kernel Debugging techniques ? 2 | 2. What is Oops and kernel panic? 3 | 3. Does all Oops result in kernel panic? 4 | 4. What are the tools that you have used for debugging the Linux kernel? 5 | 5. What are the log levels in printk? 6 | 6. Can printk's be used in interrupt context? 7 | 7. How to print a stack trace from a particular function? 8 | 8. What's the use of early_printk( )? 9 | 9. Explan about the various gdb commands. 10 | 10. How to debug crash. 11 | 11. How debug prints/system trace could help solve above issues 12 | 12. How to debug while system is running 13 | 13. Have you worked in crash dump? How will you solve memory crash, what steps would you take if a crash occurs? 14 | 14. how to debug your driver if u had any buffer issues 15 | 15. Kernel crash dump analysis. Have analyzed kernel panic code dump(what all 16 | data it dumps and what do you understand from it) ? 17 | 16. How to debug crash, what is the first line you see when you see a crash/oops message, explain crash console 18 | 17. How do u debug when an process aborted. 19 | 18. have u debug any issues using jtag/ any other debugger. if yes, how can we get the call stack in the debugger. 20 | 19. Tool/s to watch the kernel logs? 21 | 20. Dynamic debug using printk 22 | >A> 23 | Most kernel debugging is done via printk. The kernel supports changing the enable state of the printk on the fly using the dynamic debug feature. Some examples: 24 | dmesg -n 8 25 | echo "module xilinx_hdmi_rx +p" > /sys/kernel/debug/dynamic_debug/control 26 | echo "file drivers/media/* +p" > /sys/kernel/debug/dynamic_debug/control 27 | echo "file talon4k60.c +p" > /sys/kernel/debug/dynamic_debug/control 28 | echo "file xilinx-axis-switch.c +p" > /sys/kernel/debug/dynamic_debug/control 29 | echo "file media-entity.c +p" > /sys/kernel/debug/dynamic_debug/control 30 | echo 2 > /sys/class/video4linux/video0/dev_debug 31 | -------------------------------------------------------------------------------- /Device_drivers/README.md: -------------------------------------------------------------------------------- 1 | ## Useful links 2 | 3 | ### Device Drivers 4 | - [Oracle Documentation on Device Drivers](https://docs.oracle.com/cd/E23824_01/html/819-3196/eqbvu.html#scrolltoc) 5 | - [Platform drivers](https://www.kernel.org/doc/Documentation/driver-model/platform.txt) 6 | 7 | ### V4L2 / Media Framework 8 | - [Video4Linux V4L2 Design Specification](https://www.linuxtv.org/downloads/legacy/video4linux/v4l2dwgNew.html) 9 | - [V4L2 Controls API Documentation](https://www.linuxtv.org/downloads/v4l-dvb-apis-new/driver-api/v4l2-controls.html) 10 | - [V4L2 Driver API Documentation](https://www.linuxtv.org/downloads/v4l-dvb-apis-new/driver-api/) 11 | - [V4L-DVB API Documentation](https://www.linuxtv.org/downloads/v4l-dvb-apis-new/) 12 | - [Linux Kernel Media Controller API Documentation (v5.6)](https://www.kernel.org/doc/html/v5.6/media/uapi/mediactl/media-controller.html) 13 | - [Android Media Framework Documentation (Kernel Source)](https://android.googlesource.com/kernel/common/+/fa9355afd5b0/Documentation/media-framework.txt) 14 | 15 | ### DRM / KMS 16 | - [DRM/KMS Presentation (Brezillon)](https://events.static.linuxfound.org/sites/events/files/slides/brezillon-drm-kms.pdf) 17 | - [Intel Article: GPU vs Graphics Card](https://www.intel.com/content/www/us/en/products/docs/processors/what-is-a-gpu.html#:~:text=Graphics%20Card%3A%20What%27s%20the%20Difference,board%20that%20incorporates%20the%20GPU.) 18 | - [Linux Manpage: drm-gem(7)](https://www.systutorials.com/docs/linux/man/7-drm-gem/) 19 | - [Wikipedia: Framebuffer](https://en.wikipedia.org/wiki/Framebuffer) 20 | 21 | ### Others 22 | - [Linux Device Driver and Kernel Interview Questions - TutorialsDaddy](https://www.tutorialsdaddy.com/courses/linux-device-driver-and-linux-kernel-interview-question/lessons/linux-device-driver-interview-questions/) 23 | - [Linux Device Drivers Interview Questions - ClimbTheLadder](https://climbtheladder.com/linux-device-drivers-interview-questions/) 24 | 25 | ### HDMI 26 | - [ELC Europe 2017 - HDMI Presentation](https://elinux.org/images/5/53/Elce2017_0-hdmi.pdf) 27 | -------------------------------------------------------------------------------- /Version_Control_Systems/questions/GIT.txt: -------------------------------------------------------------------------------- 1 | 01. What are the advantages of using Git over other version control systems? 2 | 02. Explain the basic Git workflow. 3 | 03. What is the purpose of the .gitignore file? 4 | 04. How do you create and switch branches in Git? 5 | 05. What is a merge conflict? How do you resolve it? 6 | 06. Explain the difference between 'git pull' and 'git fetch'. 7 | 07. What is rebasing in Git? When would you use it? 8 | 08. What is the purpose of 'git revert' and 'git reset'? How do they differ? 9 | 09. What is a Git hook? 10 | 10. How do you squash commits in Git? 11 | 11. What is the command to stage all changes in the working directory in Git? 12 | 12. How do you undo the most recent commit in Git? 13 | 13. What is the purpose of the HEAD pointer in Git? 14 | 14. How do you view the commit history in Git? 15 | 15. What is the command to show the changes between two commits in Git? 16 | 16. Explain the difference between a fast-forward merge and a recursive merge in Git. 17 | 17. How do you rename a file in Git without losing its history? 18 | 18. How do you remove a file from staging in Git? 19 | 19. What is the difference between a remote and a local repository in Git? 20 | 20. How do you clone a Git repository? 21 | 21. What is Git bisect and how do you use it? 22 | 22. How do you list all branches in a Git repository? 23 | 23. What is the purpose of the .gitattributes file? 24 | 24. What is a submodule in Git? Give me practical example to use it. 25 | 25. How do you show the changes introduced by a specific commit in Git? 26 | 26. What is the difference between 'git merge' and 'git rebase'? 27 | 27. How do you revert a commit that has already been pushed and made public? 28 | 28. What is the purpose of the --no-ff flag in Git merge? 29 | 29. How do you amend the message of the most recent commit in Git? 30 | 30. How do you delete a branch in Git? 31 | 31. What is the purpose of the .gitkeep file? 32 | 32. How do you cherry-pick a commit in Git? 33 | 33. What is the purpose of the .git folder? 34 | 34. How do you undo the last commit but keep the changes in Git? 35 | -------------------------------------------------------------------------------- /Yocto/questions/Yocto.txt: -------------------------------------------------------------------------------- 1 | 1. Benefit of using Yocto over any other build tools 2 | >A> 3 | Architecture agnostic 4 | supports partial build 5 | Uses a layer model, so development parallelism can be achieve 6 | easily build stripped images for constrained embedded and IoT devices 7 | comprehensive toolchain large support & ecosystem 8 | 2. What is Open-Embedded & poky in Yocto? 9 | >A> 10 | Open-Embedded: Open source build engine 11 | poky: Open source reference embedded distribution 12 | 3. Difference between DEPENDS & RDEPENDS? 13 | 4. What is shared state cache in yocto? 14 | >A> Stores build generated intermediate files to speed up build process 15 | 5. What do u mean by task, function & class in yocto recipe? 16 | 6. What is PN in gstreamer1.0-plugins-good_1.16.3.bb? 17 | 7. What is PV in Yocto? 18 | 8. What is SRC_URI & FILESEXTRAPATHS? 19 | 9. What is WORKDIR? 20 | >A> Directory where bitbake compiles & build package. 21 | 10. What is S variable? 22 | >A> Directory where yocto unpack the source code. e.g. for git it is S = ${WORKDIR}/git 23 | 11. What is D variable? 24 | >A> Directory where components are installed by do_install task. e.g. Default it'll be at ${WORKDIR}/image 25 | 12. What is AUTOREV? 26 | >A> Takes latest source revision from repo 27 | 13. Difference between SRC_URI += and SRC_URI_append(override style)? 28 | >A> In append no additional space is added, just concatenating strings, while += adds additional space between strings. 29 | override style provides guaranteed operations. (+= does not append variable defined in class, while override style does) 30 | 14. What's the meaning of var ?= val 31 | 15. Set the default value of var to val. 32 | 16. Role of pkg-config 33 | >A> The primary use of pkg-config is to provide the necessary details for compiling and linking a program to a library. This metadata is stored in pkg-config files. 34 | 17. What is .bb and .bbappend file 35 | 18. Selecting particular version of a recipe 36 | >A> Using PREFREED_VERSION_recipename = "x.x.x" 37 | -------------------------------------------------------------------------------- /Generic/questions/generic_questions_experienced.txt: -------------------------------------------------------------------------------- 1 | 01. tell me about time management 2 | 02. tell me your best/worst time with a team 3 | 03. what was the most painful lesson you've learned on a project 4 | 04. what's your process for keeping organized if you have lots of things to switch to 5 | 05. most rewarding thing you've worked on 6 | 06. tell me about your project management 7 | 07. why do you think you are self-sufficient in debugging concepts? 8 | 08. what was the worst team you've worked on. why was it the worst 9 | 09. what was the best team you've worked on. why was it the best. 10 | 10. whats an example of a time you realized there was a communication problem, and what did you do to fix it? 11 | 11. you need help from another group. they ignore your emails. what do you do ? 12 | 12. give me a 2 minute summary of the XYZ project 13 | 13. give me an example of a project you had to research, plan out and schedule tasks for other engineers 14 | to accomplish. how did you explain and summarize it to managers in meetings? 15 | 14. How do you handle stress and pressure in job? 16 | 15. What can you do for us that other candidates can't? 17 | 16. When were you most satisfied in your job? 18 | 17. Why should we hire you? 19 | 18. Describe your work style. 20 | 19. What have you been doing since your last job? 21 | 20. How are you different from the competition? 22 | 21. How would your co-workers describe your personality? 23 | 22. Why are you leaving your job? 24 | 23. Why have you been out of work so long? 25 | 24. Where do you see yourself 5 years from now? 26 | 25. What will you do if you don't get this position? 27 | 26. How does this job fit in with your career plan? 28 | 27. What motivates you? 29 | 28. What is your dream job? 30 | 29. Describe a time when your workload was heavy and how you handled it. 31 | 30. Describe a difficult work situation or project and how you overcame it. 32 | 31. What type of work environment do you prefer? 33 | 32. What problems have you encountered at work? 34 | 33. What is the biggest criticism you received from your boss? 35 | 34. What do people most often criticize about you? 36 | 35. Do you prefer to work independently or on a team? 37 | 36. What challenges are you looking for in a position? 38 | 37. Do you have any questions for me? -------------------------------------------------------------------------------- /Embedded_systems/questions/Embedded_systems.txt: -------------------------------------------------------------------------------- 1 | 1. what embedded systems experience do you have 2 | 2. Difference between Microcontroller and Microprocessor 3 | 3. Address bus / Data bus 4 | 4. What is clock in controller ? Types of clocks in controller. 5 | 5. What is Embedded system 6 | 6. Types of memory and difference between them 7 | 7. Difference between OS and RTOS 8 | 8. Basic protocols understanding, pins, difference, limitations and how they works : UART, SPI, I2C, 9 | 9. UART 10 | 9.1. UART protocol understanding. How data being transferred using UART. ? 11 | 9.2. what is baudrate? Difference between bitrate and baudrate? On which baudrate you have used UART ? 12 | 9.3. What maximum baudrate supported for UART. 13 | 9.4. Ever heard of USART. What is it ? 14 | 10. I2C 15 | 10.1. How to read/write data between I2C bus 16 | 10.2. Does it supports multi-master ? How ? 17 | 11. SPI 18 | 11.1. Does it supports multi-master ? >A> NO: 19 | 11.1.1. why it is not supporting ? 20 | 11.2. How to xfer data between multiple slave/master using SPI 21 | 11.3. Is there any acknowledgement received for data that we sent using SPI ? Is there in I2C ? 22 | 12. What is DMA ? 23 | 13. What is interrupt ? How to use it ? 24 | 14. What is ISR ? 25 | 14.1. Is it okay to use sleep in ISR ? 26 | 14.2. Can we pass parameters/return type in ISR ? 27 | 14.3. Can we use any function in ISR ? 28 | 15. What happened when interrupt occurs ? 29 | 16. Interrupt latency and turnover time 30 | 17. Timers in Microcontroller. How to generate 1sec. of timer ? 31 | 18. Watchdog timer. Use of it. 32 | 19. What is IoT ? 33 | 20. What is a segmentation fault ? What are the reasons of occurrence of the same ? 34 | 21. Types of Endianness. Difference between them. How to check Endianness using C program. 35 | 22. What is Flash memory ? NAND flash vs NOR flash difference. 36 | 23. Difference bet Asynchronous and Synchronous communication 37 | >A> 38 | - No common clk in Async, In sync shared clk 39 | - Async send 1 byte at a time, sync sends data in form of blocks/frames 40 | - Async slower compared to sync 41 | - Async can communicate longer distance 42 | - Async use start/stop bit for data sync 43 | - Async: RS232, RS485 Sync: I2C, SPI 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Device_drivers/questions/V4L2_Media_Framework_Driver.txt: -------------------------------------------------------------------------------- 1 | 1. What are the specific sequence of IOCTL calls follow to capture a video using 2 | v4l2 device? 3 | >A> After opening the device follow below IOCTLs in order to capture a video: 4 | 1. VIDIOC_QUERYCAP: check capabilities of the video device 5 | 2. VIDIOC_S_FMT: Configure the desired video format, including resolution 6 | and pixel format 7 | 3. VIDIOC_REQBUFS: Request a set number of buffers for memory mapping. 8 | This sets up the memory for storing captured frames 9 | 4. VIDIOC_QUERYBUF: Request a pointer for each buffer that can be mapped 10 | into the application’s memory space 11 | 5. VIDIOC_QBUF: Queue the buffers to prepare them for use in capturing 12 | video frames 13 | 6. VIDIOC_STREAMON: Begin the video capture process, allowing the device 14 | to start filling buffers with video data. 15 | 7. VIDIOC_DQBUF: Capture video frames by dequeuing filled buffers, 16 | processing the data, and then re-queueing the buffers again using 17 | VIDIOC_QBUF. 18 | 8. VIDIOC_STREAMOFF: End the video capture process, stopping the device 19 | from filling buffers with video data. 20 | and, at last, unmap the buffers and close the device. 21 | 2. Which IOCTL is used to query the capabilities of devices? 22 | >A> VIDIOC_QUERYCAP 23 | 3. Difference between struct video_device, v4l2_subdev and struct v4l2_device ? 24 | >A> struct video_device: 25 | - Lower-level, represents a single video device(e.g. /dev/video0) 26 | - Used to register and manage individual video devices 27 | - Handles device-specific operations, file I/O, and capabilities for an 28 | individual video device node 29 | struct v4l2_subdev: 30 | - Lower-level, represents a specific component or peripheral within the 31 | video device system 32 | - Provides specific functionality within the video device system, such as 33 | handling image sensors, video scaler, or other components 34 | - Used for implementing and managing specific functionalities within a 35 | larger video device system 36 | struct v4l2_device: 37 | - Higher-level, manages multiple video devices and sub-devices within a 38 | driver 39 | - Provides a framework for initializing, registering, and managing the 40 | overall state of video devices in a driver 41 | - Used for coordinating multiple devices and sub-devices, managing 42 | driver-level resources 43 | 4. How v4l2 Sub devices are created ? 44 | >A> using v4l2_device_register_subdev 45 | -------------------------------------------------------------------------------- /SoftSkills/questions/Logical_puzzles.txt: -------------------------------------------------------------------------------- 1 | 01. You have 8 balls, all are idential in looks, however one of them is few grams lighter. 2 | Using a balance scale, find the lighter ball in exactly 2 weighings. 3 | 02. You have a 5-liter and a 3-liter mug. Measure exactly 4 liters using these two mugs. 4 | 03. You need to cross a bridge at night in 15 minutes. Four people must cross with one flashlight: 5 | A takes 1 minute, B takes 2 minutes, C takes 5 minutes, and D takes 8 minutes. Only two people 6 | can cross at once, and they must share the flashlight. How can all four people cross in time? 7 | 04. A car has four tires and one spare tire. Each tire can travel a maximum of 20,000 kilometers. 8 | What is the maximum distance the car can travel if tires can be interchanged as needed? 9 | 05. You have 15 rupees. Each chocolate costs 1 rupee, and for every 3 chocolate wrappers, you can 10 | get one more chocolate. What is the maximum number of chocolates you can get? 11 | 06. A man falls into a 50-meter-deep well. He climbs 4 meters up each day but slips back 3 meters 12 | each night. How many days will it take for him to get out of the well? 13 | 07. You have a room with a lightbulb inside and three switches outside the room. You can flip the 14 | switches any way you want, but you can only enter the room once. How can you determine which 15 | switch controls the lightbulb? 16 | 08. How can you cut a round cake into 8 equal pieces using only 3 cuts? 17 | 09. You have 25 horses and want to find the 3 fastest ones. You can race only 5 horses at a time, 18 | and there’s no way to measure their actual speed. What is the minimum number of races required 19 | to determine the 3 fastest horses? 20 | 10. A prisoner is asked to make a statement. If his statement is true, he will be hanged; if it’s 21 | false, he will be shot. What statement can he make to stay alive? 22 | 11. How many times can you subtract the number 5 from 35? 23 | 12. Before the days of motor vehicles, a man rode into town on his horse and arrived on Sunday. He 24 | spent three days in town and left on Sunday. How is this possible? 25 | 13. A man drove his car all the way from Shimla to Delhi only to discover at the end of the trip that 26 | he had a flat tire from the very start. Yet, his car was unaffected. How is this possible? 27 | 14. There are three containers. One has only red marbles, one has only yellow marbles, and the third 28 | has both red and yellow marbles. All the containers are mislabeled. If you can take only one marble 29 | from one container to examine, how can you correctly label each container? 30 | 15. You have two ropes, each of which takes an hour to burn, but they burn at inconsistent rates. How 31 | can you measure 45 minutes using only these ropes? 32 | 16. You need to cross a river with a lion, a goat, and some grass. You can take only one across at a 33 | time. If left alone, the lion will eat the goat, and the goat will eat the grass. How can you get 34 | all three across the river safely? 35 | 17. Add arithmetic operators (plus, minus, multiplication, divide, percentage, modulo) to make the 36 | following expression true: 37 | 3 1 3 6 = 8. You can use any parentheses you’d like. 38 | 18. 39 | -------------------------------------------------------------------------------- /Data_structures/questions/Data_structures.txt: -------------------------------------------------------------------------------- 1 | 1. What is Linkedlist ? types of Linkedlist and difference between them. 2 | 2. Difference between array and Linkedlist ? when to use which ? 3 | 3. How does a linkedlist work ? How to insert / delete nodes from Linkedlist? 4 | 4. How to traverse from Linkedlist ? and count the number of Linked List elements. 5 | 5. What is the difference between singly linked list and doubly linked list. 6 | 6. What is the difference between tree and graph 7 | 7. What is the complexity of searching in binary tree 8 | 8. What is stack and queue data structures ? difference between them. 9 | 9. Real time examples of stack and queue 10 | 10. What is the difference between binary search and normal search ? How binary search works? Time complexity of both ? 11 | 11. searching algorithms and its time/space complexity 12 | 12. sorting algorithms and its time/space complexity 13 | 13. What is binary search tree and its advantages? 14 | 14. Hashing. Use of hashing. 15 | 16 | Programs: 17 | 18 | 1. Implement Stack using array. 19 | 2. Convert program implemented in 1 from stack to queue 20 | 3. Implement Stack using singly linked list 21 | 4. Convert program implemented in 3 from stack to queue. (Make sure complexity is O(1) ) 22 | 5. Given a string, find character with maximum repetition. (Acceptable complexity is O(n) ) 23 | 6. Given head pointer of singly linked list, find 4th last element of linked list. (Acceptable complexity is O(n) ) 24 | 7. Given a head of sorted linked list of integers, write a routine to insert new element in linked list. 25 | 8. Given a pointer to the root of a binary search tree and a value to be inserted into the tree. 26 | Insert this value into its appropriate position in the binary search tree and return the root 27 | of the updated binary tree. 28 | 9. Given a root of binary tree, write a function for preorder traversal of the tree 29 | 10. Given a root of binary tree, write a function to find height of the tree. 30 | 11. Given a sorted array, write a function to find given element in array. 31 | 12. Write a program to delete a given node number in Single linked list. 32 | 13. How to search a book in one million books. 33 | 14. How to check whether a linked list is circular. 34 | 15. Write code to remove duplicates from an unsorted linked list. How would you solve 35 | this problem if a temporary buffer is not allowed? 36 | 16. Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node. 37 | e.g. 38 | Input: the node ‘c’ from the linked list a->b->c->d->e 39 | Result: nothing is returned, but the new linked list looks like a->b->d->e 40 | 17. You have two numbers represented by a linked list, where each node contains a single 41 | digit. The digits are stored in reverse order, such that the 1’s digit is at the head of 42 | the list. Write a function that adds the two numbers and returns the sum as a linked list. 43 | e.g. 44 | Input: (3 -> 1 -> 5) + (5 -> 9 -> 2) 45 | Output: 8 -> 0 -> 8 46 | 18. Imagine a stack of plates. If the stack gets too high, it might topple. Therefore, 47 | in real life, we would likely start a new stack when the previous stack exceeds some threshold. 48 | Implement a data structure that mimics this. It should be composed of several stacks, 49 | and should create a new stack once the previous one exceeds capacity. push() and pop() 50 | should behave identically to a single stack(that is, pop() should return the same values 51 | as it would if there were just a single stack). 52 | 19. 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TheEmbeDEADInterview 2 | 3 | Welcome to TheEmbeDEADInterview questions repository! This repository is a collection of interview questions and resources for various embedded verticals. Whether you're a job seeker preparing for an interview or an interviewer looking for questions to assess candidates, this repository aims to provide a wide range of topics to cover. 4 | 5 | ## Table of Contents 6 | 7 | - [Introduction](#introduction) 8 | - [Getting Started](#getting-started) 9 | - [Topics Covered](#topics-covered) 10 | - [Contributing](#contributing) 11 | - [Similar sources](#similar-sources) 12 | 13 | ## Introduction 14 | 15 | This repository serves as a comprehensive resource for anyone interested in embedded systems and related domains. It contains a curated list of interview questions covering a wide range of topics, including baremetal programming, networking, multimedia, Embedded programming languages (C, C++, Python), version control with Git, Linux kernel programming, device driver development, soft skills required in interviews, HR questions, data structures, hardware abstraction layers (HAL), inter-process communication, Yocto Project, and more. 16 | 17 | Whether you are a beginner or an experienced professional, this repository aims to help you prepare for interviews, expand your knowledge, and enhance your understanding of embedded systems. 18 | 19 | ## Getting Started 20 | 21 | To access the interview questions and resources in this repository, you can either clone the repository to your local machine or explore the content directly on the GitHub web interface. 22 | 23 | ## Topics Covered 24 | 25 | The interview questions in this repository are organized into folders based on the various embedded verticals. Here's an overview of the topics covered: 26 | 27 | NOTE: Questions are not yet added for some of below topics, star/watch/fork the repository and stay tuned for future updates. 28 | - ATF and ARM TrustZone 29 | - BSP Porting Bringup 30 | - Bootloader 31 | - C 32 | - CPP 33 | - C+CPP 34 | - Client communications 35 | - Debugging tools 36 | - Hardware Debugging(DSO,CRO,Logic Analyzer,Spectrum Analyzer) 37 | - Software Debugging(ADB,GDB,JTAG,KGDB) 38 | - Development tools(Bit-Bucket,CVS,Confluence,JIRA,SourceTree) 39 | - Device drivers(ALSA,Bluetooth,DRM,Device-Tree,Ethernet,PCI, 40 | SCSI,I2C,UART,SPI,USB,WLAN,NFC,Network,SATA,V4L2) 41 | - Documentations 42 | - Embedded systems 43 | - File Systems 44 | - Version Control Systems 45 | - Generic(/HR) 46 | - HAL(Hardware Abstraction Layer) 47 | - IPC(Inter Process Communication) 48 | - Leadership and Management 49 | - Linux Kernel(Internals,Debugging,Boot,Process Management,Linux FileSystems) 50 | - Multimedia(GStreamer, Basics, Video Coding, GPU) 51 | - PoC(Proof of Concept) 52 | - Protocols(Networking, Display Interface, Wireless Display) 53 | - Quality Processes(Agile,CMMi) 54 | - SoftSkills 55 | - Toolchains 56 | - Yocto 57 | 58 | Feel free to explore the folders and dive into the specific areas that interest you or align with your interview preparation needs. 59 | 60 | ## Contributing 61 | 62 | Contributions to this repository are highly encouraged. If you have additional interview questions, resources, or improvements to existing content, please follow these steps to contribute: 63 | 64 | 1. Fork the repository to your own GitHub account. 65 | 2. Create a new branch for your changes. 66 | 3. Make your modifications/additions. 67 | 4. Commit and push your changes to your branch. 68 | 5. Open a pull request from your branch to the main repository. 69 | 6. Provide a clear description of your changes and their relevance. 70 | 71 | Your contributions will help make this repository more valuable and beneficial for the entire embedded community. 72 | 73 | ## Similar sources 74 | 75 | 1. [TheEmbeddedNewTestament](https://github.com/theEmbeddedGeorge/theEmbeddedNewTestament.github.io/tree/master) 76 | 2. [AwesomeEmbedded](https://github.com/nhivp/Awesome-Embedded) 77 | 3. [Awesome-C](https://github.com/uhub/awesome-c) 78 | 4. [Awesome Embedded Systems](https://github.com/embedded-boston/awesome-embedded-systems) 79 | 80 | 81 | ## Star History 82 | 83 | [![Star History Chart](https://api.star-history.com/svg?repos=imsunilvaghela/TheEmbeDEADInterview&type=Date)](https://star-history.com/#imsunilvaghela/TheEmbeDEADInterview&Date) 84 | 85 | 86 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/Process_Management_scheduling.txt: -------------------------------------------------------------------------------- 1 | 1 . Given a pid, how will you distinguish if it is a process or a thread ? 2 | 2 . What is the difference between kill-6 and kill -9? 3 | 3 . Differentiate between threads and processes 4 | 4 . how a function from one user process can be called in other user process? 5 | 5 . Cache coherency mechanism. 6 | 6 . How to find a child process in linux/unix.? 7 | 7 . context switch.. when do u need it. 8 | 8 . What are the different schedulers class present in the linux kernel? 9 | 9 . How to create a new process? 10 | 10. What is the difference between fork( ) and vfork( )? 11 | 11. Which is the first task what is spawned in linux kernel? 12 | 12. What are the processes with PID 0 and PID 1? 13 | 13. How to extract task_struct of a particular process if the stack pointer is given? 14 | 14. What is process kernel stack and process user stack? What is the size of each and how are they allocated? 15 | 15. Why do we need seperate kernel stack for each process? 16 | 16. What all happens during context switch? 17 | 17. What is thread_info? Why is it stored at the end of kernel stack? 18 | 18. What is the use of preempt_count variable? 19 | 19. What is the difference between interruptible and uninterruptible task states? 20 | 20. How processes and threads are created? (from user level till kernel level) 21 | 21. How to proceed if system is sluggish 22 | 22. How system call causes change from user to kernel space 23 | 23. How to determine if some high prio task is hogging CPU 24 | 24. Priority inversion, priority inheritance, priority ceiling 25 | 25. How priority inheritance will work 26 | 26. What is Process preemption 27 | 27. About priority inversion & priority inheritance 28 | 28. Process Memory Layout 29 | 29. Explain about process address space with data seg,code seg.. 30 | 30. how much memory is occupied by process address spcae. 31 | 31. When a same executable is excuted in two terminals like terminal 1 execute ./a.out and terminal 2 executed ./a.out what will the programe address space look like on RAM 32 | 32. If a global variable defined as int V1=100 in programm_1 and modified this V1=200 in programme_2. what will be printed in Programme_1 and Programme_2. 33 | 33. what is diff b/w process and threads? 34 | 34. Will threads have their own stack space? 35 | 35. can one thread access the address space of another thread? 36 | 36. What is task_struct and how are task states maintained ? 37 | 37. how to manipulate the current process. 38 | 38. what are kernel thread. 39 | 39. how threads are implemented in linux kernel. 40 | 40. What are different state of a process in lunix. 41 | 41. what is difference between process and thread. 42 | 42. generally what resources are shared between threads. 43 | 43. what is process descriptor 44 | 44. what is task_struct. 45 | 45. what is therad_info structure for. 46 | 46. what was the need of thread_info structure. 47 | 47. difference betwen fork() and vfork() 48 | 48. what is process context. 49 | 49. what is zombie process. 50 | 50. how parent less process is handles in linux. 51 | 51. what is process scheduling 52 | 52. what is cooperative multitasking and pre-emptive multitasking. 53 | 53. what is yielding. 54 | 54. what is limitation of cooperative multitasking. 55 | 55. I/O bound versus Processor bound process. 56 | 56. what is process priority. 57 | 57. What kind of priority is maintained in linux. 58 | 58. what is nice value 59 | 59. what is virtual run time 60 | 60. what are the available scheduling classes in linux. 61 | 61. which type os scheduling used in linux. 62 | 62. how next task is picked for scheduling. 63 | 63. what is scheduler entry point in linux. 64 | 64. what is waitqueus. 65 | 65. How context switching is handled in linux. 66 | 66. what is user preemption and kernel preemption 67 | 67. How does scheduler picks particular task? 68 | 68. When does scheduler picks a task? 69 | 69. How is timeout managed? 70 | 70. How does load balancing happens? 71 | 71. Explain about any scheduler class? 72 | 72. Explain about wait queues and how they implemented? Where and how are they used? 73 | 73. What is process kernel stack and process user stack? What is the size of each and how are they allocated? 74 | 74. Why do we need seperate kernel stack for each process? 75 | 75. What all happens during context switch? 76 | 76. What is thread_info? Why is it stored at the end of kernel stack? 77 | 77. What is the use of preempt_count variable? 78 | 78. What is the difference between interruptible and uninterruptible task states? 79 | 79. How processes and threads are created? (from user level till kernel level) 80 | 80. How is virtual run time (vruntime) calculated? 81 | 81. Different types of schedulers (round robin, pre-emptive) 82 | 82. what is scheduler algoritham? 83 | 83. what is scheduler? 84 | 84. Can a scheduler can be locked? 85 | 85. who schedules the scheduler? 86 | 86. At what frequency scheduler looks for threads/processes ready for schedule? 87 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/Kernel_Topics.txt: -------------------------------------------------------------------------------- 1 | 1. Building the Kernel Source Code – Done 2 | 2. Embedded Linux Kernels 3 | 3. BSPs and SDKs 4 | 4. Linux References (Books and Online) 5 | 5. BSP Requirements 6 | 6. U-Boot and Bootloader Development 7 | 7. Embedded Linux BSP Development Basics 8 | 8. Basic BSP Development 9 | 9. Files and Filesystem Support 10 | 10. The I/O Subsystem: Talking to Hardware 11 | 11. Memory Management and Paging 12 | 12. Error Handling in Embedded Linux BSPs 13 | 13. Timing and Timers 14 | 14. Interrupt and Exception Handling in BSPs 15 | 15. BSP Deployment Issues and Practices 16 | 16. Embedded Linux SDK Basics 17 | 17. The 3 Pieces of an SDK 18 | 18. Embedded Linux Distributions and the GNU Compiler Collection (GCC) 19 | 19. Other Embedded Linux Development Tools 20 | 20. Library Support, Glibc and Alternatives 21 | 21. SDK Deployment and Support 22 | 22. Debugging 23 | 23. GDB, GDB Server and the GDB Server Debugger 24 | 24. Other Debug and Test Tools 25 | 25. An Eclipse Remote Debug Example 26 | 26. Advanced Debug with printk and syslogd 27 | 27. System-Level Debug 28 | 28. System-Level Debug Tools 29 | 29. The /proc and sys Filesystems 30 | 30. Advanced Logging Methods 31 | 31. KGDB and KDB 32 | 32. Crash Dumps 33 | 33. Debugging Embedded Linux Systems 34 | 34. Configuring Embedded Linux 35 | 35. Config Methods 36 | 36. Config Syntax 37 | 37. Adding Code to the Linux Kernel 38 | 38. Booting Embedded Linux 39 | 39. Processor Startup 40 | 40. Initial Functions 41 | 41. The initcalls 42 | 42. Using __init Functions 43 | 43. NFS Booting 44 | 44. Root File Systems 45 | 45. RAMdisk Booting with initrd 46 | 46. RAMdisk Booting with initramfs 47 | 47. initrd vs initramfs 48 | 48. Root File System Development 49 | 49. Busybox Development 50 | 50. Building a RAMdisk for an initrd 51 | 51. Building a RAMdisk for an initramfs 52 | 52. Flash File System Development 53 | 53. Testing and Debug of Embedded Linux BSPs 54 | 54. Kernel Debug and Kernel Probes 55 | 55. Kexec and Kdump 56 | 56. The Linux Test Project (LTP) 57 | 57. Performance Tuning Embedded Linux BSPs 58 | 58. Virtualization 59 | 59. Measuring Embedded Linux BSP Performance 60 | 60. Common Considerations 61 | 61. Uncommon Considerations 62 | 62. BootLoader Optimizations 63 | 63. Boot Time Measurements 64 | 64. Effective Memory and Flash Usage 65 | 65. Filesystem Performance Measurement 66 | 66. Some Ideas on Performance Measurement 67 | 67. The Original UNIX Device Driver Model 68 | 68. The fops and file structs 69 | 69. The inode and dentry structs 70 | 70. Major and Minor Numbers 71 | 71. Embedding Channel Information 72 | 72. Deferring Work 73 | 73. The /proc Filesystem 74 | 74. Configuring the Device Driver 75 | 75. A Simulated Device Driver 76 | 76. Modularization Revisited 77 | 77. The Evolution of a New Driver Model 78 | 78. The Initial Object-Oriented Approach 79 | 79. Platform Devices and Drivers 80 | 80. A Generic Subsystem Model 81 | 81. The Generic Subsystem Model in Detail 82 | 82. Subsystem Registration 83 | 83. The Probe and Init Functions 84 | 84. The Show and Store Functions 85 | 85. User Access via the /sys Filesystem 86 | 86. Configuring the New Device Driver 87 | 87. The udev Linux Application 88 | 88. Comparing the Two Driver Models 89 | 89. The Flattened Device Tree (FDT) 90 | 90. openBoot and its Effect on Embedded Linux 91 | 91. The Device Tree Script (dts) File 92 | 92. The Device Tree Compiler (dtc) 93 | 93. The Device Tree Blob (dtb) File 94 | 94. Building a dtb File 95 | 95. Hybrid Device Drivers 96 | 96. Other fops Functions 97 | 97. The Need for Ioctl 98 | 98. Linux Device Driver Subsystems 99 | 99. Direct Connect Device Drivers 100 | 100. Serial/Console Drivers, I2C & SPI 101 | 101. Real-Time Clocks and Watchdogs 102 | 102. GPIO and the Pinmux 103 | 103. Flash MTDs and Direct Memory Access 104 | 104. USB, Power and CPU Management 105 | 105. Video and Audio 106 | 106. PCI and VME 107 | 107. Block Devices 108 | 108. RAMdisk and Flash Filesystems 109 | 109. MMCs and SD Cards 110 | 110. Network Device Drivers 111 | 111. MAC and PHY Device Drivers 112 | 112. net_device and net_device_stats 113 | 113. Network Device Initialization 114 | 114. Device Discovery and Dynamic Initialization 115 | 115. Network Interface Registration 116 | 116. Network Interface Service Functions 117 | 117. Receiving and Transmitting Packets 118 | 118. Notifier Chains and Device Status Notification 119 | 119. Unwired Device Drivers 120 | 120. Wireless Device Drivers (WiFi, WLAN) 121 | 121. Bluetooth and BlueZ 122 | 122. Infrared and IrDA 123 | 123. Cellular from 2G to 5G 124 | 124. Drivers in User Space 125 | 125. Accessing I/O and Memory Regions 126 | 126. User Mode SCSI, USB and I2C 127 | 127. UIO 128 | 128. High-Speed Interconnects 129 | 129. PCIe 130 | 130. iSCSI 131 | 131. Infiniband 132 | 132. FibreChannel 133 | 133. Debugging Device Drivers 134 | 134. kdb, kgdb and JTAG 135 | 135. Kernel Probes 136 | 136. Kexec and Kdump 137 | 137. Kernel Profiling 138 | 138. User Mode Linux 139 | 139. Performance Tuning Device Drivers 140 | 141 | 142 | TOPICS: 143 | http://motionzen.com/training/embedded-linux-training-in-bangalore-chennai 144 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/DMA_in_Kernel.txt: -------------------------------------------------------------------------------- 1 | 01. What is DMA in the context of the Linux kernel? 2 | 02. How does DMA work in the Linux kernel? 3 | 03. Explain the purpose of DMA in a computer system. 4 | 04. What are the advantages of using DMA over CPU-based data transfers? 5 | 05. Describe the main components involved in DMA transfers in the Linux kernel. 6 | 06. How does the Linux kernel manage DMA transfers? 7 | 07. What is a DMA controller, and how is it used in the Linux kernel? 8 | 08. Discuss the different types of DMA transfers supported in the Linux kernel. 9 | 09. Explain the concept of DMA channels and their significance in the Linux kernel. 10 | 10. How does the Linux kernel handle virtual addressing and physical addressing during DMA transfers? 11 | 11. What are the potential challenges or issues that can arise when using DMA in the Linux kernel? 12 | 12. Describe the steps involved in setting up a DMA transfer in the Linux kernel. 13 | 13. What is the role of DMA mapping functions in the Linux kernel? 14 | 14. How does the Linux kernel ensure data integrity and synchronization during DMA transfers? 15 | 15. Discuss the methods available in the Linux kernel for handling DMA errors or failures. 16 | 16. What is importance of dma_set_mask()? 17 | 17. What is difference between dma_set_mask() and dma_set_coherent_mask()? 18 | 18. What do you understand by coherent in the context of DMA? 19 | >A> 20 | In the context of the Linux kernel and system programming, the term "coherent" often refers 21 | to memory coherence or cache coherence. 22 | 23 | 1. Memory Coherence: 24 | Memory coherence ensures that any read of a memory location returns the most recent write to 25 | that memory location. This is crucial in multi-core or multi-processor systems where multiple 26 | CPUs might be accessing or modifying the same memory locations. 27 | 28 | 2. Cache Coherence: 29 | Cache coherence is a consistency mechanism that ensures all caches in a multi-core system reflect 30 | the most recent data in memory. If one core modifies a memory location, other cores with cached 31 | copies of that memory must see the updated value. 32 | 33 | In the Linux kernel, when you see terms like "coherent memory," "coherent DMA," or "coherent API," 34 | it generally means: 35 | I. Coherent Memory Allocation: The memory allocated is cache-coherent, meaning any changes made by one 36 | processor (or DMA device) are immediately visible to other processors without requiring explicit 37 | cache management (such as flushing or invalidating caches). 38 | 39 | II. Coherent DMA (Direct Memory Access): In the context of DMA, coherent memory ensures that the device 40 | can directly read/write to memory without needing to worry about stale data in CPU caches. This avoids 41 | the complexity of managing caches manually. 42 | 43 | For example, in the DMA API, functions like dma_alloc_coherent allocate memory that is guaranteed to be 44 | coherent, meaning the CPU and the DMA device can both access it without worrying about cache 45 | inconsistencies. 46 | 47 | 19. What is CMA(Continuous memory allocator)? Was is the need of it ? 48 | 20. What is Dual(/Double)-Address Cycle(DAC) and Single-Address Cycle(SAC) in DMA? 49 | 21. What are different modes or models that DMA controller can support? 50 | >A> Single-adress, Dual-Address, 1D, 2D, 3D 51 | 22. What are the types of DMA Mappings are avaialble ? 52 | >A> 53 | 1. Consistence DMA mappings ("synchronous" or "coherent") 54 | Consistent DMA mappings which are usually mapped at driver initialization, unmapped at 55 | the end and for which the hardware should guarantee that the device and the CPU can 56 | access the data in parallel and will see updates made by each other without any explicit 57 | software flushing. 58 | 2. Streaming DMA mappings ("asynchronous" or "outside the coherency domain") 59 | Streaming DMA mappings which are usually mapped for one DMA transfer, unmapped right after it 60 | (unless you use dma_sync_* below) and for which hardware can optimize for sequential accesses. 61 | 23. What is use of struct dma_pool & dma_pool_* APIs ? 62 | 24. DMA directions 63 | >A> 64 | 1. DMA_NONE no direction (used for debugging) 65 | 2. DMA_TO_DEVICE data is going from the memory to the device 66 | 3. DMA_FROM_DEVICE data is coming from the device to the memory 67 | 4. DMA_BIDIRECTIONAL direction isn't known 68 | 25. How CMA memory reserved in the Kernel ? 69 | 26. What is difference between DMA descriptor and DMA buffer? 70 | >A> 71 | - DMA descriptors are data structures that describe a DMA transfer. They contain information 72 | such as the source and destination addresses, transfer size, transfer direction, and any 73 | additional control flags or parameters. 74 | - DMA descriptors are typically used by DMA controllers or DMA engines to manage and execute 75 | DMA transfers efficiently. They provide a detailed description of the data transfer to be 76 | performed. 77 | - DMA buffers, also known as DMA memory buffers or simply DMA buffers, are regions of memory 78 | allocated for DMA operations. They serve as the source or destination of data during DMA 79 | transfers. 80 | - DMA buffers are often managed by the operating system's memory management subsystem and 81 | may be allocated, mapped, and deallocated by device drivers or other kernel components. 82 | 83 | -------------------------------------------------------------------------------- /Multimedia/questions/multimedia_basics.txt: -------------------------------------------------------------------------------- 1 | 1. What is difference between YUV and RGB ?  Why there will be need of YUV color format apart from RGB? 2 | >A> 3 | YUV: support different modes: 4 | Packed: One memory region storing all components (Y, U and V) 5 | Semiplanar: One memory region for Y component and one for UV components 6 | Planar: One memory region for each component 7 | Each memory region storing a frame component (Y, U or V) is called a plane 8 | 2. NTSC, PAL, SD, HD, Full HD, 4K, DCI 4K and 8K – Give me exact width x height for each one. 9 | 3. Difference between NTSC and PAL , 4K and DCI4K resolutions. ? 10 | 4. Progressive vs Interlaced scanning 11 | 5. Chrominance and luminance 12 | 6. What are various image formats? What are 4:4:4, 4:2:2 etc. Sampling ? 13 | 7. What are different color spaces like RGB, YUV ? How would YUV pixel values look like for a green, 14 | blue, red, black and white color pixels for suppose 8 bit per color space? 15 | 8. What is difference between planar, semiplanar and multiplanar ? 16 | >A> 17 | - https://stackoverflow.com/questions/22215484/what-is-difference-between-planar-semi-planar-and-interleaved-format 18 | - https://docs.kernel.org/userspace-api/media/v4l/pixfmt-yuv-planar.html 19 | 9. What are Integer and Fractional framerate ? What is the need for fractional framerate ? 20 | 10. Video formats and its understanding: e.g. NV12/YUV420 - How pixels are arranged 21 | 11. YUV420, YUV422, YUV444 chroma subsampling schemes understanding and single frame size calculation 22 | >A> 23 | YUV420 - 1 Cb & 1 Cr samples per 4 luma samples 24 | YUV422 - 2 Cb & 2 Cr samples per 4 luma samples 25 | YUV444 - 4 Cb & 4 Cr samples per 4 luma samples 26 | 27 | Size of 1920 * 1080 28 | YUV420 8-bit ==> 1920 * 1080 * (1 + 2/4) ==> 1920 * 1080 * 1.5 29 | YUV422 8-bit ==> 1920 * 1080 * (1 + 4/4) ==> 1920 * 1080 * 2 30 | YUV444 8-bit ==> 1920 * 1080 * (1 + 8/4) ==> 1920 * 1080 * 3 31 | 12. What is I, P, B frames 32 | 13. Difference between codec and container 33 | 14. What's the purpose of encoding & decoding video? 34 | 15. What is stride in video ? 35 | >A> 36 | The stride or pitch is the number of bytes from the first pixel of a line to the first pixel of 37 | the next line of video. In the simplest case, the stride equals the width multiplied by the bits 38 | per pixel, converted to bytes. For example, AR24 requires 32 BPP which is four bytes per pixel. 39 | A video buffer with an active area of 1920 x 1080 pixels therefore has a stride of 4 x 1920 = 7,680 bytes. 40 | 16. What is PSNR (peak signal-to-noise ratio) ? 41 | 17. HDR/HDR10, HDR10+, HLG 42 | 18. Advantage of yuv over RGB format 43 | 19. What is VSync (Vertical sync) in the context of video bus timing diagram? 44 | >A> 45 | The synchronization signal that marks the end of a frame and the beginning of the next frame 46 | vertically. It helps maintain proper timing and synchronization between the display and the 47 | video source 48 | 20. What is HSync (Horizontal sync) in the context of video bus timing diagram? 49 | >A> 50 | The synchronization signal that marks the end of a line and the beginning of the next line 51 | horizontally within a frame. It ensures proper scanning and synchronization of the video signal 52 | 21. What is VActive (Vertical active) in the context of video bus timing diagram? 53 | >A> 54 | The portion of a frame where the actual image or content is displayed vertically. It represents 55 | the height of the visible area on the screen where the video or graphics are actively displayed 56 | 22. What is HActive (Horizontal active) in the context of video bus timing diagram? 57 | >A> 58 | The portion of a line where the actual image or content is displayed horizontally. It represents 59 | the width of the visible area on the screen where the video or graphics are actively displayed. 60 | 23. What is VBlank (Vertical blank) in the context of video bus timing diagram? 61 | >A> 62 | The period between frames where no content is displayed vertically. It occurs after the VActive 63 | portion and provides time for the display to reset, perform any necessary adjustments, and 64 | prepare for the next frame. Page-flipping typically occurs during the this time interval. 65 | 24. What is HBlank (Horizontal blank) in the context of video bus timing diagram? 66 | >A> 67 | The period between lines where no content is displayed horizontally. It occurs after the HActive 68 | portion within each line and allows time for the display to reset and prepare for the next line 69 | 25. Front Porch & Back Porch 70 | >A> 71 | - The back porch is the interval in a video signal that follows the active display area (HActive 72 | or VActive) and precedes the synchronization signal (HSync or VSync). It represents a blanking 73 | period where no video information is transmitted. 74 | - During the back porch, the display hardware 75 | typically performs tasks such as resetting or adjusting for the next line or frame. 76 | - The front porch is the interval in a video signal that precedes the active display area 77 | (HActive or VActive) and follows the synchronization signal (HSync or VSync). Similar to 78 | the back porch, it also represents a blanking period. 79 | - During the front porch, the display hardware prepares for the next line or frame, such as adjusting 80 | circuitry or stabilizing voltages. 81 | 26. What is Chroma Subsampling? Explain. 82 | 27. What is significance of A, B & C in YUVA:B:C chroma-subsampling formats ? 83 | 28. What is difference between YUV420 and YUV411 chroma-subsampling schemes? 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Linux_Kernel/questions/Interrupts_in_kernel.txt: -------------------------------------------------------------------------------- 1 | 01. What is an interrupt in the context of the Linux kernel? 2 | 02. How does the Linux kernel handle interrupts? 3 | 03. What is the purpose of interrupt handlers in the Linux kernel? 4 | 04. Explain the difference between hardware and software interrupts. 5 | 05. How does the Linux kernel prioritize interrupts? 6 | 06. What is the role of interrupt request lines (IRQs) in the Linux kernel? 7 | 07. How does the Linux kernel manage shared interrupts? 8 | 08. Describe the process of registering an interrupt handler in the Linux kernel. 9 | 09. What is the role of bottom halves (BHs) and tasklets in interrupt handling? 10 | 10. Explain the concept of deferred interrupt processing in the Linux kernel. 11 | 11. How does the Linux kernel handle nested interrupts? 12 | 12. What are the steps involved in handling an interrupt in the Linux kernel? 13 | 13. Describe the differences between top halves and bottom halves in interrupt handling. 14 | 14. How does the Linux kernel prevent interrupt storms or interrupt thrashing? 15 | 15. What are the potential issues that can arise from interrupt handling in the Linux kernel, and 16 | how can they be mitigated? 17 | 16. Explain the concept of interrupt affinity and how it is managed in the Linux kernel. 18 | 17. What is the purpose of disabling interrupts and how is it done in the Linux kernel? 19 | 18. How does interrupt handling differ in real-time and non-real-time Linux kernels? 20 | 19. Describe the relationship between interrupts and device drivers in the Linux kernel. 21 | 20. Can you explain how to handle shared resources within interrupt handlers in the Linux kernel? 22 | 21. What are all bottom half handling mechanisms available in Kernel ? which to use - when ? 23 | 22. Where to get IRQ number in request_irq API() ? 24 | 23. What is the difference between static and dynamic initilization of work queue ? 25 | >A> 26 | Static initialization: 27 | - Initialized using DECLARE_WORK macro 28 | - is more straightforward and simpler to implement. It is suitable when the work queue is 29 | required throughout the lifetime of the program or module. 30 | Dynamic initialization: 31 | - Created using a specific function call, such as alloc_workqueue() or create_workqueue() 32 | - It allows for more dynamic control over the lifetime of the work queue. It is useful when the 33 | work queue is needed only for a specific period or when there is a requirement to create and 34 | destroy work queues dynamically. 35 | 24. Difference between Tasklet vs Softirq ? When to use which? 36 | 25. Can you explain how to register an interrupt handler for a specific device in your device driver? 37 | 26. How would you handle a shared interrupt that is shared by multiple devices in your driver? 38 | 27. Describe the steps you would take to enable and disable interrupts for your device in the 39 | driver's initialization and cleanup routines. 40 | 28. How would you handle nested interrupts in your device driver? 41 | 29. Explain how you would implement interrupt handling to ensure that critical sections of code are 42 | executed atomically. 43 | 30. How would you handle the case where an interrupt occurs while your interrupt handler is already executing? 44 | 31. Describe the mechanisms you would use to synchronize access to shared data between your 45 | interrupt handler and other parts of your driver. 46 | 32. How would you prioritize interrupts from different devices or sources in your driver? 47 | 33. Can you explain how to handle interrupt storms or interrupt thrashing in your device driver? 48 | 34. What techniques would you use to measure the latency of your interrupt handling routine? 49 | 35. How would you handle spurious interrupts that may occur in your device driver? 50 | 36. Describe the steps you would take to handle error conditions or exceptional situations within 51 | your interrupt handler. 52 | 37. Explain how you would handle interrupt sharing conflicts or resource contention between different drivers. 53 | 38. How would you implement interrupt coalescing or batching in your device driver to reduce the 54 | overhead of frequent interrupts? 55 | 39. Can you describe any techniques or optimizations you would use to improve the performance of 56 | your interrupt handling routine? 57 | 40. Can you describe the differences between tasklets, workqueues, and softirqs in bottom half handling? 58 | 41. How are bottom halves scheduled and executed in the Linux kernel? 59 | 42. What is the role of the bottom half handler function? 60 | 43. Explain how the Tasklet mechanism works for bottom half handling. 61 | 44. What are the advantages and disadvantages of using Tasklets compared to other bottom half mechanisms? 62 | 45. How does the Workqueue mechanism provide a different approach to bottom half handling? 63 | 46. Can you explain the steps involved in creating and scheduling work items in a workqueue? 64 | 47. What is the purpose of softirqs in bottom half handling? 65 | 48. How are softirqs prioritized and scheduled in the Linux kernel? 66 | 49. Describe the process of registering and executing a softirq handler. 67 | 50. What are the considerations for choosing between tasklets, workqueues, and softirqs for bottom half handling? 68 | 51. How do bottom halves interact with interrupt handlers and device drivers? 69 | 52. Explain the concept of deferred interrupt processing and its relationship with bottom halves. 70 | 53. What are the potential issues that can arise from bottom half handling, and how can they be mitigated? 71 | 54. How does bottom half handling differ in real-time and non-real-time Linux kernels? 72 | 55. Describe the relationship between bottom halves and interrupt affinity in the Linux kernel. 73 | 56. Can you provide examples of practical scenarios where bottom half handling mechanisms are used 74 | in device drivers or kernel subsystems? 75 | 57. What is difference between process context and interrupt context ? Which bottom half mechanisms 76 | running in process context and which are in interrupt context ? 77 | -------------------------------------------------------------------------------- /Device_drivers/questions/Device_Tree.txt: -------------------------------------------------------------------------------- 1 | 1. Give me one line definition of Device tree. What was the actual need for it ? 2 | >A> 3 | - A DeviceTree(DT) , is a data structure and language for describing hardware. 4 | - More specifically, it is a description of hardware that is readable by an operating system so that the operating system doesn’t need to hard code details of the machine. 5 | - The primary purpose of Device Tree in Linux is to provide a way to describe non-discoverable hardware. This information was previously(before kernel v2.6) hard-coded in source code 6 | 2. What are the major reasons linux uses device-tree ? 7 | >A> 8 | 1. platform identification, 9 | 2. runtime configuration, and 10 | 3. device population. 11 | 3. What are .dts, .dtb and .dtsi files ? 12 | >A> 13 | .dtb : For compiled device-tree. 14 | .dts : Files for board-level definitions 15 | .dtsi : Files for included files, generally containing SoC-level definitions 16 | 4. Can we split device tree files in several files ? How ? 17 | >A> Yes, Using .dtsi files. 18 | 5. What is Flattened Device Tree (FDT) and Expanded Device Tree (EDT) ? 19 | >A> 20 | - The device tree source is compiled into a binary format contained in a .dtb blob file. The format of the data in the .dtb blob file is commonly referred to as a Flattened Device Tree. 21 | - The Linux operating system uses the device tree data to find and register the devices in the system. 22 | - The FDT is accessed in the raw form during the very early phases of boot, but is expanded into a kernel internal data structure known as the Expanded Device Tree (EDT) for more efficient access for later phases of the boot and after the system has completed booting. 23 | 6. How to generate device tree binary file using device tree source file ? And vice-versa ? 24 | >A> 25 | Using dtc - device tree compiler 26 | dtc -I dtb -O dts -o system.dts system.dtb > Generate system.dts from system.dtb 27 | dtc -I dts -O dtb -o system.dtb system.dts > Generate system.dtb from system.dts 28 | 7. What are the base set of device nodes required in a DTSpec-compliant device-tree ? 29 | >A> 30 | - root node 31 | - One /cpus node 32 | - At least one memory node 33 | 8. What is unit-address of the Node ? From where to get it ? 34 | >A> 35 | - The unit-address component of the node identifies the base address of the bus on which the node sits. It is the primary address used to access the device. 36 | - You can find it from Peripheral memory map of corresponding device's datasheet / reference manual. 37 | 9. What is "compatible" property ? And what is use of it ? 38 | >A> 39 | - Used to bind a device with the driver. 40 | - The compatible property value consists of one or more strings that define the specific programming model for the device. This list of strings should be used by a client program for device driver selection. 41 | - The property value consists of a concatenated list of null terminated strings, from most specific to most general. 42 | - They allow a device to express its compatibility with a family of similar devices, potentially allowing a single device driver to match against several devices. 43 | 10. Give me device-tree syntax for defining below use-cases ? 44 | >A> 45 | 1. A list of strings 46 | a-string-list-property = "first string", "second string"; 47 | 2. A list of byte/binary data 48 | a-byte-date-property = [0x12, 0x34, 0x56, 0x78]; 49 | 11. What is the use "phandle" property ? 50 | >A> 51 | - A phandle value is a way to reference another node in the device-tree. 52 | - Any node that can be referenced defines a phandle property with a unique value. That number is used for the value of properties with a phandle value type. 53 | - Most device-trees in DTS will not contain explicit phandle properties. The DTC tool automatically inserts the phandle properties when the DTS is compiled into the binary DTB format. 54 | 12. What is the use "reg" property ? 55 | >A> 56 | Defines address and length of the register area. 57 | The reg property describes the address of the device’s resources within the address space defined by its parent bus. 58 | Most commonly this means the offsets and lengths of memory-mapped IO register blocks, but may have a different meaning on some bus types. Addresses in the address space defined by the root node are CPU real addresses. 59 | 13. Suppose a device within a system-on-a-chip had two blocks of registers, a 32-byte block at offset 0x3000 in the SOC and a 256-byte block at offset 0xFE00. What would be reg encoded property ? 60 | >A> reg = <0x3000 0x20 0xFE00 0x100> ; 61 | 14. How can we define a node with label in device-tree ? 62 | >A> 63 | node_label : node_name@unit_address // if there is reg space 64 | node_label : node_name //if no reg space 65 | 15. How can I identify root node in device tree ? 66 | >A> It has no node-name or unit-address, and starts with forward slash (/) 67 | 16. Is it okay to have two nodes with same name ? 68 | >A> It is Okay If both have different unit-addresses or one has unit-address and one have no unit-address. 69 | 17. Explain #address-cells and #size-cells properties 70 | >A> 71 | - The #address-cells and #size-cells properties may be used in any device node that has children in the device-tree hierarchy and describes how child device nodes should be addressed. 72 | - The #address-cells property defines the number of cells used to encode the address field in a child node’s reg property. 73 | - The #size-cells property defines the number of cells used to encode the size field in a child node’s reg property. 74 | 18. Does #address-cells and #size-cells inherited from ancestors in device-tree ? 75 | >A> No. They shall be explicitly defined. 76 | 19. What is Device tree bindings ? What its location in kernel source ? 77 | >A> 78 | It describes the syntax used to describe specific types and classes of devices. 79 | Location: /Documentation/devicetree/bindings/ 80 | 20. Which device-tree property/ies used for address translation/mapping between child and parent bus? 81 | >A> 82 | - ranges and dma-ranges 83 | read: https://elinux.org/Device_Tree_Usage#Ranges_.28Address_Translation.29 84 | 21. What is interrupt controller ? Which DT property is used to define a device as interrupt controller in device-tree ? 85 | >A> An interrupt controller is a physical device and will need a driver to handle interrupts routed through it. It may also cascade into another interrupt domain. An interrupt controller is specified by the presence of an "interrupt-controller" property on that node in the device-tree. 86 | 22. What is "#interrupt-cells" property ? 87 | >A> Indicates the number of cells in the interrupts property for the interrupts managed by the selected interrupt controller. 88 | 23. What are "interrupt-parent" and "interrupts" property ? 89 | >A> 90 | - The physical wiring of an interrupt source to an interrupt controller is represented in the device-tree with the interrupt-parent property. It is a phandle that points to the interrupt controller for the current node. 91 | - Nodes that represent interrupt-generating devices contain an interrupt-parent property which has a phandle value that points to the device to which the device’s interrupts are routed, typically an interrupt controller. If an interrupt-generating device does not have an interrupt-parent property, its interrupt parent is assumed to be its device-tree parent. 92 | - Each interrupt generating device contains an interrupts property with a value describing one or more interrupt sources for that device. 93 | 24. What is need of "interrupt-extended" property ? 94 | >A> The interrupts-extended property lists the interrupt(s) generated by a device. "interrupts-extended" should be used instead of "interrupts" when a device is connected to multiple interrupt controllers as it encodes a parent "phandle" with each interrupt specifier. 95 | 25. What is interrupt nexus ? 96 | >A> https://elinux.org/Device_Tree_Mysteries#Interrupt_Nexus_.2F_Interrupt_Mapping 97 | 26. Nexus node and specifier mapping 98 | >A> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping 99 | 27. Why Kernel developers moved to YAML format for device tree binding documentation ? What are the probable reasons ? 100 | -------------------------------------------------------------------------------- /C/questions/c_easy.txt: -------------------------------------------------------------------------------- 1 | Questions/Topics: 2 | ----------------- 3 | 4 | 1. Memory layout of C program 5 | 2. Compilation stages of C program 6 | 2.1. Difference between compiler and interpreter ? 7 | 2.2. What is preprocessor ? What does it do while compiling a C program ? 8 | 2.3. Which is the last stage of C compilation stages ? What happens in it ? 9 | 2.4 What is role of assembler ? 10 | 3. Header files in c and its usage. 11 | 3.1. What is the use of Header guard ? 12 | 4. Data types in C 13 | 4.1. Types of data types and use-cases of each, size and range of each data types 14 | 4.2. What are user defined data types ? 15 | 4.3. What is the size of character variable ? and integer variable ? 16 | 5. Types of operators and examples of each – can ask about operator precedence 17 | 5.1. Post-increment vs pre-increment.. Ask for example 18 | 6. Useful C library functions - strlen, strcpy, strstr, strncpy, atoi, itoa, sprintf, sscanf etc etc... 19 | 6.1. Difference between memcpy and strcpy 20 | 6.2. I want to search a string in another string – which string function I can use ? 21 | 6.3. Which library function you will use to parse this data in "Name : marks" format ? 22 | Where Name is in string form, and marks is in integer ...e.g "Sunil : 50" 23 | 7. C Variables 24 | 7.1. What is lifetime and scope of variable ? 25 | 7.2. Scope of a variables in c – Global, Local and function scope 26 | 7.3. Variable declaration and variable definition. Which one of below is/are declaration ? Explain. 27 | int a; 28 | int a = 10; 29 | extern int a; 30 | >A> ONLY c is declaration, as declaring variable as extern does not allocate any memory for that variable.. Other two cases are declaration + definition. 31 | 8. Conditions and loops.. 32 | 8.1. Difference between while (0) and while (1) 33 | 8.2. Difference between do.. while and while loop 34 | 8.3. Write different conditions for infinite loop 35 | 8.4. Explain: for(;;) { printf ("Hello world\n"); } 36 | 8.5. Can we declare a variable inside switch case? What is its scope? 37 | 9. Difference between little endian and big-endian system. 38 | 9.1. Representation of 0x11223344 in big-endian and little endian 39 | >A> 40 | Big-endian: 41 | 0x1000 0x1001 0x1002 0x1003 42 | 0x11 0x22 0x33 0x44 43 | Little-endian: 44 | 0x1000 0x1001 0x1002 0x1003 45 | 0x44 0x33 0x22 0x11 46 | 9.2. What are bi-endians? 47 | >A> Bi-endian processors can run in both modes little and big endian. 48 | 9.3. Does endianness affects file formats? 49 | >A> File formats which have 1 byte as a basic unit are independent of endianness e.g., ASCII files. Other file formats use some fixed endianness format e.g, JPEG files are stored in big endian format. 50 | 10. Difference between const int*, const int * const, and int const * 51 | 11. C Libraries / linkage 52 | 11.1. Difference between static and dynamic library 53 | 11.2. Commands to generate static and dynamic library. Ask for explanation about command 54 | 12. Macros, typedef and inline function in C 55 | 12.1. Macro defined function Vs inline function . 56 | 12.2. Difference between macro and typedef 57 | 13. Array/2d array.. Ask for declaration and definition.. 58 | 14. Function calling methods in C – call by reference, call by value 59 | 15. Type casting in C 60 | 16. Recursion in C.. When you can use it ? Advantage and disadvantage.. What to take care while using? 61 | 17. Pointers 62 | 17.1. What is Pointers in laymen term ? What is use of it ? 63 | 17.2. Types of pointers in C (NULL, dangling, wild & void) 64 | 17.3. What is a dangling pointer in C ? Give examples. 65 | 17.4. What is wild pointer in C ? Give examples. 66 | 17.5. What is the size of Void pointers ? 67 | 17.6. How to access elements from array using pointers. 68 | 18. Storage classes in c and example 69 | 18.1. What are different storage classes in C ? What is the difference between extern and static ? 70 | 18.2. Where does auto variables get stored ? 71 | 18.3. What if a static variable used in the function or in file, or as a global variable ? what will its 72 | 18.4. scope be in all three use cases ? 73 | 18.5. What is the use of extern storage class ? How to use a variable declared in another file in a 74 | 18.6. current file using extern ? 75 | 18.7. What is register storage class ? When to use it? 76 | 19. Const and Volatile specifiers, and their examples 77 | 19.1. What is the use of Volatile specifiers ? Ask for examples ? 78 | 20. Memory allocation/free 79 | 20.1. what is the difference between malloc and calloc ? syntax and return type of malloc/calloc 80 | 20.2. How to free allocated memory ? syntax and return type 81 | 20.3. How does malloc work ? Where does it allocate a memory ? what if there is no memory left for allocation ? 82 | 20.4. What are possible scenarios for memory leakage ? 83 | 21. C Structure and union 84 | 21.1. Difference between structure and union 85 | 21.2. size of structure / union in different structures 86 | 21.3. A structure within union and its use cases 87 | 21.4. Structure Bit fields and its use cases & examples 88 | 21.5. What is size of below structure ? Explain. 89 | struct student 90 | { 91 | char a; 92 | char b; 93 | int c; 94 | } 95 | 21.6. What is memory alignment/padding in structures ? How to avoid padding in structure ? 96 | 22. Enums in C 97 | 23. How to check what are the system call made by any C library function ? 98 | >A> Using strace 99 | 100 | 101 | 102 | Programs: 103 | --------- 104 | 01. write a program to check if given number is even or odd 105 | 02. write a program to count the number of 1's in a given number. 106 | 03. Write a code to check MSB of a integer is 1 or not 107 | 04. Write a program to find factorial of given number using recursion / w/o using recursion 108 | 05. Program to copy a string from one char array to another char array (without using strcpy) 109 | 06. Program to count number of characters in C / string length. (without using strlen) 110 | 07. Program to search a string from one char array in another char array. 111 | return 0 on match, else return -1. (Don't use inbuilt string library APIs) 112 | 08. Program to sort a given int array into ascending order / descending order 113 | 09. Program to reverse a given string 114 | 10. Swap two variables without using third variable 115 | 11. Program to convert a decimal number to binary / or vice-versa 116 | 12. Program to check if the given year is leap year or not 117 | 13. Program to print prime numbers from 1 to 100 118 | 14. Custom atoi implementation 119 | 15. Implement ARRAY_LEN(array) macro - which returns length of array 120 | 16. Implement macros for SET_BIT(data, pos), RESET_BIT(data, pos), and TOGGLE_BIT(data, pos) 121 | 17. Program to check whether given string is Palindrome / number is palindrome 122 | 18. Check if given number is prime or not 123 | 19. Program to find endianness of the system – I.e. Little endian or Big endian ? 124 | 20. Program to check if given string has all unique characters 125 | 21. Write code to remove the duplicate characters in a string 126 | 22. Write a program to swap odd and even bits in an integer - with as few instructions as possible. 127 | (e.g. bit 0 and bit 1 are swapped, bit 2 and bit 3 are swapped, etc). 128 | 23. Given two integer numbers A and B, find a nearest number from B which is in 129 | multiple of A. Assume A will always be less than B. 130 | 131 | Patterns 132 | -------- 133 | 01. n > 0 134 | n = 5 135 | * 136 | * * 137 | * * * 138 | * * * * 139 | * * * * * 140 | 141 | 02. n > 0 142 | n = 5 143 | * * * * * 144 | * * * * 145 | * * * 146 | * * 147 | * 148 | 149 | 03. n > 0 150 | n = 5 151 | * * * * * 152 | * * * * 153 | * * * 154 | * * 155 | * 156 | 157 | 04. n > 0 158 | n = 5 159 | * 160 | * * 161 | * * * 162 | * * * * 163 | * * * * * 164 | 165 | 05. n > 0 166 | n = 5 167 | * * * * * 168 | * * * * 169 | * * * 170 | * * 171 | * 172 | 173 | 06. 174 | 1 2 3 4 5 175 | 6 7 8 7 176 | 6 5 4 177 | 3 2 178 | 1 179 | 180 | 07. 181 | 1 3 5 7 9 182 | 2 4 6 8 183 | 1 3 5 184 | 2 4 185 | 1 186 | 187 | 08. n > 0 188 | n = 5 189 | * 190 | * * 191 | * * 192 | * * 193 | * * * * * 194 | 195 | 09. n > 0 && n < 10 196 | n = 5 197 | 1 198 | 1 1 199 | 1 2 1 200 | 1 3 3 1 201 | 1 4 4 4 1 202 | 203 | 10. n > 0 204 | n = 5 205 | * * * * * 206 | * * 207 | * * 208 | * * 209 | * * * * * 210 | 211 | 11. n > 0 212 | n = 5 213 | * * * * * 214 | * * * * * 215 | * * * * * 216 | * * * * * 217 | * * * * * 218 | 219 | 12. n > 0 220 | n = 5 221 | 1 222 | 0 1 223 | 0 1 0 224 | 1 0 1 0 225 | 1 0 1 0 1 226 | 227 | 13. n > 0 228 | n = 5 229 | 1 0 1 0 1 230 | 0 1 0 1 231 | 0 1 0 232 | 1 0 233 | 1 234 | 235 | 14. n > 0 && n < 10 236 | n = 5 237 | 1 1 238 | 12 21 239 | 123 321 240 | 1234 4321 241 | 1234554321 242 | 243 | 15. n > 0 && n <= 26 244 | n = 5 245 | A 246 | ABA 247 | ABCBA 248 | ABCDCBA 249 | ABCDEDCBA 250 | 251 | 16. n > 0 252 | n = 4 253 | * * 254 | * * 255 | * * * * 256 | * * * * 257 | * * * * * * 258 | * * * * * * 259 | * * * * * * * * 260 | * * * * * * * * 261 | 262 | Output of programs 263 | ------------------ 264 | 265 | 01. 266 | for(unsigned char i=0; i<256; i++) 267 | { 268 | printf("Hello world\n"); 269 | } 270 | 271 | -------------------------------------------------------------------------------- /C/questions/c_medium.txt: -------------------------------------------------------------------------------- 1 | 1. When Volatile is needed ? 2 | 2. What is an advantage of having .bss section ? 3 | 3. Function pointer and example, use-cases 4 | 4. Double pointers 5 | 5. Memory allocation / free 6 | 5.1. Return value of malloc(0) (A: NULL) 7 | 5.2. Have you fixed any memory leakage issues ? Which tools are available to check memory leakage ? 8 | 5.3. Use of Valgrind to check memory leakage 9 | 6. Structure and Union 10 | 6.1. What is practical Use of structure and Union? 11 | 7. Data types in C 12 | 7.1. Does integer size varies per platform or remains constant ? Is it dependent on compiler as well ? 13 | What could be the size of integer when I use 32 bit compiler in 64 bit OS ? 14 | 7.2. When I say 64 bit OS – what does that 64 represents ? 15 | 7.3. Is it possible to use 32 bit OS with more than 4GB of RAM ? NO: Why is it not possible? 16 | 8. Pointers 17 | 8.1. What is a void pointer? Can you dereference a void pointer without knowing its type? 18 | >A> 19 | A void pointer is a pointer that can be used to point to any data of any arbitrary type. A void pointer 20 | can be dereferenced only after explicit casting. e.g.: 21 | int a = 5; 22 | void *b = &a; 23 | printf(“%d\n”, *((int*)b)); 24 | 9. Difference between following declarations: 25 | - const int *p / int const *p; 26 | - int *const p; 27 | - const int* const p; 28 | 10. What is stack overflow ? Why does it happens and how to avoid it ? / If recursive function 29 | can't return then what happens ? 30 | 11. Can a C program be compiled or executed in the absence of a main()? 31 | 12. Storage classes 32 | 12.1. Can we use register variable as Global ? 33 | 12.2. Can we use pointer on register variable? Why ? 34 | 13. Can a variable be volatile & const? In which scenario this will happen? 35 | >A> Yes, When we want to read external GPIO memory. 36 | 14. Can we define macro inside structure definition? 37 | 15. Difference between static function, static inline function & macro. 38 | 16. How 32 bit system differs from 64 bit system. What about the address space. Does pointer 39 | size differs? What we need to take care to obtain portability? What code would you write 40 | for it to be non-functional on 64 bit system. 41 | 17. How does free() call frees memory even when we don't provide number of bytes to free it ? 42 | 43 | 44 | Programs: 45 | --------- 46 | 01. Implement custom malloc() function – pseudo code and approach understanding 47 | 02. Decimal to Hexadecimal / Float to Binary 48 | 03. Write custom macro for sizeof 49 | 04. Implement itoa function. Integer to ascii conversion. 50 | 05. Implement strcspn(). Given 2 strings, strcspn() calculates the length of the 51 | number of characters before the 1st occurrence of the character present in both 52 | the string. Return -1, if no match found. 53 | e.g. str1="theembedeadinterview", str2="test" -> 0 54 | str1="theembedeadinterview", str2="west" -> 2 55 | str1="theembedeadinterview", str2="fly" -> -1 56 | 06. #define GENMASK(high, low) 57 | e.g. GENMASK(7,0) -> 11111111 i.e. 255 58 | GENMASK(1,0) -> 00000011 i.e. 3 59 | GENMASK(5,3) -> 00111000 i.e. 56 60 | GENMASK(15,11) -> 11111000 00000000 i.e. 63488 61 | 07. Given a string, Return a char which has occured a maximum times. If found two 62 | or more characters, return last occurance of the last one found. If found only 63 | one occurance of a character, then return the last char found. 64 | e.g. str="program" -> r 65 | str="programming" -> g 66 | str="print" -> t 67 | 08. Given a string of paranthesis, return if it is balanced or not. 68 | e.g. str="[()]{<>}{[()()]()}" -> Balanced 69 | str="[(])" -> Not Balanced 70 | 09. Given a string s, find the length of longest substring without repeating characters. 71 | e.g. str="theembedeadinterview" -> 8 (adinterv) 72 | 12. Implement a stack using array. Push, Pop and peek operations 73 | 13. Search the Nth node to the end of a singly-linked-list? Two-pass? Or Single-pass? 74 | 14. Design an algorithm and write code to remove the duplicate characters in a string 75 | without using any additional buffer. 76 | NOTE: One or two additional variables are fine. An extra copy of the array is not. 77 | 15. You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a 78 | method to set all bits between i and j in N equal to M (e.g., M becomes a substring of 79 | N located at i and starting at j). 80 | e.g. 81 | Input: N = 10000000000, M = 10101, i = 2, j = 6 82 | Output: N = 10001010100 83 | 16. Given an integer, print the next smallest and next largest number that have the same 84 | number of 1 bits in their binary representation. 85 | 17. Write a function to determine the number of bits required to convert integer A to integer B. 86 | e.g. 87 | Input: 31, 14 88 | Output: 2 89 | 18. Write a program to figure out if someone has won in a game of tic-tac-toe. 90 | Input will be char array of 9 bytes. e.g. "xoxxxooxo", "xoxxxooox" 91 | 92 | Patterns 93 | -------- 94 | 01. Print below pattern for the given string. if the string is of even 95 | characters add x in the middle. 96 | e.g. str="program" 97 | p m 98 | r a 99 | o r 100 | g 101 | r o 102 | a r 103 | m p 104 | 105 | e.g. str="colour" 106 | c r 107 | o u 108 | l o 109 | x 110 | o l 111 | u o 112 | r c 113 | 02. 114 | A 115 | B C 116 | D E F 117 | G H I J 118 | K L M N O 119 | P Q R S 120 | T U V 121 | W X 122 | Y 123 | 03. n > 0 && n % 2 == 1 124 | n = 7 125 | * * * * * * * 126 | * * * * * * 127 | * * * * 128 | * * 129 | * * * * 130 | * * * * * * 131 | * * * * * * * 132 | 04. 133 | 1 134 | 2 3 2 135 | 3 4 5 4 3 136 | 4 5 6 7 6 5 4 137 | 5 6 7 8 9 8 7 6 5 138 | 139 | 05. n > 0 && n % 2 == 1 140 | n = 4 141 | * * 142 | * * * * 143 | * * * * * * 144 | * * * * * * * 145 | * * * * * * 146 | * * * * 147 | * * 148 | 06. n >=6 && n % 2 == 0 149 | n = 10 150 | ********** 151 | ** ** 152 | * * * * 153 | * * * * 154 | * ** * 155 | * ** * 156 | * * * * 157 | * * * * 158 | ** ** 159 | ********** 160 | 161 | n = 8 162 | ******** 163 | ** ** 164 | * * * * 165 | * ** * 166 | * ** * 167 | * * * * 168 | ** ** 169 | ******** 170 | 171 | n = 6 172 | ****** 173 | ** ** 174 | * ** * 175 | * ** * 176 | ** ** 177 | ****** 178 | 179 | 07. n > 0 && n < 10 180 | n = 4 181 | 4 4 4 4 4 4 4 182 | 4 3 3 3 3 3 4 183 | 4 3 2 2 2 3 4 184 | 4 3 2 1 2 3 4 185 | 4 3 2 2 2 3 4 186 | 4 3 3 3 3 3 4 187 | 4 4 4 4 4 4 4 188 | 189 | 08. n > 0 && n <= 26 190 | n = 5 191 | A B C D E D C B A 192 | A B C D D C B A 193 | A B C C B A 194 | A B B A 195 | A A 196 | 197 | 09. n > 0 && n < 10 198 | n = 5 199 | 1 200 | 212 201 | 32123 202 | 4321234 203 | 543212345 204 | 4321234 205 | 32123 206 | 212 207 | 1 208 | 209 | 10. n > 0 && n < 10 210 | n = 7 211 | 1 2 3 4 5 6 7 212 | 2 3 4 5 6 7 213 | 3 4 5 6 7 214 | 4 5 6 7 215 | 5 6 7 216 | 6 7 217 | 7 218 | 6 7 219 | 5 6 7 220 | 4 5 6 7 221 | 3 4 5 6 7 222 | 2 3 4 5 6 7 223 | 1 2 3 4 5 6 7 224 | 225 | 11. n >= 5 && n % 2 == 1 226 | n = 7 227 | * * * * * 228 | * * 229 | * * 230 | * * * * * * * 231 | * * 232 | * * 233 | * * * * * 234 | 235 | n = 5 236 | * * * * 237 | * * 238 | * * * * * 239 | * * 240 | * * * * 241 | 12. 242 | ********** 243 | * * 244 | * * 245 | * * 246 | * * 247 | ********** 248 | 249 | 13. n >= 4 && n % 4 == 0 250 | n = 4 251 | * 252 | * * 253 | * * 254 | * * * * 255 | 256 | n = 8 257 | * 258 | * * 259 | * * 260 | * * * * 261 | * * 262 | * * * * 263 | * * * * 264 | * * * * * * * * 265 | 266 | n = 12 267 | * 268 | * * 269 | * * 270 | * * * * 271 | * * 272 | * * * * 273 | * * * * 274 | * * * * * * * * 275 | * * * 276 | * * * * * * 277 | * * * * * * 278 | * * * * * * * * * * * * 279 | 280 | 14. n > 0 281 | n = 7 282 | * 283 | ** 284 | *** 285 | **** 286 | ***** 287 | ****** 288 | ******* 289 | ****** 290 | ***** 291 | **** 292 | *** 293 | ** 294 | * 295 | 296 | 15. n >=5 && n % 2 == 1 297 | n = 9 298 | * 299 | * * * 300 | * * * * * 301 | * * * * * * * 302 | * * * * * * * * * 303 | * * * * * * * 304 | * * * * * 305 | * * * 306 | * 307 | * * * 308 | * * * * * 309 | 310 | 16. 311 | * * * * * * * * * * * * * * * * * 312 | * * * * * * * * * * * * * * 313 | * * * * * * * * * * 314 | * * * * * * 315 | * * * * * * * * * 316 | * * * * * * * 317 | * * * * * 318 | * * * 319 | * 320 | 321 | -------------------------------------------------------------------------------- /Multimedia/questions/video_coding.txt: -------------------------------------------------------------------------------- 1 | 1. What is stride in video ? 2 | >A> 3 | The stride or pitch is the number of bytes from the first pixel of a line to the first pixel of 4 | the next line of video. In the simplest case, the stride equals the width multiplied by the bits 5 | per pixel, converted to bytes. For example, AR24 requires 32 BPP which is four bytes per pixel. 6 | A video buffer with an active area of 1920 x 1080 pixels therefore has a stride of 4 x 1920 = 7,680 bytes. 7 | 2. What is VSync (Vertical sync) in the context of video bus timing diagram? 8 | >A> 9 | The synchronization signal that marks the end of a frame and the beginning of the next frame 10 | vertically. It helps maintain proper timing and synchronization between the display and the 11 | video source 12 | 3. What is HSync (Horizontal sync) in the context of video bus timing diagram? 13 | >A> 14 | The synchronization signal that marks the end of a line and the beginning of the next line 15 | horizontally within a frame. It ensures proper scanning and synchronization of the video signal 16 | 4. What is VActive (Vertical active) in the context of video bus timing diagram? 17 | >A> 18 | The portion of a frame where the actual image or content is displayed vertically. It represents 19 | the height of the visible area on the screen where the video or graphics are actively displayed 20 | 5. What is HActive (Horizontal active) in the context of video bus timing diagram? 21 | >A> 22 | The portion of a line where the actual image or content is displayed horizontally. It represents 23 | the width of the visible area on the screen where the video or graphics are actively displayed. 24 | 6. What is VBlank (Vertical blank) in the context of video bus timing diagram? 25 | >A> 26 | The period between frames where no content is displayed vertically. It occurs after the VActive 27 | portion and provides time for the display to reset, perform any necessary adjustments, and 28 | prepare for the next frame 29 | 7. What is HBlank (Horizontal blank) in the context of video bus timing diagram? 30 | >A> 31 | The period between lines where no content is displayed horizontally. It occurs after the HActive 32 | portion within each line and allows time for the display to reset and prepare for the next line 33 | 8. Front Porch & Back Porch 34 | >A> 35 | - The back porch is the interval in a video signal that follows the active display area (HActive 36 | or VActive) and precedes the synchronization signal (HSync or VSync). It represents a blanking 37 | period where no video information is transmitted. 38 | - During the back porch, the display hardware 39 | typically performs tasks such as resetting or adjusting for the next line or frame. 40 | - The front porch is the interval in a video signal that precedes the active display area 41 | (HActive or VActive) and follows the synchronization signal (HSync or VSync). Similar to 42 | the back porch, it also represents a blanking period. 43 | - During the front porch, the display hardware prepares for the next line or frame, such as adjusting 44 | circuitry or stabilizing voltages. 45 | 9. What is I, P, B frames 46 | 10. Coding tree unit 47 | 11. Explain working of a encoder and decoder in simple terms(preferably with a diagram)? 48 | >A> 49 | Predict image based on previous image, create residual & motion vectors, gives residual to 50 | spatial model, which gives coefficient by transforming & quantization process of residual 51 | samples, motion vectors & quantized 52 | coefficient provide to entropy encoder to compress further 53 | 12. AVC vs HEVC. Which one is better. And why ? 54 | What are the main differences between HEVC and H.264? How does HEVC make it better? 55 | H.264: Macroblock block size?(16X16). Macroblock partition? (down to 4X4) 56 | HEVC: Coding Tree Unit(CTUs) size? (up to 64X64) 57 | >A> 58 | AVC: 59 | - H.264 (also called AVC, or Advanced Video Coding) is an industry standard 60 | for video compression that allows for the recording, compression, and 61 | distribution of digital video content. 62 | - It works by processing frames of video using a block-oriented, 63 | motion-compensation-based video compression standard. Those units are 64 | called macroblocks. Macroblocks typically consist of 16x16 pixel samples 65 | that can be subdivided into transform blocks, and may be further subdivided 66 | into what are known as prediction blocks. See the example below. 67 | - The H.264 algorithm can substantially lower bitrates better than previous 68 | standards, and is widely used by streaming internet sources like Vimeo, 69 | YouTube, iTunes, and more. 70 | HEVC: 71 | - H.265 is newer and more advanced than H.264 in several ways. H.265 (also 72 | called HEVC, or High Efficiency Video Coding) allows for further reduced 73 | file size, and therefore reduced required bandwidth, of your live video 74 | streams. 75 | - Unlike H.264 macroblocks, H.265 processes information in what’s called 76 | coding tree units (CTUs). Whereas macroblocks can span 4x4 to 16x16 block 77 | sizes, CTUs can process as many as 64x64 blocks, giving it the ability to 78 | compress information more efficiently. 79 | - In addition to the larger CTU sizes, HEVC also has better motion 80 | compensation and spatial prediction than AVC does. This means that HEVC 81 | requires more advanced hardware, to be able to compress the data. 82 | Fortunately, however, it also means that viewers with H.265 compatible 83 | devices will require less bandwidth and processing power to decompress that 84 | data and watch a high-quality stream. 85 | 13. How does the encoder select encoding block size either 4X4 or 32X32? Based on what? What is the 86 | outcome? Detailed areas or smooth areas. 87 | 14. AVC and HEVC stream packet 88 | 15. Can you draw a block diagram of HEVC or H.264 encoder? What is “Synthesis by Analysis” in video 89 | encoder? Why? How does it work? 90 | 16. Should I stream in H.264 or H.265? 91 | >A> Live streaming in H.265 will provide you with a higher-quality image while using less 92 | bandwidth. So, if possible, stream in H.265. 93 | 17. Does H.265 reduce quality? 94 | >A> No. It will give you higher quality when the network speed is lower. 95 | 18. Does H.265 use more CPU? 96 | >A> Yes. You'll use more CPU when you try to stream in H.265 from a computer. 97 | 19. Which is better for YouTube, H.264 or H.265? 98 | >A> 99 | If your encoder can stream in H.265, we recommend streaming with that. A third-party service like 100 | YouTube may transcode or process your video data differently from time to time depending on a 101 | variety factors, so streaming at the highest quality you can achieve on your own is always a safe 102 | bet. 103 | 20. Is H.264 high quality? 104 | >A> Yes. 105 | You can create high-quality streams with H.264 — just make sure you have the correct network 106 | speeds to do so (5-10mbps upload). 107 | 21. What do u mean by inter prediction & intra prediction? 108 | >A> 109 | Inter prediction --> prediction based on previously encoded frames 110 | Intra prediction --> prediction based on previously encoded macroblocks 111 | 22. What is entropy encoding (CABAC, CAVLC) 112 | 23. Which is the lossy part in encoding process. 113 | 24. What is constant bit-rate/constant quality encoding? 114 | 25. What is deblocking/loop filters. 115 | 26. Why do we need to reconstruct some frames in encoder? 116 | 27. What is Fast DCT. Is it lossy ? If yes explain. 117 | 28. Difference between key frame and I frame. 118 | 29. What do u mean by Gradual Decoder Refresh (GDR), how it is advantageous than inserting whole I frame? 119 | 30. What is GoP? 120 | 31. Open and closed GOPs. 121 | 32. Bitrate calculation 122 | 33. Difference between I frame and IDR frame ? 123 | 34. What is cpb ? 124 | 35. Relation between bitrate and cpb ? 125 | 36. Quality metrics 126 | 37. SPS, PPS, VPS, AUD in video stream 127 | 38. What do u mean by slices? 128 | 39. What is loop filter ? 129 | 40. Difference between display order & decoding order. 130 | 41. What do u mean by key frame(IDR frame - Instantaneous Decoder Refresh)? Why it is needed? 131 | >A> When decoder recives IDR, it discard all previous reference frames from DPB(Decoder picture 132 | buffer/reference picture buffer) 133 | 42. Type of video coding scalability one can achieve. 134 | >A> Temporal scalability - frame rate scalability 135 | Spatial scalability - resolution scalability 136 | Fidelity scalability - quality scalability 137 | 43. What are the most important steps in encoder to achieve high compression efficiency? 138 | (1) Motion compensation? 139 | (2) DCT transform? 140 | (3) Quantization? 141 | (4) Entropy encode? Which one is #1? Why? How does it work? 142 | 44. I-frame? Intra-frame prediction. 143 | P-frame? Inter-frame prediction. 144 | How does the encoder select I-frame or P-frame prediction? 145 | Based on what? 146 | Scene switching? 147 | Packet lost? 148 | IDR? 149 | Prediction residual? 150 | 45. What is the difference between I-frame and IDR-frame? How often do they occur? 151 | IDR-frame: How does it work? The reference frame buffer gets cleared out in encoder or in decoder or in both? 152 | 46. Motion estimation & compensation? Processing block size? 153 | Macroblock and microblock-partition. 154 | How to decide the best motion estimation/compensation block? 155 | Minimize the prediction residual. 156 | What are the outputs? 157 | Prediction residual frame and the motion vector. 158 | 47. How does the encoder control the tradeoff between the output bitrate (lower for better 159 | compression efficiency) and the video quality? 160 | By adjusting what parameter(s)? Rate-distortion performance? 161 | 48. “In-loop De-blocking filter” in video encoder? Why is it needed? 162 | Block based encoding has blocking or ringing distortion. How does it work? 163 | Smooths the block edges by Extrapolation. 164 | Which region of a frame/picture is this De-blocking filter applied to? 165 | Microblock boundaries. 166 | Why is it called “In-loop”? 167 | It is placed inside the encoding and decoding loops. 168 | 49. “Slices” in H.264 & HEVC? “Tiles” in HEVC? Why? What purpose? 169 | Independent decoding without reference to any previous slices. 170 | (1) Error resilience. Re-sync decoder with encoder in case of packet loss. 171 | (2) Parallel encoding/decoding in multi-cores CPU and GPU. 172 | 173 | -------------------------------------------------------------------------------- /Device_drivers/questions/ALSA_Framework_Driver.txt: -------------------------------------------------------------------------------- 1 | 1. ALSA Framework: 2 | 1.1. What is ALSA and what is its role in the Linux audio system? 3 | 1.2. Explain the main components of the ALSA framework. 4 | 1.3. What are the advantages of using ALSA over older sound systems like OSS? 5 | 1.4. How does ALSA handle sound mixing and multiplexing? 6 | 1.5. Describe the role of the Advanced Linux Sound Architecture in low-latency audio processing. 7 | 2. ALSA Device Drivers: 8 | 2.1. What is an ALSA device driver? 9 | 2.2. How does an ALSA device driver interact with the ALSA framework? 10 | 2.3. Explain the steps involved in developing an ALSA device driver. 11 | 2.4. What are the important functions that an ALSA device driver needs to implement? 12 | 2.5. How does an ALSA device driver handle audio data transfer and DMA (Direct Memory Access)? 13 | 2.6. Describe the process of registering an ALSA device driver with the ALSA framework. 14 | 3. PCM (Pulse Code Modulation): 15 | 3.1. What is PCM and why is it important in the context of ALSA? 16 | 3.2. Explain the PCM data format and how it relates to audio processing. 17 | 3.3. What are the steps involved in setting up and configuring PCM parameters in an ALSA device driver? 18 | 4. Buffer Management: 19 | 4.1. How does buffer management work in ALSA? 20 | 4.2. Explain the concept of period and buffer in ALSA audio processing. 21 | 4.3. What is the role of the DMA buffer and the ring buffer in ALSA? 22 | 4.4. Describe how an ALSA device driver manages buffer allocation and data transfer. 23 | 5. Control Interface: 24 | 5.1. What is the control interface in ALSA and what is its purpose? 25 | 5.2. Explain the concept of mixers and controls in ALSA. 26 | 5.3. How does an ALSA device driver handle control events and interact with the control interface? 27 | 6. Error Handling and Debugging: 28 | 6.1. How does error handling work in ALSA device drivers? 29 | 6.2. What debugging techniques and tools can be used to diagnose ALSA-related issues? 30 | 6.3. Explain some common problems and troubleshooting approaches when working with ALSA. 31 | 7. User Space Libraries and Utilities: 32 | 7.1. Mention some user space libraries and utilities commonly used with ALSA. 33 | 7.2. Describe the role of ALSA utilities like aplay, arecord, and alsamixer. 34 | 8. DMA (Direct Memory Access): 35 | 8.1. What is DMA and how is it used in ALSA for audio data transfer? 36 | 8.2. Explain the role of DMA descriptors in ALSA. 37 | 8.3. How does an ALSA device driver set up and control DMA transfers? 38 | 9. Interrupt Handling: 39 | 9.1. How does ALSA handle interrupts in audio device drivers? 40 | 9.2. Describe the process of handling interrupts in ALSA and its significance in audio processing. 41 | 9.3. What are the challenges involved in handling real-time audio interrupts? 42 | 10. ALSA PCM Plugins: 43 | 10.1. What are PCM plugins in ALSA and how do they extend the functionality of the PCM subsystem? 44 | 10.2. Explain the concept of hardware-dependent and hardware-independent PCM plugins. 45 | 10.3. Provide examples of commonly used PCM plugins and their purposes. 46 | 11. Dynamic Audio Power Management (DAPM): 47 | 11.1. What is DAPM in ALSA and how does it contribute to power management in audio devices? 48 | 11.2. Explain the DAPM power widget framework and its role in managing power states. 49 | 11.3. How does an ALSA device driver implement DAPM support? 50 | 12. MIDI Support: 51 | 12.1. How does ALSA handle MIDI devices and MIDI data? 52 | 12.2. Explain the MIDI sequencer interface in ALSA and its role in MIDI processing. 53 | 12.3. How can an ALSA device driver provide support for MIDI devices? 54 | 13. Clocking and Synchronization: 55 | 13.1. Describe the importance of clocking and synchronization in audio processing. 56 | 13.2. How does ALSA handle clocking and synchronization between different audio devices? 57 | 13.3. Explain the concept of clock source and clock events in ALSA. 58 | 14. Custom ALSA Controls: 59 | 14.1. How can an ALSA device driver implement custom controls beyond the standard mixer controls? 60 | 14.2. Explain the process of adding custom controls to an ALSA device driver. 61 | 14.3. What are the considerations for managing and handling custom controls effectively? 62 | 15. Real-Time Audio Processing: 63 | 15.1. How does ALSA handle real-time audio processing requirements? 64 | 15.2. Explain the concepts of real-time scheduling and priority management in ALSA. 65 | 15.3. Describe techniques for achieving low-latency and glitch-free audio processing. 66 | 67 | 68 | 69 | 70 | Practial scenarios: 71 | Scenario-1: You are developing an ALSA device driver for a new audio codec chip. 72 | The chip supports multiple audio channels and has hardware volume control. How would you 73 | implement support for multiple channels and volume control in your ALSA device driver? 74 | Scenario-2: You are working on an ALSA device driver for a USB audio device. The device has 75 | a headphone output and a microphone input. How would you handle the configuration and 76 | routing of audio streams between the headphone and microphone using ALSA controls? 77 | Scenario-3: You are debugging an issue where the audio playback from your ALSA device driver is 78 | producing crackling or distorted sound. What steps would you take to diagnose and fix this issue? 79 | Scenario-4: You have developed an ALSA device driver for a custom audio device. The device supports 80 | sample rate conversion (SRC) to allow audio playback at different sample rates. 81 | How would you implement SRC in your ALSA device driver and ensure proper synchronization 82 | with the audio stream? 83 | Scenario-5: You are working on an ALSA device driver for an embedded system that requires low-power operation. 84 | How would you implement power management features, such as runtime PM (Power Management) and 85 | suspend/resume support, in your ALSA device driver? 86 | Scenario-6: You are integrating a new I2S-based audio codec into an existing ALSA device driver. 87 | How would you modify the existing driver to support the new codec and ensure proper data transfer 88 | between the codec and the host? 89 | Scenario-7: You are developing an ALSA device driver for a hardware mixer chip that allows mixing audio streams 90 | from different sources. How would you implement the mixing functionality in your ALSA device driver, 91 | considering factors such as volume control, channel separation, and mixing algorithms? 92 | Scenario-8: You have developed an ALSA device driver for a wireless audio streaming device. How would you handle 93 | audio synchronization and latency management to ensure seamless audio playback over the wireless connection? 94 | Scenario-9: You are working on an ALSA device driver for a sound card that supports hardware mixing 95 | and effects processing. How would you implement the hardware mixing and effects processing functionality 96 | in your ALSA device driver, ensuring efficient and accurate audio processing? 97 | Scenario-10: You are tasked with adding support for MIDI input and output to an existing ALSA device driver. 98 | How would you modify the driver to handle MIDI data transfer and ensure compatibility with MIDI 99 | applications and devices? 100 | Scenario-11: You are developing an ALSA device driver for a USB audio device that supports multiple sample rates. 101 | How would you handle dynamic sample rate switching and resampling in your ALSA device driver to ensure 102 | audio playback at the correct rate? 103 | Scenario-12: You have developed an ALSA device driver for a high-definition audio device that supports surround sound 104 | and advanced audio codecs. How would you handle the configuration and routing of audio streams for different 105 | speaker configurations and audio formats? 106 | Scenario-13: You are troubleshooting an issue where the microphone input in your ALSA device driver is producing low or 107 | distorted audio levels. What steps would you take to diagnose and fix this problem, considering factors 108 | such as gain settings, input impedance, and noise cancellation? 109 | Scenario-14: You are working on an ALSA device driver for an audio device that supports hardware-based digital signal 110 | processing (DSP) for audio effects. How would you integrate and configure the DSP functionality in your ALSA 111 | device driver, allowing applications to utilize the available audio effects? 112 | Scenario-15: You are developing an ALSA device driver for a specialized audio device that requires custom communication 113 | protocols and register configurations. How would you handle the low-level communication and register access 114 | in your ALSA device driver to ensure proper interaction with the device? 115 | Scenario-16: You are developing an ALSA device driver for a digital audio interface that supports both input and output. 116 | How would you handle full-duplex operation and synchronization between the input and output streams in your 117 | ALSA device driver? 118 | Scenario-17: You are tasked with implementing support for hardware-based MIDI synthesizer functionality in an existing 119 | ALSA device driver. How would you integrate the MIDI synthesizer capabilities and allow MIDI applications 120 | to generate and play back synthesized audio? 121 | Scenario-18: You are working on an ALSA device driver for a specialized audio device that requires real-time audio 122 | processing, such as audio effects or real-time analysis. How would you ensure low-latency and high-performance 123 | audio processing in your ALSA device driver? 124 | Scenario-19: You are developing an ALSA device driver for a USB audio device that supports multiple audio endpoints, 125 | each with different audio formats and capabilities. How would you handle endpoint configuration and audio 126 | format negotiation in your ALSA device driver to ensure proper communication with the device? 127 | Scenario-20: You are integrating an external codec chip into an existing ALSA device driver. The codec chip supports 128 | advanced audio features such as equalization, dynamic range compression, and surround sound. How would you 129 | configure and control these advanced audio features in your ALSA device driver? 130 | Scenario-21: You are working on an ALSA device driver for a network audio streaming device. How would you handle the network 131 | communication, packetization, and synchronization of audio data in your ALSA device driver to ensure seamless 132 | audio streaming over the network? 133 | Scenario-22: You are developing an ALSA device driver for a hardware-accelerated audio processing unit. How would you leverage 134 | the hardware acceleration capabilities in your ALSA device driver to offload audio processing tasks and improve performance? 135 | Scenario-23: You are working on an ALSA device driver for a sound card that has multiple input and output ports. 136 | How would you handle the configuration and selection of input and output ports dynamically in your 137 | ALSA device driver, allowing users to switch between different audio sources and destinations? 138 | Scenario-24: You are developing an ALSA device driver for a hardware-accelerated audio processing unit that supports 139 | custom audio algorithms. How would you provide an interface for userspace applications to load and control 140 | these custom audio algorithms in your ALSA device driver? 141 | Scenario-25: You are troubleshooting an issue where the audio playback in your ALSA device driver exhibits noticeable audio latency. 142 | What steps would you take to diagnose and reduce the latency, considering factors such as buffer sizes, 143 | scheduling policies, and interrupt handling? 144 | Scenario-26: You are working on an ALSA device driver for a DSP-based audio device that supports real-time audio effects 145 | processing. How would you implement a flexible and extensible framework in your ALSA device driver 146 | to allow userspace applications to load and control audio effects plugins? 147 | Scenario-27: You are developing an ALSA device driver for a USB audio device that has additional functionality beyond audio, 148 | such as HID input for control buttons. How would you handle the integration and synchronization of the audio 149 | and HID functionality in your ALSA device driver? 150 | Scenario-28: You are tasked with optimizing the performance of an existing ALSA device driver that handles high-bandwidth 151 | audio data streams. How would you analyze and optimize the data transfer, buffer management, and interrupt handling 152 | in your ALSA device driver to achieve maximum throughput and efficiency? 153 | Scenario-29: You are working on an ALSA device driver for an audio device that supports multiple sample formats, 154 | such as 16-bit, 24-bit, and 32-bit. How would you handle the conversion and processing of audio samples in your ALSA 155 | device driver to ensure accurate and efficient data handling across different sample formats? 156 | -------------------------------------------------------------------------------- /Multimedia/GStreamer/GStreamer_plugins_and_Development.txt: -------------------------------------------------------------------------------- 1 | 01. Two ways to develop a new GStreamer plugin 2 | >A> 3 | - You can write the entire plugin by hand, or 4 | - You can copy an existing plugin template and write the plugin code you need (which is 5 | gst-template git repository) 6 | 02. What is boilerplate with respect to GStreamer plugin? 7 | >A> 8 | The first thing to do when making a new element is to specify some basic details about it: what 9 | its name is, who wrote it, what version number it is, etc. We also need to define an object to 10 | represent the element and to store the data the element needs. These details are collectively 11 | known as the boilerplate. 12 | 03. How to create boilerplate code for GStreamer plugin? Is there any tool available for it ? where 13 | does it resides? How to use that tool ? 14 | >A> 15 | The standard way of defining the boilerplate is simply to write some code, and fill in some 16 | structures. The easiest way to do this is to copy a template and add functionality according to your 17 | needs. To help you do so, there is a tool in the ./gst-plugin/tools/ directory. 18 | 19 | This tool, make_element, is a command line utility that 20 | creates the boilerplate code for you. 21 | 22 | To use make_element, first open up a terminal window. Change to the gst-template/gst-plugin/src directory, 23 | and then run the make_element command. The arguments to the make_element are: 24 | - the name of the plugin, and 25 | - the source file that the tool will use. By default, gstplugin is used. 26 | 27 | For example, the following commands create the MyFilter plugin based on the plugin template and 28 | put the output files in the gst-template/gst-plugin/src directory: 29 | $ cd gst-template/gst-plugin/src 30 | $ ../tools/make_element MyFilter 31 | The last command creates two files: gstmyfilter.c and gstmyfilter.h. 32 | 04. What are GST_ELEMENT_REGISTER_DEFINE and GST_ELEMENT_REGISTER_DECLARE macros? 33 | >A> 34 | The macro GST_ELEMENT_REGISTER_DEFINE in combination with GST_ELEMENT_REGISTER_DECLARE allows to 35 | register the element from within the plugin or from any other plugin/application by calling 36 | GST_ELEMENT_REGISTER (your_plugin). 37 | e.g. GST_ELEMENT_REGISTER_DECLARE(your_plugin) 38 | G_DEFINE_TYPE (GstYourPlugin, gst_your_plugin, GST_TYPE_ELEMENT); 39 | GST_ELEMENT_REGISTER_DEFINE(your_plugin, "your-plugin", GST_RANK_NONE, GST_TYPE_YOUR_PLUGIN) 40 | 05. Example code to add static sink pad template to your plugin 41 | >A> 42 | static GstStaticPadTemplate sink_factory = 43 | GST_STATIC_PAD_TEMPLATE ( 44 | "sink", 45 | GST_PAD_SINK, 46 | GST_PAD_ALWAYS, 47 | GST_STATIC_CAPS ("ANY") 48 | ); 49 | 50 | static void 51 | gst_your_plugin_class_init (GstYourPLuginClass * klass) 52 | { 53 | GstElementClass *element_class = GST_ELEMENT_CLASS (klass); 54 | gst_element_class_add_pad_template (element_class, 55 | gst_static_pad_template_get (&sink_factory)); 56 | } 57 | 06. Create a static sink pad template for below example: 58 | - An audio filter that supports raw integer 16-bit audio, mono or stereo at any sample-rate. 59 | >A> 60 | static GstStaticPadTemplate sink_factory = 61 | GST_STATIC_PAD_TEMPLATE ( 62 | "sink", 63 | GST_PAD_SINK, 64 | GST_PAD_ALWAYS, 65 | GST_STATIC_CAPS ( 66 | "audio/x-raw, " 67 | "format = (string) " GST_AUDIO_NE (S16) ", " 68 | "channels = (int) { 1, 2 }, " 69 | "rate = (int) [ 8000, 96000 ]" 70 | ) 71 | ); 72 | In which, Values surrounded by curly brackets (“{” and “}”) are lists, values surrounded by 73 | square brackets (“[” and “]”) are ranges. Multiple sets of types are supported too, and should 74 | be separated by a semicolon (“;”). 75 | 07. Which are two Constructor Functions of any element in GStreamer ? 76 | >A> 77 | Each element has two functions which are used for construction of an element: 78 | - The _class_init() function, which is used to initialise the class only once (specifying what 79 | signals, arguments and virtual functions the class has and setting up global state); 80 | - And the _init() function, which is used to initialise a specific instance of this type.(It initialize 81 | the new element, instantiate pads and add them to element, set pad callback functions, initialize 82 | instance structure) 83 | 08. What is GST_PAD_SET_PROXY_CAPS ? and what is the condition to use that ? 84 | >A> 85 | #define GST_PAD_SET_PROXY_CAPS(pad) (GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PROXY_CAPS)) 86 | 87 | - Using it, all caps-related events and queries are proxied down- or upstream to 88 | the other side of the element automatically. 89 | - Set this if the element always outputs data in the exact same format as it 90 | receives as input. This is just for convenience to avoid implementing some 91 | standard event and query handling code in an element. 92 | 09. What is role of _init function in the plugin? 93 | >A> 94 | This is a special function, which is called as soon as the plugin is loaded, and should return 95 | TRUE or FALSE depending on whether it loaded initialized any dependencies correctly. 96 | Also, in this function, any supported element type in the plugin should be registered. 97 | in brief, it 98 | - Is entry point to initialize the plug-in 99 | - Initialize the plug-in itself 100 | - Register the element factories and other features 101 | 10. What does *_chain function do in the plugin? How you can register it? 102 | >A> 103 | - The chain function is the function in which all data processing takes place. 104 | - You can register it using gst_pad_set_chain_function() 105 | e.g. gst_pad_set_chain_function (filter->sinkpad, gst_your_plugin_chain); 106 | 11. What does *_event function do in the plugin? How to register it? 107 | >A> 108 | - The event function notifies you of special events that happen in the datastream (such as caps, 109 | end-of-stream, newsegment, tags, etc.). 110 | - Events can travel both upstream and downstream, so you can receive them on sink pads as well 111 | as source pads. 112 | - You can register it using gst_pad_set_event_function() 113 | e.g. gst_pad_set_event_function (filter->sinkpad, gst_your_plugin_sink_event); 114 | 12. What gst_pad_event_default() do, and when to use it? 115 | >A> 116 | - In case of *_event function, it is a good idea to call the default event handler 117 | gst_pad_event_default () for unknown events. 118 | - Depending on the event type, the default handler will forward the event or simply unref it. 119 | 13. What is role of *_query function in the plugin? How to register it? 120 | >A> 121 | - Through the query function, your element will receive queries that it has to reply to. These are 122 | queries like position, duration but also about the supported formats and scheduling modes your 123 | element supports. 124 | - Queries can travel both upstream and downstream, so you can receive them on sink pads as well 125 | as source pads. 126 | - You can register it using gst_pad_set_query_function() 127 | e.g. gst_pad_set_query_function (filter->srcpad, gst_your_plugin_src_query); 128 | 14. Describe the different types of GStreamer plugins and their functionalities. 129 | 15. How do plugins extend the capabilities of GStreamer? Provide examples. 130 | 16. Have you developed custom GStreamer plugins? If so, describe the process and challenges faced. 131 | 17. Discuss the different types of GStreamer plugins and their functionalities 132 | 18. (such as source, sink, filter, codec, and element-specific plugins). 133 | 19. Explain the concept of GStreamer's plugin API and its key components 134 | 20. (such as plugin initialization, plugin metadata, and plugin features). 135 | 21. Describe the process of creating a custom GStreamer plugin and the necessary steps involved. 136 | 22. What are the common challenges faced during GStreamer plugin development and how do you overcome them? 137 | 23. How do GStreamer plugins extend the capabilities of the framework? 138 | 24. Provide examples of plugins that enhance GStreamer functionality. 139 | 25. Discuss the role of GStreamer's element factories in creating and managing instances of plugins. 140 | 26. Explain the concept of GStreamer's pad templates and how they define the capabilities and properties of plugin pads. 141 | 27. What are some techniques for optimizing and improving the performance of GStreamer plugins? 142 | 28. Describe your experience in developing custom GStreamer plugins. What functionalities did they provide? 143 | 29. How do GStreamer plugins handle media data processing, such as encoding, decoding, filtering, or other transformations? 144 | 30. Discuss the concept of GStreamer's dynamic loading mechanism and how it enables the use of plugins at runtime. 145 | 31. What debugging techniques or tools do you use for troubleshooting issues in GStreamer plugins? 146 | 32. Describe your approach to testing and validating GStreamer plugins, including unit testing and functional testing. 147 | 33. Have you contributed to the GStreamer open-source community by developing or maintaining plugins? Share your experience. 148 | 34. Explain the GStreamer plugin API and its key elements. 149 | 35. How do you handle data flow and processing within a custom GStreamer plugin? 150 | 36. What are some techniques for optimizing and improving the performance of a GStreamer plugin? 151 | 37. What is the purpose of the GStreamer plugin registry and how does it manage the available plugins? 152 | 38. Describe the process of installing and registering a custom GStreamer plugin. 153 | 39. What are the advantages and disadvantages of developing a GStreamer plugin in C compared to other languages? 154 | 40. Discuss the role of GStreamer's element factories in creating instances of plugins and managing their properties. 155 | 41. Explain the concept of GStreamer's pad linking and how it enables data flow between different elements. 156 | 42. How do you handle plugin dependencies in GStreamer? Discuss any experience you have with resolving plugin dependency issues. 157 | 43. Describe your experience with implementing custom element properties in GStreamer plugins. 158 | 44. What techniques do you use to ensure backward compatibility of GStreamer plugins across different versions of the framework? 159 | 45. Explain the process of negotiating media formats between plugins in a GStreamer pipeline. 160 | 46. Discuss the concept of GStreamer's base classes and how they can be utilized in plugin development. 161 | 47. Describe your approach to optimizing GStreamer plugins for better performance and efficiency. 162 | 48. Have you worked with GStreamer's audio or video codec plugins? Share your experience. 163 | 49. How do you handle error handling and recovery in GStreamer plugins? 164 | 50. Provide examples of error handling techniques you have implemented. 165 | 51. Discuss the concept of GStreamer's clocking system and how it is utilized in plugin development. 166 | 52. Explain the purpose and usage of GStreamer's metadata and tags in plugin development. 167 | 53. Describe your experience with developing GStreamer plugins for specific hardware or platform requirements. 168 | 54. How do GStreamer plugins handle synchronization between audio and video streams? 169 | 55. Discuss the role of GStreamer's element messages in plugin communication and control. 170 | 56. Explain the process of handling dynamic configuration changes in GStreamer plugins. 171 | 57. What are the best practices for memory management in GStreamer plugin development? 172 | 58. Describe the role of GStreamer's base classes and interfaces in plugin development. 173 | 59. How do you handle timestamping and synchronization of data in GStreamer plugins? 174 | 60. Explain the concept of GStreamer's event system and its usage in plugin development. 175 | 61. Have you implemented custom serialization and deserialization logic in GStreamer plugins? 176 | 62. Discuss your experience. 177 | 63. Describe your experience with implementing custom pad probes in GStreamer plugins. 178 | 64. How do you handle resource allocation and deallocation in GStreamer plugins? 179 | 65. Discuss the role of GStreamer's buffer pool in managing media data in plugins. 180 | 66. Explain the concept of GStreamer's dynamic pipelines and how plugins can be dynamically added or removed. 181 | 67. Describe the process of adding support for new media formats or codecs in GStreamer plugins. 182 | 68. How do GStreamer plugins handle synchronization across different threads or processes? 183 | 69. Discuss the concept of GStreamer's plugin states and how they impact the behavior of plugins. 184 | 70. Describe your experience with developing GStreamer plugins for streaming applications. 185 | 71. Explain the purpose and usage of GStreamer's element queries in plugin development. 186 | 72. Discuss the role of GStreamer's typefind element in automatically detecting media formats in plugins. 187 | 73. How do you handle interoperability between GStreamer plugins and other multimedia frameworks or libraries? 188 | 74. Describe the process of debugging and profiling GStreamer plugins for performance optimization. 189 | 75. Explain the concept of GStreamer's plugin metadata and how it provides information about plugins. 190 | 76. Have you implemented custom buffer manipulation or processing algorithms in GStreamer plugins? Share your experience. 191 | 77. Discuss the role of GStreamer's plugin features and how they enable runtime plugin selection and configuration. 192 | 78. How do GStreamer plugins handle seeking operations within a media stream? 193 | 79. Explain the purpose and usage of GStreamer's element states and how plugins respond to state changes. 194 | 80. Describe your experience with developing GStreamer plugins for real-time audio or video processing applications. 195 | 81. How do GStreamer plugins handle inter-plugin communication and data sharing? 196 | 82. Discuss the concept of GStreamer's preset handling and how it can be utilized in plugin development. 197 | 83. Explain the process of adding support for hardware acceleration in GStreamer plugins. 198 | 84. Describe your experience with implementing custom sink or source plugins in GStreamer. 199 | 85. How do GStreamer plugins handle resource sharing and synchronization in a multi-instance environment? 200 | 86. Discuss the role of GStreamer's element base classes in providing common functionality for plugins. 201 | 87. Explain the concept of GStreamer's plugin rank system and how it influences the plugin selection process. 202 | 88. Describe your approach to testing GStreamer plugins, including unit testing and integration testing. 203 | 89. How do GStreamer plugins handle data rate control and buffering? 204 | 90. Discuss the concept of GStreamer's dynamic parameters and how they can be used in plugin development. 205 | 91. Explain the purpose and usage of GStreamer's plugin metadata file and how it provides information about plugins. 206 | 92. Describe your experience with developing GStreamer plugins for multimedia streaming protocols (e.g., RTP, RTSP). 207 | 93. How do GStreamer plugins handle data serialization and deserialization for network transmission? 208 | 94. Discuss the concept of GStreamer's plugin load time optimization techniques (e.g., lazy loading, fastpath optimization). 209 | 95. Explain the purpose and usage of GStreamer's profiling and tracing tools in plugin development. 210 | 96. Describe your experience with implementing custom media format negotiation strategies in GStreamer plugins. 211 | 97. How do GStreamer plugins handle dynamic bitrate adaptation and quality control? 212 | 98. Discuss the role of GStreamer's plugin documentation and how it helps developers in plugin integration and usage. 213 | 99. Assume you have developed a plugin. Now, on what basis you decide its location in gstreamer plugins 214 | repositories: which are gst-plugins-good, *-bad, *-base, *-ugly etc. 215 | -------------------------------------------------------------------------------- /CPP/questions/cpp_easy.txt: -------------------------------------------------------------------------------- 1 | 1. C++ best strength (or most-liked feature) 2 | 2. C++ worst weakness (or least-liked convention, or most-desired missing feature) 3 | 3. Benefits of C++ over C Language 4 | 1) C++ is an object oriented language whereas C language is a procedural language 5 | 4. What is Objects? 6 | Objects are the basic unit of OOP. They are instances of class, which have data members and uses various member functions to perform tasks. 7 | 5. What is Class? 8 | It is similar to structures in C language. Class can also be defined as user defined data type but it also contains functions in it. So, class is basically a blueprint for object. It declare & defines what data variables the object will have and what operations can be performed on the class's object. 9 | 6. What is Abstraction? 10 | Abstraction refers to showing only the essential features of the application and hiding the details. In C++, classes provide methods to the outside world to access & use the data variables, but the variables are hidden from direct access. This can be done access specifiers. 11 | 7. What is Encapsulation? 12 | It can also be said data binding. Encapsulation is all about binding the data variables and functions together in class. 13 | 8. What is Inheritance? 14 | Inheritance is a way to reuse once written code again and again. The class which is inherited is called base calls & the class which inherits is called derived class. So when, a derived class inherits a base class, the derived class can use all the functions which are defined in base class, hence making code reusable 15 | 9. What is Polymorphism? 16 | It is a feature, which lets us create functions with same name but different arguments, which will perform differently. That is function with same name, functioning in different way. Or, it also allows us to redefine a function to provide its new definition. 17 | 10. What is Exception Handling? 18 | Exception handling is a feature of OOP, to handle unresolved exceptions or errors produced at runtime. 19 | 11. Difference Between malloc and new 20 | - New calls consructor on memory allocation / malloc Does not call constructor 21 | - new is an operator / malloc is function 22 | - new returns exact data type / malloc returns void * 23 | - On failure throws / On failure returns NULL 24 | - new Memory allocation from free store / Memory allocation from heap 25 | - new can be overridden / malloc cannot be overridden 26 | - size is calculated by compiler / size is calculated manualy" 27 | 12. What is register storage class? 28 | This keyword is used to tell the compiler to make access to this variable as fast as possible. Variables are stored in registers to increase the access speed - you can never use or compute address of register variable - a register variable can be declared only within a block, that means, you cannot have global or static register variables. 29 | 13. Difference Between Structure in C and Class in C++ 30 | - Class in C++ are similar to structures in C, the only difference being, class defaults to private access control, whereas structure defaults to public. 31 | - Public Access control Public, means all the class members declared under public will be available to everyone. The data members and member functions declared public can be accessed by other classes too 32 | - Private Access control Private keyword, means that no one can access the class members declared private outside that class. If someone tries to access the private member, they will get a compile time error. 33 | - Protected Access control it is similar to private, it makes class member inaccessible outside the class. But they can be accessed by any subclass of that class. (If class A is inherited by class B, then class B is subclass of class A. We will learn this later.) 14. What is static member function - Static member function can be acccess directly without object name - These functions work for the class as whole rather than for a particular object of a class. - These functions cannot access ordinary data members and member functions, but only static data members and static member functions." 15. What is const member function When const key word used with member function, such member functions can never modify the object or its related data members. 34 | 16. What is friend functions? 35 | - Friend functions are actually not class member function 36 | - Friend functions are made to give private access to non-class functions 37 | - friend functions can access private data members by creating object of the class 38 | - we can also make function of other class as friend, or we can also make an entire class as friend class 39 | - Friend Functions is a reason, why C++ is not called as a pure Object Oriented language. Because it violates the concept of Encapsulation 40 | 17. Drawback of MACRO in C language 41 | - Problems with Spacing ( #define G (y) (y+1) ) 42 | - Complex Argument Problem 43 | - No way to access Private Members of Class" 44 | 18. Inline functions 45 | - Inline functions are actual functions, which are copied everywhere during compilation 46 | - All the functions defined inside class definition are by default inline" 47 | 19. Constructor 48 | - Constructors are special class functions which performs initialization of every object 49 | - The Compiler calls the Constructor whenever an object is created 50 | - Constructors iitialize values to object members after storage is allocated to the object." 51 | 20. Type of Constructor 52 | 1) Default contructor: Default constructor is the constructor which doesn't take any argument. It has no parameter. 53 | 2) Copy constructor: These are special type of Constructors which takes an object as argument, and is used to copy values of data members of one object into other object 54 | 3) Parameterized constructor: These are the constructors with parameter. Using this Constructor you can provide different values to data members of different objects, by passing the appropriate values as argument" 55 | 21. Constructor Overloading 56 | Just like other member functions, constructors can also be overloaded. Infact when you have both default and parameterized constructors defined in your class you are having Overloaded Constructors, one with no parameter and other with parameter. 57 | 22. Destructor 58 | Destructor is a special class function which destroys the object as soon as the scope of object ends. The destructor is called automatically by the compiler when the object goes out of scope. 59 | 23. Namespace 60 | Namespace is a container for identifiers. It puts the names of its members in a distinct space so that they don't conflict with the names in other namespaces or global namespace. 61 | 24. Static Variable 62 | - Static is a keyword in C++ used to give special characteristics to an element 63 | - Static elements are allocated storage only once in a program lifetime in static storage area 64 | - They have a scope till the program lifetime." 65 | 25. Static Object 66 | - Objects declared static are allocated storage in static storage area, and have scope till the end of program 67 | - Static object destructure gets called when main exists" 68 | 26. Const Variable 69 | - If you make any variable as constant, using const keyword, you cannot change its value 70 | - The constant variables must be initialized while declared" 71 | 27. Pointers with const 72 | When we use const with pointers, we can do it in two ways, 73 | 1) either we can apply const to what the pointer is pointing toor 74 | 2) we can make the pointer itself a const 75 | # Pointer to Const (int const*v) 76 | # Const Pointer (int *const v) 77 | # Const Pointer pointing to Const variable (const int* const x)" 78 | 28. Constant Member Function 79 | - A const member function never modifies data members in an object. 80 | 29. Const Object 81 | When an object is declared or created with const, its data members can never be changed, during object's lifetime. 82 | # Syntax : return_type function_name() const; 83 | 30. Mutable Keyword 84 | Mutable keyword is used with member variables of class, which we want to change even if the object is of const type. Hence, mutable data members of a const objects can be modified. 85 | 31. References 86 | References are like constant pointers that are automatically dereferenced. 87 | 32. References Vs Pointers 88 | - References must be initialized when it is created / Pointers can be initialized anytime 89 | - Once initialized, we cannot reinitialize a reference / Pointers can be reinitialized any number of time 90 | - You can never have a NULL reference / Pointers can have NULL reference 91 | - Reference is automatically dereferenced / '*' is required to dereference" 92 | 33. Constant Reference 93 | - Const reference is used in function arguments to prevent the function from changing the argument 94 | Note : we must use const reference type arguments. When we use, const reference, only an address is passed on stack, which is used inside the function and the function cannot change our argument because it is of const type." 95 | 34. Copy Constructor 96 | - Copy Constructor is a type of constructor which is used to create a copy of an already existing object of a class type 97 | 35. Public Inheritance 98 | - This is the most used inheritance mode 99 | - In this the protected member of super class becomes protected members of sub class 100 | - Public becomes public." 101 | 36. Private Inheritance 102 | - In private mode, the protected and public members of super class become private members of derived/Sub class 103 | 37. Protected Inheritance 104 | - In protected mode, the public and protected members of Super class becomes protected members of Sub class. 105 | 38. Types of Inheritance 106 | - Single Inheritance 107 | - Multiple Inheritance 108 | - Hierarchical Inheritance 109 | - Multilevel Inheritance 110 | - Hybrid Inheritance (also known as Virtual Inheritance) 111 | 39. Single Inheritance 112 | - In this type of inheritance one derived class inherits from only one base class 113 | - It is the most simplest form of Inheritance" 114 | 40. Multiple Inheritance 115 | - In this type of inheritance a single derived class may inherit from two or more than two base classes 116 | 41. Hierarchical Inheritance 117 | - In this type of inheritance, multiple derived classes inherits from a single base class 118 | 42. Multilevel Inheritance 119 | - In this type of inheritance the derived class inherits from a class, which in turn inherits from some other class. The Super class for one, is sub class for the other. 120 | 43. Hybrid(Virtual) Inheritance 121 | - Hybrid Inheritance is combination of Hierarchical and Multilevel Inheritance 122 | 44. Order to Constructor Base class constructors are always called in the derived class constructors. Whenever you create derived class object, first the base class default constructor is executed and then the derived class's constructor finishes execution. 123 | 45. Upcasting in C++ Upcasting is using the Super class's reference or pointer to refer to a Sub class's object 124 | 46. Downcasting in C++ Downcasting is to convert Super class's reference or pointer into derived class's reference or pointer 125 | 47. Functions that are never inherited 126 | - Constructors and Destructors are never inherited and hence never overridden. 127 | 48. assignment operator = is never inherited. It can be overloaded but can't be inherited by sub class." 128 | 49. Virtual Inheritence 129 | - In Multiple Inheritance, the derived class inherits from more than one base class. Hence, in Multiple Inheritance there are a lot chances of ambiguity 130 | ## For Ex. Class A is super class having public function ""show"" -> Class B and C is publicly derived from class A -> 131 | - In this case both class B and C inherits function show() from class A 132 | - Hence class D has two inherited copies of function show() 133 | - In main() function when we call function show(), then ambiguity arises, because compiler doesn't know which show() function to call 134 | - Hence we use ""Virtual"" keyword while inheriting class 135 | - Adding virtual keyword, we tell compiler to call any one out of the two show() funtions" 136 | 50. Polimorphism 137 | - Polymorphism means having multiple forms of one thing 138 | - In inheritance, polymorphism is done, by method overriding, when both super and sub class have member function with same declaration but different definition." 139 | 51. Function Overriding 140 | If we inherit a class into the derived class and provide a definition for one of the base class's function again inside the derived class, then that function is said to be overridden, and this mechanism is called Function Overriding 141 | 52. Static Binding 142 | - Connecting the function call to the function body is called Binding 143 | - When it is done before the program is run, it's called Early Binding or Static Binding or Compile-time Binding" 144 | 53. Late Binding 145 | - In Late Binding function call is resolved at runtime 146 | - Hence, now compiler determines the type of object at runtime, and then binds the function call 147 | - Late Binding is also called Dynamic Binding or Runtime Binding." 148 | 54. Virtual Function 149 | Virtual Function is a function in base class, which is overridden in the derived class, and which tells the compiler to perform Late Binding on this function 150 | 55. How Late Binding occurs 151 | - To accomplish late binding, Compiler creates VTABLEs, for each class with virtual function 152 | - The address of virtual functions is inserted into these tables 153 | - Whenever an object of such class is created the compiler secretly inserts a pointer called vpointer, pointing to VTABLE for that object 154 | - Hence when function is called, compiler is able to resolve the call by binding the correct function using the vpointer 155 | 56. Abstract Class 156 | - Abstract Class is a class which contains atleast one Pure Virtual function in it 157 | - Abstract classes are used to provide an Interface for its sub classes 158 | - Classes inheriting an Abstract Class must provide definition to the pure virtual function, otherwise they will also become abstract class." 159 | 57. Pure Virtual Function 160 | - Pure virtual Functions are virtual functions with no definition 161 | - They start with virtual keyword and ends with = 0. 162 | - Here is the syntax for a pure virtual function, 163 | ## virtual void f() = 0;" 164 | 58. Why can't we create Object of Abstract Class ? 165 | When we create a pure virtual function in Abstract class, we reserve a slot for a function in the VTABLE(studied in last topic), but doesn't put any address in that slot. Hence the VTABLE will be incomplete. 166 | As the VTABLE for Abstract class is incomplete, hence the compiler will not let the creation of object for such class and will display an error message whenever you try to do so." 167 | 59. Virtual Destructor 168 | - Destructors in the Base class can be Virtual 169 | - Whenever Upcasting is done, Destructors of the Base class must be made virtual for proper destruction of the object when the program exits 170 | 60. Operator Overloading 171 | Operator overloading is an important concept in C++. It is a type of polymorphism in which an operator is overloaded to give user defined meaning to it. Overloaded operator is used to perform operation on user-defined data type. 172 | 61. is a - has relationship 173 | https://www.researchgate.net/post/What_is_a_difference_in_Is-a_and_has-a_relationship_of_inheritance_of_c 174 | 62. Singleton Design Pattern/Singleton Class 175 | A class whose number of instances that can be instantiated is limited to one is called a singleton class. Thus, at any given time only one instance can exist, no more. -------------------------------------------------------------------------------- /Device_drivers/questions/Device_Driver_Basics.txt: -------------------------------------------------------------------------------- 1 | 1. Give me one line definition of device-driver (fine with layman's terms) 2 | >A> 3 | A device driver is a piece of software which drives device. 4 | Device drivers are computer programs that control how different hardware devices interact with the operating system. They act as a bridge between the hardware and the software, allowing the two to communicate with each other. Without device drivers, hardware devices would not be able to function properly. 5 | 2. Types of device drivers? 6 | >A> Block(storage vertical) oriented, byte(character vertical) oriented and packet(network vertical) oriented 7 | 3. What is the difference between application written in kernel and user space ? 8 | 4. Major number in device driver 9 | 4.1. What Is Major Number And It's Usage ? 10 | >A> 11 | It's an integer number mainly used to provide the association between the device driver and device file . this number is used by kernel. 12 | (or) 13 | The major number tells you which driver handles which device file. 14 | 4.2. Any example of Major number for different devices. 15 | 5. Minor number in device driver 16 | 5.1. What is Minor Number And It's Usage ? 17 | >A> 18 | The Minor number is used only by the driver itself to differentiate which device it's operating on, just in case the driver handles more than one device. 19 | (or) 20 | One driver can control more than one device. minor will be used to distinguish the one device from other devices 21 | 5.2. Who uses minor number ? Kernel or Driver ? 22 | 6. What do you understand with term "kernel module" ? 23 | >A> Kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. 24 | 7. Write a simplest Kernel module which prints "Hello World!" on load and "Bye Bye world!" on unload. 25 | >A> 26 | #include /* Needed by all modules */ 27 | #include /* Needed for KERN_INFO */ 28 | 29 | int init_module (void) 30 | { 31 | printk(KERN_INFO "Hello World!\n"); 32 | return 0 ; 33 | } 34 | 35 | void cleanup_module (void) 36 | { 37 | printk(KERN_INFO "Bye Bye World!\n"); 38 | } 39 | 40 | Ask questions from written module code. 41 | 8. Can I replace init_module / cleanup_module with any custom functions ? Using module_init and module_exit 42 | 9. Write a simple makefile to compile above linux module 43 | >A> 44 | obj-m += hello.o 45 | 46 | all : 47 | make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules 48 | 49 | clean : 50 | make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean 51 | //and then make 52 | 10. Have you came across any limitation of printk with compare to printf ? Give me example. 53 | 11. Have you used dmesg ? How can I monitor dmesg in real-time ? watch "dmesg | tail –n 20" or dmesg -w 54 | 12. Which command is used to get information about any kernel module ? Modinfo. What informations does it shows ? 55 | 13. Insmod, rmmod, lsmod and modprobe 56 | 13.1. Difference between modprobe and insmod. What is command to unload any given module using modprobe ? 57 | 13.2. modprobe loads all dependent modules first and then load the given module - How modprobe does it ? 58 | 13.3. What are steps to follow in order to load module using modprobe ? 59 | >A> 60 | 1. sudo ln -s /path/to/your-kernel-module.ko /lib/modules/`uname -r`/ OR sudo cp /path/to/your-kernel-module.ko /lib/modules/`uname -r`/ 61 | 2. sudo depmod -a ( Generate a list of kernel module dependencies and associated map files. ) 62 | 3. sudo modprobe your-kernel-module 63 | 13.4. What is use depmod command ? 64 | 13.5. How can I find out currently loaded kernel modules ? using lsmod and cat /proc/modules 65 | 13.6. I am rmmod'ing a kernel module, but failed with device busy error. How can I check number of processes are using kernel module ? lsmod | grep module_name -> number of processes using a kernel module (in 3rd row) 66 | 14. __init* and __exit* macros 67 | 14.1. In dmesg, I observed "Freeing unused kernel memory : 128k freed" message. Can you tell me how does kernel freeing such memory ? 68 | >A> 69 | Some functions in the kernel source code are marked with __init because they run only once during initialization. This instructs the compiler to mark a function in a special way. The linker collects all such functions and puts them at the end of the final binary file. 70 | When the kernel starts, this code runs only once during initialization. After it runs, the kernel can free this memory to reuse it and you will see the kernel message: e.g. "Freeing unused kernel memory: 128k freed" 71 | 14.2. __init, __exit, __initdata , __exitdata, __exitcall etc 72 | 14.3. Where these macros are defined in? /include/linux/init.h 73 | 15. What is need for MODULE_LICENSE ? Is it compulsory required ? 74 | 16. Kernel module arguments 75 | 16.1. How can you pass arguments to the kernel module ? Using module_param* macros. 76 | 16.2. How can you add description of the variable ? Which file we need to include to access these macros? 77 | >A> 78 | static int port_state = 0 ; 79 | module_param(port_state, bool , 0644 ); /* A Boolean type */ 80 | MODULE_PARM_DESC(port_state, "default state of the port" ); 81 | 82 | /* call with */ 83 | ./insmod mymodule.ko port_state=2 84 | 16.3. I need to pass an integer array as an argument to kernel module – How can I ? 85 | 16.4. I need to pass a string as an argument to kernel module – How can I ? 86 | 17. How can you identify if the device is block device or character device ? Use ls –l , if first byte is C – Char device, if B – Block device 87 | 18. What is file_operations structure ? 88 | 19. dev_t type 89 | 19.1. What is dev_t ? 90 | >A> dev_t is the data type introduced in kernel 2.6. It’s nothing but a 32 bit integer, 91 | in which the first 12 bits holds the major number and the remaining 20 bits holds the minor number. 92 | 19.2. What is mkdev macro ? 93 | >A> Given two integers - major and minor numbers, MKDEV combines them into one 32 bit dev_t compatible number. 94 | 19.3. What are macros to find major number and minor number from dev_t ? 95 | >A> 96 | MAJOR(dev_t dev); 97 | The macro MAJOR accepts a dev_t type number which is 32 bits, and returns a major number 98 | MINOR(dev_t dev); 99 | The macro MINOR accepts a dev_t type number which is 32 bits, and returns a minor number 100 | 19.4. I have a dev = 0x0F800001. What will major number and minor number of the device ? 101 | >A> 102 | dev = 0x0F800001 (For Major number = 248 and Minor number = 1 ) 103 | MAJOR (dev) = 0x0F800001 >> 20 = 0x0F8 = 248 104 | MINOR (dev) = 0x0F800001 & 0x000FFFFF = 0x1 = 1 105 | 20. register_chrdev_region() vs alloc_chrdev_region() OR How can I dynamically allocate major number ? 106 | 21. cdev structure 107 | 21.1. What is cdev structure ? 108 | 21.2. cdev_alloc() vs cdev_init() 109 | 21.3. How memory allocated by cdev_alloc() will be freed ? Is there any cdev_free() method ? 110 | >A> No. You can free it using cdev_del() 111 | 21.4. struct cdev vs struct inode 112 | 21.5. Which method/function use to add character device to the system ? cdev_add() 113 | 22. What are the available methods(functions) to exachange data between kernel and user-space app ? 114 | >A> 115 | copy_from_user / copy_to_user 116 | get_user / put_user 117 | strncpy_from_user 118 | 23. After creating character devices, How can you access it from user-space ? OR 119 | How /dev/* entries being created ? 120 | >A> 121 | 1. Use mknod to manually add a device node (older method) 122 | mknod /dev/ c OR 123 | 124 | 2. Use udev 125 | This is where the class_create and device_create come in. 126 | To notify udev from your kernel module, you first create a virtual device class using class_create() 127 | Now, the name will appear in /sys/class/. 128 | Then, create a device and register it with sysfs using device_create() 129 | Now, device name will appear in /sys/devices/virtual// and /dev/ 130 | 131 | 24. Ways to communicate between userspace and kernel space: 132 | IOCTL, Procfs, Sysfs, Configfs, Debugfs, Sysctl, UDP Sockets, Netlink Sockets 133 | 25. IOCTL 134 | 25.1. How can you define an IOCTL ? Give me example. 135 | >A> 136 | #define "ioctl name" __IOX("magic number","command number","argument type") 137 | 138 | where IOX can be, 139 | IO: an IOCTL with no parameters 140 | IOW: an IOCTL with write parameters ( copy_from_user ) 141 | IOR: an IOCTL with read parameters ( copy_to_user ) 142 | IOWR: an IOCTL with both write and read parameters 143 | 144 | The Magic Number is a unique number or character that will differentiate our set of ioctl calls from the other ioctl calls. sometimes the major number for the device is used here. 145 | 146 | Command Number is the number that is assigned to the ioctl . This is used to differentiate the commands from one another. 147 | 148 | The argument type is the type of data. 149 | 150 | 25.2. What is magic number in IOCTL ? 151 | 26. /proc file system (procfs) 152 | 26.1. What is proc file system ? For what purposes it is used ? 153 | 26.2. I want to create a procfs entry in /proc//info in kernel module. How can I create? 154 | >A> 155 | proc_mkdir() // To create directory with module_name in /proc/ directory 156 | proc_entry() // To create /proc//info 157 | 26.3. Write a sample kernel module, which can print an incremental number from /proc//info starting from 1 – everytime you read using cat /proc//info. 158 | 26.4. How to remove a procfs entry created in kernel module? using remove_proc_entry() 159 | 27. /sys file system (sysfs) 160 | 27.1. What is sysfs ? How it differs from procfs ? 161 | 27.2. What is struct kobject ? and struct kobj_attribute ? 162 | 27.3. I want to create below sysfs file in kernel module to read/write to/from user. 163 | Consider info would be an integer value. How can I ? 164 | I. /sys/kernel/info 165 | >A> 166 | volatile int user_info = 0 ; 167 | static ssize_t sysfs_show ( struct kobject * kobj, struct kobj_attribute * attr, char * buf) 168 | { 169 | return sprintf(buf, "%d \n " , user_info); 170 | } 171 | 172 | static ssize_t sysfs_store ( struct kobject * kobj, struct kobj_attribute * attr, const char * buf, size_t count) 173 | { 174 | sscanf(buf, "%d" , &user_info); 175 | return count; 176 | } 177 | struct kobj_attribute kattr_ptr = __ATTR(user_info, 0660 , sysfs_show, sysfs_store); 178 | struct kobject *kobj_ref = kobject_create_and_add( "info" ,kernel_kobj); 179 | sysfs_create_file(kobj_ref, &kattr_ptr.attr); 180 | II. /sys/firmware/info 181 | >A> 182 | Use firmware_kobj instead of kernel_kobj in above code snippet 183 | struct kobject *kobj_ref; kobj_ref = kobject_create_and_add( "info" ,firmware_kobj); 184 | III. /sys/fs/info 185 | >A> 186 | Use fs_kobj instead of kernel_kobj in above code snippet 187 | struct kobject *kobj_ref; kobj_ref = kobject_create_and_add( "info" ,fs_kobj); 188 | IV. /sys/info 189 | >A> 190 | Use NULL instead of kernel_kobj in above code snippet 191 | struct kobject *kobj_ref; kobj_ref = kobject_create_and_add( "info" ,NULL); 192 | 28. Configfs 193 | 29. What are platform drivers ? How it differs with non-platform drivers ? Give Example of both. 194 | 30. module_platform_driver() -> what this function do ? 195 | 31. To deploy a module inside kernel, what are the possible methods.? Mention actual difference among them. 196 | 32. how many ways we can assign a major minor number to any device? 197 | 33. How to make a module as loadable module? 198 | 34. How to make a module as in-built module? 199 | 35. What 's the use of __init and __exit macros? 200 | 36. How to ensure that init function of a partiuclar driver was called before our driver's init function is called (assume that both these drivers are built into the kenrel image)? 201 | 37. What is a device driver and write a simple driver and explain what happens when an insmod is done an module.? 202 | 38. How will you insert a module statically in to linux kernel 203 | 39. how the device files are created in Linux 204 | 40. How can a static driver runs? Without doing any insmod? 205 | 41. what kind of information the Linux driver modules (.ko )files has ? 206 | 42. what are the different ways the Linux can switch from User Space to Kernel Space & vice-versa? 207 | 43. How "Make" is performed in compiling a module? 208 | 44. What is the path of your driver inside kernel? 209 | 45. What are the function names for the driver you designed? 210 | 46. Static Drivers vs Dynamic Driver? 211 | 47. copy_to_user and copy_from_user? 212 | 48. What happens if you load a module without Init and Exit routines? 213 | 49. How to create a device file? 214 | 50. What is "Major Number"? What is "Minor Number"? 215 | 51. How do you pass a value to a module as a parameter? 216 | 52. When you declare a symbol in a module as "static" storage type, then where it goes? 217 | 53. Steps involved in "Character Device Registration" ? 218 | 54. Creation of ioctls? 219 | 55. How do you write a driver's open() call? Explain briefly. 220 | 56. How can we Free Device Numbers ? 221 | 57. What is use of dev_t type ? 222 | 58. What is the disadvantage of dynamic device number assignment ? 223 | 59. Where can we write allocation and freeing of device number's code ? 224 | 60. How can i use my own major and minor number for a device file ? 225 | 61. How to see statically assigned major numbers ? 226 | 62. What will happen/can u have printf/printk inside an interrrupt hancler (i think he wanted me to say no.. but I did not know the reason) 227 | 63. How can we allocate device number statically , dynamically? 228 | 64. What is mknod and it's usage ? 229 | 65. How to retrieve major and minor number from dev_t type ? 230 | 66. What is use of dev_t type ? 231 | 67. What is the functionality of PROBE function 232 | 68. How to detect whether a device is not detected? 233 | 69. Where your driver will be in kernel 234 | 70. Which type of address (virtual or physical) is used in function iowrite32? 235 | 71. What is the type of driver char or n/w or block driver you developed? 236 | 72. How to register a CHAR driver to kernel? 237 | 73. How to load a dynamic driver or static driver? 238 | 74. How to develop a device driver for a hard device? 239 | 75. IOCTL implementation programs 240 | 76. Where will be your driver file will be located 241 | 77. What is the entry point of your driver 242 | 78. What are the ways in which linux kernel can be compiled ? 243 | 79. How will get the driver added into the kernel ? What are Kconfig files ? 244 | 80. How will you list the modules ? 245 | 81. How do you get the list of currently available drivers ? 246 | 82. How will you Access userspace memory from kernel ? What are the various methods ? 247 | 83. What is the use of ioctl(inode,file,cmd,arg) ApI ? 248 | 84. What is the use of the poll(file, polltable) API ? 249 | 85. What is the use of file->private_data in a device driver structure ? 250 | 86. What is a device number ? 251 | 87. What are the two types of devices drivers from VFS point of view ? 252 | 88. What are character devices ? 253 | 89. How does the character device driver adds and remove itself from the kernel ? 254 | 90. What is the use of register_chrdev and unregister_chrdev ? 255 | 91. How to write a perticular value on real hardware register or hardware address in device driver programming ? 256 | 92. Port Mapping/Memory mapping 257 | 93. Device-driver entry points - https://docs.oracle.com/cd/E23824_01/html/819-3196/eqbqy.html 258 | 94. What Is a Device Driver Entry Point? 259 | >A> 260 | An entry point is a function within a device driver that can be called by an external entity to 261 | get access to some driver functionality or to operate a device. Each device driver provides a standard 262 | set of functions as entry points 263 | 95. Write a sample platform driver template which enables driver to probe from the compatible string 264 | matched from relevant device-tree node. 265 | 96. If I declare a global array in a device driver, will this array be shared among instances of the 266 | driver probed by different device-tree nodes? 267 | >A> Yes 268 | 96.1 How can you maintain seperate data for each driver instances ? 269 | >A> Declare the data in your driver structre and initialize/alloc it in your probe function. 270 | Use dev_set_drvdata/dev_get_drvdata to set/get driver specific data. 271 | -------------------------------------------------------------------------------- /Multimedia/GStreamer/GStreamer_basics.txt: -------------------------------------------------------------------------------- 1 | 01. What is bin, what is a pipeline, is pipeline a bin? 2 | >A> 3 | - A bin is a container for a collection of elements(manages the state of all elements within it). 4 | It forwards bus messages from contained elements (errors, tags, EOS). It simplifies implementing 5 | complex pipelines by allowing the break up of the pipeline into smaller blocks 6 | - A pipeline is a top-level bin. A generic container that manages the synchronization and bus 7 | messages of the contained elements. It provides a bus for the application and manages the 8 | synchronization for its children. 9 | 02. What is Caps negotiation 10 | >A> Caps negotiation is the act of finding a media format (GstCaps) between elements that they can handle. 11 | 03. What is (GST)Bus ? 12 | >A> A bus is a simple system that forwards messages from the streaming thread to an application in its own thread context. 13 | 04. GStreamer application development 14 | 25.1 Top level coding steps to develop app for below pipeline 15 | gst-launch-1.0 videotestsrc ! capsfilter ! autovideosink ts-offset=10 16 | 05. What is GstMiniObject ? what does it contains ? 17 | >A> 18 | All streams of data in GStreamer are chopped up into chunks that are passed from a source pad on 19 | one element to a sink pad on another element. GstMiniObject is the structure used to hold these 20 | chunks of data. 21 | 22 | GstMiniObject contains the following important types: 23 | - An exact type indicating what type of data (event, buffer, ...) this GstMiniObject is. 24 | - A reference count indicating the number of elements currently holding a reference to the 25 | miniobject. When the reference count falls to zero, the miniobject will be disposed, and its 26 | memory will be freed in some sense (see below for more details). 27 | 28 | For data transport, there are two types of GstMiniObject defined: events (control) and buffers (content). 29 | 06. What is buffer in Gstreamer ? What does it contain? 30 | >A> 31 | - buffers are objects for passing streaming data between elements in the pipeline. Buffers always 32 | travel from sources to sinks (downstream). 33 | - Buffers may contain any sort of data that the two linked pads know how to handle. Normally, a 34 | buffer contains a chunk of some sort of audio or video data that flows from one element to 35 | another. 36 | - Buffers also contain metadata describing the buffer's contents. Some of the important types of metadata are: 37 | -- Pointers to one or more GstMemory objects. GstMemory objects are refcounted objects that 38 | encapsulate a region of memory. 39 | -- A timestamp indicating the preferred display timestamp of the content in the buffer. 40 | 07. What is event in GStreamer? What information does events contains? 41 | >A> 42 | - events are objects sent between elements or from the application to elements. Events can 43 | travel upstream and downstream. Downstream events can be synchronised to the data flow. 44 | - Events contain information on the state of the stream flowing between the two linked pads. 45 | - Events are used to indicate, for example, a media type, the end of a media stream or that the 46 | cache should be flushed 47 | - Events may contain several of the following items: 48 | -- A subtype indicating the type of the contained event. 49 | -- The other contents of the event depend on the specific event type 50 | 08. What is GstMemory ? How Gst Memory objects are created? 51 | >A> 52 | - GstMemory is an object that manages a region of memory. 53 | - GstMemory objects are created by a GstAllocator object. Most allocators implement the default 54 | gst_allocator_alloc() method but some might implement different ones. 55 | 09. gst_memory_map() and gst_memory_unmap()? 56 | >A> 57 | Data access to the memory wrapped by the GstMemory object is always protected with a gst_memory_map() 58 | and gst_memory_unmap() pair. 59 | 10. What are different GST communication mechanisms? explain each in short. 60 | >A> 61 | Buffer: objects for passing streaming data between elements in pipeline 62 | - travel downstream 63 | Events: objects sent between elements or from the application to elements 64 | - travel downstream and upstream 65 | Messages: objects posted by elements on pipeline’s message bus (element to application) 66 | - Handled synchronously from pipeline to bus; asynchronously from bus to application 67 | Queries: allow applications to request information from pipeline 68 | - Travel downstream and upstream; always handled synchronously 69 | 11. What are different GST Bus messages ? Explain each in short. 70 | >A> 71 | All messages contain a message source, type, and time-stamp. 72 | 73 | - Error: fatal message that terminate data-passing 74 | - Warning: non-fatal message, but user-visible problems will happen 75 | - Information: non-problem notification 76 | - End of Stream: emitted when the stream had ended 77 | - Tags: emitted when metadata is found in the stream 78 | - State-changes: emitted after a successful state change 79 | - Buffering: emitted during caching of network-streams 80 | - Element: special messages that are unique to certain elements and usually represent additional features. 81 | - Application-specific: primarily meant for internal use in applications in case the application 82 | needs to marshal information from some thread into the main thread 83 | 12. Different types of GStreamer plugins 84 | >A> 85 | Codec Plugins: Codec plugins implement specific audio or video codecs for encoding or decoding 86 | media data. They allow GStreamer to support various formats such as H.264, MPEG-4, AAC, MP3, 87 | etc. 88 | 89 | Filter Plugins: Filter plugins apply specific processing operations to the audio or video data 90 | flowing through the pipeline. They can perform tasks like noise reduction, equalization, color 91 | correction, image transformations, and more. 92 | 93 | Sink Plugins: Sink plugins handle the output or final destination of media data in a pipeline. They 94 | can display video frames on the screen, play audio on speakers, save data to a file, or send data to 95 | a network stream. 96 | 97 | Source Plugins: Source plugins provide input data to the pipeline. They can read from files, capture 98 | data from devices like cameras or microphones, or receive data from network sources. 99 | 100 | Demuxer Plugins: Demuxer plugins are responsible for splitting container formats (e.g., MP4, MKV) 101 | into separate audio and video streams or other components for further processing. 102 | 103 | Muxer Plugins: Muxer plugins combine separate audio and video streams or other components into a 104 | single container format for output or storage. 105 | 106 | Parser Plugins: Parser plugins analyze media data to extract essential information such as 107 | timestamps, frame boundaries, metadata, or subtitles. They are often used in combination with 108 | demuxers and decoders. 109 | 110 | Sink Bin Plugins: Sink bin plugins are higher-level elements that encapsulate multiple sinks and 111 | handle synchronization or distribution of data to those sinks. They are useful for complex scenarios 112 | involving multiple output destinations. 113 | 114 | Source Bin Plugins: Source bin plugins are higher-level elements that encapsulate multiple sources 115 | and provide a unified interface to access the data from those sources. 116 | 117 | Library Plugins: Library plugins integrate third-party libraries or APIs into GStreamer, enabling 118 | access to specialized functionality or hardware acceleration. 119 | 120 | Transform Plugins: Transform plugins convert media data from one format to another. They can perform 121 | tasks like scaling, resizing, resampling, converting color spaces, or changing audio sample rates. 122 | 123 | Protocol Plugins: Protocol plugins handle the streaming of media data over specific network 124 | protocols such as HTTP, RTP, RTSP, or UDP. 125 | 126 | Visualization Plugins: Visualization plugins generate visual representations of audio data, such as 127 | spectrograms, waveforms, or graphical equalizers. 128 | 13. Gstreamer source package 129 | >A> 130 | GStreamer is packaged into 131 | - gstreamer: the core package 132 | - gst-plugins-base: an essential exemplary set of elements 133 | - gst-plugins-good: a set of good-quality plug-ins under LGPL 134 | - gst-plugins-ugly: a set of good-quality plug-ins that might pose distribution problems 135 | - gst-plugins-bad: a set of plug-ins that need more quality 136 | - gst-libav: a set of plug-ins that wrap libav for decoding and encoding 137 | & a few others packages 138 | 14. which object model does Gstreamer uses ? tell me about it. 139 | >A> 140 | - GStreamer adheres to GObject, the GLib 2.0 object model. A programmer familiar with GLib 2.0 or 141 | GTK+ will be comfortable with GStreamer. 142 | - GStreamer uses the mechanism of signals and object properties. All objects can be queried at 143 | runtime for their various properties and capabilities. 144 | - GStreamer intends to be similar in programming methodology to GTK+. This applies to the object 145 | model, ownership of objects, reference counting, etc. 146 | 15. How does GStreamer obtains high performace ? 147 | >A> 148 | - Using GLib's GSlice allocator 149 | - Extremely light-weight links between plugins 150 | - Providing a mechanism to directly work on the target memory 151 | - Refcounting and copy on write minimize usage of memcpy 152 | - Dedicated streaming threads, with scheduling handled by the kernel 153 | - Allowing hardware acceleration by using specialized plugins 154 | - Using a plugin registry with the specifications of the plugins so that the plugin loading can 155 | be delayed until the plugin is actually used. 156 | 16. What is query in Gstreamer? use ? flow ? 157 | >A> 158 | - queries allow applications to request information such as duration or current playback position 159 | from the pipeline. 160 | - Queries are always answered synchronously. 161 | - Elements can also use queries to request information from their peer elements (such as the file size or duration). 162 | - It can be used both ways within a pipeline, but upstream queries are more common. 163 | 17. What are messages in Gstreamer? 164 | >A> 165 | - messages are objects posted by elements on the pipeline's message bus, where they will be held 166 | for collection by the application. 167 | - Messages can be intercepted synchronously from the streaming thread context of the element posting 168 | the message, but are usually handled asynchronously by the application from the application's main thread. 169 | - Messages are used to transmit information such as errors, tags, state changes, buffering state, 170 | redirects etc. from elements to the application in a thread-safe way. 171 | 18. What are elements in GStreamer ? Explain. 172 | >A> 173 | - Elements are at the core of GStreamer. 174 | - In the context of plugin development, an element is an object derived from the GstElement class. 175 | - Elements provide some sort of functionality when linked with other elements: 176 | For example, a source element provides data to a stream, and a filter element acts on the data in a stream. 177 | Without elements, GStreamer is just a bunch of conceptual pipe fittings with nothing to link. 178 | - Just writing a new element is not entirely enough, however: You will need to encapsulate your 179 | element in a plugin to enable GStreamer to use it. 180 | 19. What is a plugin in Gstreamer ? 181 | >A> 182 | - A plugin is essentially a loadable block of code, usually called a shared object file or a 183 | dynamically linked library. 184 | - A single plugin may contain the implementation of several elements, or just a single one. 185 | 20. What are pads in GStreamer ? Explain using example. 186 | >A> 187 | - Pads are used to negotiate links and data flow between elements in GStreamer. A pad can be 188 | viewed as a “place” or “port” on an element where links may be made with other elements, and 189 | through which data can flow to or from those elements. 190 | - Pads have specific data handling capabilities: A pad can restrict the type of data that flows through it. 191 | - Links are only allowed between two pads when the allowed data types of the two pads are compatible. 192 | - Example: 193 | A pad is similar to a plug or jack on a physical device. Consider, for example, a home theater 194 | system consisting of an amplifier, a DVD player, and a (silent) video projector. Linking the DVD 195 | player to the amplifier is allowed because both devices have audio jacks, and linking the 196 | projector to the DVD player is allowed because both devices have compatible video jacks. Links 197 | between the projector and the amplifier may not be made because the projector and amplifier have 198 | different types of jacks. Pads in GStreamer serve the same purpose as the jacks in the home 199 | theater system. 200 | - For the most part, all data in GStreamer flows one way through a link between elements. Data 201 | flows out of one element through one or more source pads, and elements accept incoming data through one or more sink pads. 202 | - Source and sink elements have only source and sink pads, respectively. 203 | 21. What is GstBuffer ? and what does it contains? 204 | >A> 205 | - A GstBuffer is a lightweight object that is passed from an upstream to a downstream element and contains memory and metadata 206 | - It represents the multimedia content that is pushed to or pulled by downstream elements 207 | - A GstBuffer contains one or more GstMemory objects. These objects hold the buffer's data. 208 | - Metadata in the buffer consists of: 209 | -- DTS and PTS timestamps. 210 | -- The duration of the buffer contents 211 | -- Media-specific offset and offset_end values. For video this is the frame number in the 212 | stream, for audio, the sample number. Other media might use different definitions 213 | -- Arbitrary structures via GstMeta, see below 214 | 22. How to make GstBuffer writable ? 215 | >A> 216 | - A GstBuffer is writable when the refcount of the object is exactly 1, meaning that only one 217 | object is holding a ref to the buffer. 218 | - You can only modify the buffer when it is writable. This means that you need to call gst_buffer_make_writable() 219 | before changing the timestamps, offsets, metadata or adding and removing memory blocks. 220 | 23. gst_memory_map() and gst_buffer_map() 221 | 24. Provide an example of creating a GstMemory object and using the gst_memory_map() to access the memory region 222 | >A> 223 | 224 | [...] 225 | 226 | GstMemory *mem; 227 | GstMapInfo info; 228 | gint i; 229 | 230 | /* allocate 100 bytes */ 231 | mem = gst_allocator_alloc (NULL, 100, NULL); 232 | 233 | /* get access to the memory in write mode */ 234 | gst_memory_map (mem, &info, GST_MAP_WRITE); 235 | 236 | /* fill with pattern */ 237 | for (i = 0; i < info.size; i++) 238 | info.data[i] = i; 239 | 240 | /* release memory */ 241 | gst_memory_unmap (mem, &info); 242 | 243 | [...] 244 | 25. Provide an example of how to create a buffer and access its memory 245 | >A> 246 | 247 | [...] 248 | GstBuffer *buffer; 249 | GstMemory *mem; 250 | GstMapInfo info; 251 | 252 | /* make empty buffer */ 253 | buffer = gst_buffer_new (); 254 | 255 | /* make memory holding 100 bytes */ 256 | mem = gst_allocator_alloc (NULL, 100, NULL); 257 | 258 | /* add the buffer */ 259 | gst_buffer_append_memory (buffer, mem); 260 | 261 | [...] 262 | 263 | /* get WRITE access to the memory and fill with 0xff */ 264 | gst_buffer_map (buffer, &info, GST_MAP_WRITE); 265 | memset (info.data, 0xff, info.size); 266 | gst_buffer_unmap (buffer, &info); 267 | 268 | [...] 269 | 270 | /* free the buffer */ 271 | gst_buffer_unref (buffer); 272 | 273 | [...] 274 | 26. What is the use of GstMeta ? 275 | >A> 276 | - With the GstMeta system you can add arbitrary structures to buffers. These structures describe 277 | extra properties of the buffer such as cropping, stride, region of interest, etc. 278 | - The metadata system separates API specification (what the metadata and its API look like) and its 279 | implementation (how it works). 280 | - This makes it possible to have different implementations of the same API, for example, 281 | depending on the hardware you are running on. 282 | 27. What is GstBufferPool ? 283 | >A> 284 | - The GstBufferPool object provides a convenient base class for managing lists of reusable buffers. Essential 285 | for this object is that all the buffers have the same properties such as size, padding, metadata and alignment. 286 | - A GstBufferPool can be configured to manage a minimum and maximum amount of buffers of a specific size. 287 | - It can also be configured to use a specific GstAllocator for the memory of the buffers. 288 | - There is also support in the bufferpool to enable bufferpool specific options, such as adding GstMeta 289 | to the pool's buffers or enabling specific padding on the buffers' memory. 290 | - A GstBufferPool can be either inactivate or active. In the inactive state, you can configure the pool. 291 | In the active state, you can't change the configuration anymore but you can acquire and release buffers from/to the pool. 292 | 28. Types of pads based on availability and direction 293 | >A> 294 | Availability: Always, Sometimes(Dynamic), & on request 295 | Direction: Source, Sink 296 | 29. What is Always pad ? example 297 | >A> 298 | An "always" pad is continuously active and available for data flow at all times. It allows data to flow 299 | continuously from one element to another without any specific trigger. 300 | e.g. 301 | -- autovideosink - This plugin creates an "always" pad that continuously displays video on the screen. 302 | -- autoaudiosink - An "always" pad that continuously plays audio. 303 | 30. What is Sometimes/Dynamic pad ? Example. 304 | >A> 305 | A "sometimes" or dynamic pad is created or destroyed dynamically during runtime based on specific conditions 306 | or events within the pipeline. It provides flexibility in the pipeline structure. 307 | e.g. 308 | -- tee - This plugin creates dynamic pads, allowing data to be split and sent to multiple branches 309 | in the pipeline. The number of dynamic pads can change dynamically based on the runtime conditions. 310 | -- queue2 - A dynamic pad that buffers data and allows for dynamic buffering and synchronization within the pipeline. 311 | 31. What is On-Request pad ? Example. 312 | >A> 313 | An "on request" pad is initially inactive and requires a specific trigger, such as a function call or an event, 314 | to activate it and start processing data. Data is generated or processed only when explicitly requested. 315 | e.g. 316 | -- appsrc - This plugin creates an "on request" pad that can be triggered to provide data from 317 | an application. It allows applications to push data into the GStreamer pipeline when required. 318 | -- appsink - An "on request" pad that can be triggered to retrieve data from the GStreamer 319 | pipeline. It allows applications to pull data from the pipeline when needed. 320 | 32. What is Ghost pad ? 321 | >A> A pad from some element in the bin that can be accessed directly from the bin as well. 322 | 33. Two types of communication control flow in GStreamer 323 | >A> 324 | 1. Downstream : src element to sink element 325 | 2. Upstream: sink element to src element 326 | 34. Types of GStreamer elements 327 | >A> 328 | 1. Source: generates data 329 | 2. Filter: performs task on input data to send proper output data (convertors, demuxers, muxers, codecs etc) 330 | 3. Sink: receives data 331 | 35. State of the elements 332 | >A> 333 | 1. GST_STATE_NULL: default state; no resources are allocated in this state, not loaded any 334 | runtime libraries, and it can obviously not handle data. 335 | 2. GST_STATE_READY: an element has allocated all of its global/default resources(runtime-libraries, 336 | runtime-memory) within the stream, but the stream is NOT open yet(it has not yet allocated 337 | or defined anything that is stream-specific). 338 | 3. GST_STATE_PAUSED: an element has opened the stream, but no actively processing it. 339 | (clock does NOT run) i.e. An element is ready to accept and handle data. 340 | 4. GST_STATE_PLAYING: an element maintains the open stream while processing it. (clock starts) 341 | 36. What are types of caps negotiation use cases for the source pads ? 342 | >A> 343 | 1. Fixed negotiation: An element can output one format only. 344 | 2. Transform negotiation: There is a (fixed) transform between the input and output format of the 345 | element, usually based on some element property. The caps that the element will produce depend 346 | on the upstream caps and the caps that the element can accept depend on the downstream caps. 347 | 3. Dynamic negotiation: An element can output many formats. 348 | 37. How does communication happen between plugin and application? 349 | 38. What is difference between stream time and running time ? 350 | 39. How can we inject data from outside world (another application) to GStreamer and vice versa ? 351 | 40. What is pre-rolling 352 | 41. Capture -> encoded -> stream-out how pre-rolling will be done? 353 | 42. How Audio Video sync? and how clock is getting sync, sync=true? 354 | 43. base time ? running time? stream time ? 355 | 44. Latency of pipeline? 356 | 45. What is appsrc and appsink ? 357 | 46. 720p I422 frame size ? 358 | 47. What is need of tee element ? Please explain using sample pipeline. 359 | 48. Difference between fakesink and fakevideosink 360 | 49. PTS and DTS 361 | 50. On pausing pipeline how is event propagated in pipeline ? 362 | 51. Which build system does GStreamer uses now ? 363 | >A> Meson 364 | 52. What is GStreamer mono repo ? In which GStreamer version it is available ? 365 | >A> 366 | - In September 2021 all of the main GStreamer modules were merged into a single code 367 | repository, the GStreamer mono repo which lives in the main GStreamer git repository, and this 368 | is where all GStreamer development happens nowadays for GStreamer version 1.19/1.20 and later. 369 | - Before the mono repository merge the different GStreamer modules lived in separate git 370 | repositories and there was a separate meta-builder project called gst-build to download and 371 | build all the subprojects. This is what you should use if you want to build or develop against 372 | older stable branches such as GStreamer 1.16 or 1.18 373 | 53. What should an element do in GST_STATE_CHANGE_NULL_TO_READY & GST_STATE_CHANGE_READY_TO_NULL? 374 | >A> 375 | - When going from NULL to READY state (GST_STATE_CHANGE_NULL_TO_READY), an element should allocate 376 | any non-stream-specific resources and should load runtime-loadable libraries (if any). 377 | - When going the other way around (from READY to NULL, GST_STATE_CHANGE_READY_TO_NULL), an element 378 | should unload these libraries and free all allocated resources. 379 | 54. Is GST_STATE_PAUSED is same as playing state for sink elements? What does they do in 380 | GST_STATE_PLAYING? 381 | >A> 382 | - No. GST_STATE_PAUSED is the state in which an element is ready to accept and handle/process data. 383 | For most elements this state is the same as PLAYING. The only exception to this rule are sink elements. 384 | Sink elements only accept one single buffer of data and then block. At this point the pipeline is 385 | 'prerolled' and ready to render data immediately. 386 | - In GST_STATE_PLAYING? state, sink elements actually render incoming data, e.g. output audio to a 387 | sound card or render video pictures to an image sink. 388 | 55. What is PTS, DTS and duration of the gstreamer buffer? 389 | 56. Assuming 60 fps pipeline, explain what would be PTS,DTS and duration values of each five frames 390 | which are following IPPPP and IBPPP frame patterns. 391 | 392 | --------------------------------------------------------------------------------