操作系统知识点

操作系统

IPC

  • 共享内存
  • 管道
  • socket
  • RPC romote procesure calls

同步机制

  • Semaphore And PV
  • Mutex
  • Monitor
Android中的同步
  1. Mutex framework/native/include/utils/Mutex.h
    就是对pthread的封装

  2. Condition framework/native/include/utils/Condition.h
    包装Mutex

  3. Barrier
    framework/native/services/surfaceflinger/Barrier.h 对Condition的实现

    wait()是先释放锁,再休眠,最后再去获取锁,而且当wait()返回的时候已经释放锁。

内存管理

  • Virtual Memory

    1. Logic Address ---> Segment Selector +Offset
    2. Linear Address---> 段基地址 + 段内偏移量
    3. Physical Address---> 页基址 + 页内偏移
  • 内存的分配与回收

    1. native malloc/free and new/delete
    2. java gc
  • mmap Mermory Map

    • 设备/文件映射到进程的内存空间
  • Copy On Wirte 写时拷贝技术

  • CopyOnWriteArrayList

你可能感兴趣的:(操作系统知识点)