Skip to main content

Interview Questions: Dispatch Queues (Serial Queues, Concurrent Queues)

1. Name few C based API in iOS ?
Ans: SQLITE, GCD

2. What is Concurrency(in iOS) in short?
Ans: It help us to write efficient, fast execution of our app and for more responsive. But at the same time, if we misusing, it will ruin our app with our any mercy. For that reason we should think twice to write any concurrency code.

3. What are most commonly used APIs to implement concurrency Code?
Ans: NSOperation and Dispatch Queues.

4. Name few concepts that needed to write concurrent code?
Ans: Blocks (we call ‘closures' in Swift Programming Language)

5. What are Queues?
Ans: Its a DS(Data Structure) which manages the objects in an order - FIFO(First in First Out)

6. In which form you submit your task to the queue?
Ans: In the form of a block.

7. What is an Dispatch Queues?
Ans: Its one of the ways to perform tasks in asynchronously and concurrently in our applications.

8. What is meant by a Block in iOS?
Ans: Its just a block of Code.

9. Do we have any other queues under the Dispatch Queues?
Ans: Yes.

10. What are Queues under Dispatch Queues?
Ans: Serial Queues, Concurrent Queues.

11. Do we have any thread running by default? If so, what is that?
Ans: Yes, its main Tread.

12. Do we have any Serial Queue running by default?
Ans: Yes, ‘main thread’ is the default Serial Queue.

13. Can we create our own Serial Queue and Concurrent Queue?
Ans: Yes.

14. What is Serial Queue?
Ans: Serial Queue can only execute one task at a time. But at a time we execute multiple tasks from two different serial Queues separately , which means at anytime one serial queue execute only one task.

15. when is the good  situation to use serial Queues?
Ans: Its really for managing shared resource. And its guaranteeing serialized access to the shared resource and prevent race conditions. we can use, when we have a situation to execute tasks in predicable order. 



Will post on Concurrent Queues soon..... 

If you liked it or need any interview Question on specific topic, please leave a comment here..(You can reach me @iosdeveloper.ipa@gmail.com for any assistance on iOS & Unix).

          Have a Happy Interview         

Comments

  1. Nice Blog, When i was read this blog i learnt new things & its truly have well stuff related to developing technology, Thank you for sharing this blog.
    ios course fee in bangalore
    iphone training classes in bangalore

    ReplyDelete
  2. Thanks for Sharing this Valuable Information i like this i Can Share this with My Friend Circle.
    iOS Interview Questions and Answers

    ReplyDelete

Post a Comment

If any of my posts helped you.... or if you feel for any improvement.. you can leave a comment here.. So that, I will try to implement or make corrections for all of us.

Popular posts from this blog

UIKit Framework Hierarchy

UIKIT Framework Hierarchy

CoreData and its Interview Questions

Core Data takes advantage of the Objective-C language and its runtime, and neatly integrates with the Core Foundation framework. The result is an easy to use framework for managing an object graph that is elegant to use and incredibly efficient in terms of memory usage. Every component of the Core Data framework has a specific purpose and function. If you try to use Core Data in a way it wasn't designed for, you will inevitably end up struggling with the framework. Developers new to the Core Data framework often confuse it with and expect it to work as a database. If there's one thing I hope you'll remember from this series, it is that Core Data isn't a database and you shouldn't expect it to act like one. It's the Model in the Model-View-Controller pattern that permeates the iOS SDK. Core Data isn't the database of your application nor is it an API for persisting data to a database. Core Data is a framework that manages an object graph. It&

Middle Level iOS Developer interview questions

Middle Level iOS Developer interview questions 1) App Thinning 2) Steps for pushing application to app store 3) How push notification works 4) How google TEZ app getting near devices for get and send money 5)Retain Concept in iOS 6)Memory management  in iOS 7)ARC means 8) Syntax for shared instance 9) optionals and unwraping 10) Design pattarns 11) Tab bar insertion between screens 12) how to load images in table view using urls for each image by smooth scrolling  13) Extenstions 14)Clousers 15)Life cycles  16)how Table view reusable works?

Like us on Facebbok