iOS Interview Prep 7 — Concurrency Part 1

Xiao.J
5 min readMay 11, 2023

The purpose of this interview preparation series is to assist you in quickly refining your interview skills and thoroughly preparing for the typical questions asked during an iOS interview. If you find it useful, please leave a comment or tap the like button.

Interview Questions

  • What’s the difference between asynchronous and synchronous task
  • Explain how Grand Central Dispatch (GCD) works?
  • What mechanisms does iOS provide to support multi-threading?
  • What are common concurrency issues and how to avoid them?
  • Difference between the atomic and nonatomic attributes in Obj-C?

Overview

Concurrency refers to the ability to perform multiple tasks simultaneously. It’s useful for improving the performance and responsiveness of the app, as it allows different parts of the app to run independently without blocking each other. It is one of the top topics asked during an interview, expect questions about GCD and Operation Queues for senior positions.

Quick Recap: Process vs Thread

A process is an application in execution. Each process has its own memory space, system resources, execution state. Processes are isolated from each other and do not share memory or resources.

Threads share the same memory space and resources. Multiple threads can execute at concurrently…

--

--

Xiao.J

Ex-Meta with 10+ years of experience in iOS Development 