Please enable JavaScript.
Coggle requires JavaScript to display documents.
OPERATING SYSTEMS OS3 (Multithreading (Challenges of Multicore (Dividing…
OPERATING SYSTEMS OS3
Multithreading
-
-
-
-
Amdahl's law
The serial portion (part that can't be parallelised) has a disproportionate impact on the speedup that parallelism has
-
User/Kernel threads
User threads
POSIX Pthreads
-
It is a specification, not an implementation
-
-
-
-
-
Multithreading Models
Many to One
many user threads, single kernel thread
-
Multiple threads may not run in parallel, because only one may be in the kernel at a time
-
-
Two-level
Essentially a Many to Many that allows a thread to be bound to a kernel thread (i.e. taking on a 1:1 like characteristic)
Threading Issues
fork() and exec()
-
exec just replaces the running process, including all threads
-
-
Thread-local storage
-
Useful if you don't have control of the thread creation process, like when using Thread Pools
Not local variables, TLS are visible across function executions
Scheduler activations
Many to Many and Two Level require communication to maintain an appropriate number of kernel threads
-
-
-
Thread Scheduling
-
When threads are supported, threads are scheduled, not processes
-
-
Computing Environments
-
Mobile
-
More features such as GPS, gyroscope, accelerometer
-
-
-
-
Peer-to-peer
Clients and Servers are not distinguished, there are only nodes
-
Virtualization
-
Emulation
-
-
Example of when computer language cannot be turned into native code, it is interpreted
Virtualization
OS natively compiled for the CPU, running as a guest OS
-
Cloud Computing
Compute, storage, apps as a service across a network
-
-
-
-
-
-
-
Operating System Design
-
System Goals
Easy to design, implement and maintain
-
-
-
-
-
-
Structure
-
-
-
-
Modules
-
-
-
-
-
Similar to layers, but more flexible
Hybrid
Combine multiple methods to address performance, security, usability needs
-
File System
File
-
-
-
Attributes
-
-
-
-
-
-
Time, date, user identification
-
-
-
-
-
Open Files
-
-
-
Locking
-
-
Exclusive lock
writer lock, only one process can acquire
-
-
-
-
File Sharing
-
On distributed systems, may be via a network
-
-
-
-
-
Use IDs identify users, allowing per-user permissions
Group IDs allow users to be in groups, permitting group access rights
-
-
Layered File System
Device drivers
-
read drive 1, cylinder 72, track 2, sector 10 into mem location 11234
-
File organization module
understands files, logical address, physical blocks
-
Manages free space, disk allocation
Logical file system
Translates file name into file number, handle, location
-
-
-
-
Adds overhead, can decrease performance
-
-
-
-
-
System Structures
Services
User interface
CLI
-
Sometimes in kernel, sometimes in system program
multiple flavours, shells
-
-
-
-
-
-
System Calls
-
-
-
Implementation
-
-
-
The call must obey the API specification, otherwise the caller need not know anything about it
Parameter Passing
-
Parameters stored in block/table in memory, and address passed via a register
-
System Programs
-
-
-
-
-
-
-
Background Services
Services, subsystems, daemons
-
Run in a user context, not kernel context
System Architecture
-
Clustered Systems
-
Asymmetric Clustering
One active, others standby
-
-
-
-