9. Concepts of Mobile Operating Systems (OS) Flashcards
Mobile Operating System
program that serves as a mediator between user & hardware
- -> Primary (new) goal: Easy usage of actual hardware
- -> Secondary (old) goal: Efficient usage of the hardware
Functions - OS
CONTROLLING & SHARING OF RESOURCES (computation time, memory) – SECURITY FUNCTIONS: PROTECTION of data (memory, hard disk), Process protection (computation time, code), Security module support (SIM-Card) – COMMUNICATION: Allocation of I/O-Resources, processing of communication, user interface
process management
OS has to manage the process (= program in “operation”)
–> uses resources (e.g. CPU-time, memory, files & I/O devices) which are allocated while it’s created or when it’s running
Components of a Process
PROGRAM COUNTER: indicates on which point in code the process resides –> contents of the process registers:
stack (contains temporary data, e.g. subroutine parameters on return addresses etc.) + data section (contains the global variables) + heap (dynamically allocated memory)
States of a Process
NEW: process = created READY: process = waiting to be executed RUNNING: process is running WAITING: process is waiting for results (completion of an I/O-operation, an event) TERMINATED: process = terminated
Process Control Block (PCB)
POINTER(points to parent process)
+ PROCESS STATE
+ PROCESS NUMBER
+ PROGRAM COUNTER (address of the next command to be executed)
+ CPU REGISTERS: accumulator, index register, stack pointer & general registers (for storing)
+ MEMORY LIMITS
+ LIST OF OPEN FILES…
multiprogramming
several processes are being run in parallel for: maximization of the CPU usage, enabling users to operate several programs simultaneously & enabling several users to work on the same machine simultaneously —> on a CPU only 1 process = running at a time (process switching must be fast -> queues)
Scheduling in Queues
Ready Queue: processes are already in main memory & are waiting for their chance to be executed --process = assigned to CPU --can get terminated --can go to I/O request, wait in I/O queue, go to I/O, back to ready queue & to CPU --running through several rounds
algorithms
if CPU = idle (no process running), scheduler invokes a process from the ready-queue to be run on the CPU –> there are different methods (algorithms) to make the choice which process to invoke
criteria -> which process to invoke?
CPU-UTILIZATION (goal = maximize CPU usage) THROUGHPUT (number of finished processed per time unit) TURNAROUND-TIME (time interval between beginning & end of process) LATENCY TIME (sum of all waiting time of all processes in queue) RESPONSE TIME (time span of process to answer user’s request & to generate answer)
priority systems in scheduling
SHORTEST JOB FIRST: processes executed in order of execution time (optimal with regard to latency time BUT complex processes can starve to death)
—
PRIORITY SCHEDULING: execution in order of assigned priority (starvations with low priority number)
—
ROUND ROBIN SCHEDULING: assigning time slices of time interval to process in queue & after time slice of a process expired, CPU revoked from process & placed at end of queue (good for time-sharing system BUT efficiency of method depends on time interval)
Mapping
usage of symbolic addresses during programming that get mapped to physical addresses later on / is done by memory management unit
Binding
conversion of symbolic addresses to logical addresses in the memory of OS
logical addresses vs. physical addresses
LOGICAL: generated by CPU (virtual address) / PHYSICAL: sent to memory unit
Limit Register
(in mapping) Memory of a system contains actual OS
-> access of further processes onto code of OS needs to be prevented & processes need to be protected against each other (limit register as a solution)