열렬히.뛰기

질문 : 필로소퍼 / 미니쉘

취업 준비 > 기술면접 : 예상 > 질문 : 필로소퍼 / 미니쉘

  1. Difference between Process and Thread
    1. Both are for the fundamental units of execution in computing, but different ways
    2. Process : instance of program, has its own memory space, OS controls communication between processes, IPC
    3. Thread : a sub-unit of process. shares memory & resources with process. Needs less resources to operate. (reasons to do multi-thread programming)
  2. What is context switching?
    1. A fundamental feature of OS, allowing a single CPU to handle multiple process/thread efficiently by switching between them
    2. context = state of current process / thread, includes current register values, data, etc.
    3. saved state is stored in process control block
    4. It is essential for multitasking, but it comes with overhead.
  3. What is ‘Thread-safe’?
    1. multi-threading environment without data corruption or unpredictable behavior such as deadlock, race condition
    2. usually, occur, because, try, access, same resource at once
    3. mutexes, semaphores are tools for make thread-safe.
  4. 교착상태와 기아상태의 해결방법
    1. Prevent deadlock by controlling the sequence of process & allocating resource
    2. Starvation : Aging(give the chance to a process that didn’t get chance to be served), Fairness(make fair policies)
  5. 가상 메모리
    1. memory management technique
    2. use storage such as HDD or SSD as a temporary space
    3. To make space, the system may swap out other pages back and forth.
    4. benefits : increased app concurrency, increase of attainable memory space