Mobile App Development 2022W Lecture 21
Video
Video from the lecture given on April 1, 2022 is now available:
Video is also available through Brightspace (Resources->Zoom Meetings (Recordings, etc.)->Cloud Recordings tab). Note that here you'll also see chat messages.
Notes
Lecture 21
----------
Sending out emails today for randomized interview requests
- will message on Teams when all emails have been sent
Please try to sign up for slots on Monday or Tuesday
- I'll add slots if needed
You can sign up for interviews right now if you want to volunteer
- on Teams, under the Annoucements channel, there's an "Interviews" tab which connects to a spreadsheet
- if you want to ask about the grading of a question, please sign up for an interview
Remember the final exam is cumulative
- so it will have SwiftUI & Android (so Swift & Kotlin)
- bit more Android than SwiftUI
- no Storyboard except perhaps in extra credit
- expect there to be questions connecting the two
Operating systems
-----------------
Both Android and iOS are built on UNIX-like systems
- Linux, MacOS/BSD UNIX
First versions of UNIX were built in the 1970's
- around 50 years ago!
Still has same basic architecture
Key terms:
- kernel
- process
What is a process (in an OS context)?
- running program
A program on disk (program binary/executable) is loaded into a process in order for it to actually run
- as part of this, it gets a certain amount of memory and some time to run on the CPU
Processes are the abstraction that allows multiple programs to run on one computer at the same time
- RAM is partitioned so each process can get some
- the CPU is multiplexed
- one program runs for 1/100 of a second, then another runs for 1/100 of a second, and so on (they take turns)
- nobody gets to run for more than their alloted time
For a process to take up multiple cores, it must be multithreaded
- each thread runs on one core
- all threads of a process together share memory, together they make a process
The OS kernel is the program that facilitates sharing between running programs
- it implements the process abstraction
- it thus is "in charge", can create and destroy processes at will
(and can create and destroy any data, communicate with anything)
How can the kernel be "in charge"?
- well, it ran first! (It was started first, it then lauchches all the processes)
- it runs in a special CPU mode, supervisor mode
- regular processes run in user mode, and so have more limited access
This is why when regular programs crash, they don't take the whole system down
- but if your GPU driver crashes, it can kill your whole system, because
it runs in the kernel
Mobile operating systems are mostly the same as desktop ones (and server ones)
- same basic kernels & processes
But mobile ones have some extra restrictions
- processes tend to be more sandboxed (isolated from other processes)
- especially on iOS
- extensive "permission" infrastructure for gaining access to special resources
- location, camera, address book