1 / 11

Q:Process Stateu 有哪些 ? 何種情形下會做 transition?

Q:Process Stateu 有哪些 ? 何種情形下會做 transition?. As a process executes, it changes state new : The process is being created running : Instructions are being executed waiting : The process is waiting for some event to occur ready : The process is waiting to be assigned to a processor

Télécharger la présentation

Q:Process Stateu 有哪些 ? 何種情形下會做 transition?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Q:Process Stateu有哪些?何種情形下會做transition? • As a process executes, it changes state • new: The process is being created • running: Instructions are being executed • waiting: The process is waiting for some event to occur • ready: The process is waiting to be assigned to a processor • terminated: The process has finished execution

  2. Q:所謂context主要是包含哪些資料? 或問所謂PCB主要是包含哪些資料? Information associated with each process • Process state • Program counter • CPU registers • CPU scheduling information • Memory-management information • Accounting information • I/O status information

  3. Q:何謂Context Switch? • When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch • Context of a process represented in the PCB • Context-switch time is overhead; the system does no useful work while switching • Time dependent on hardware support

  4. Q:(a)簡單說明OS如何由process A到B做context switching?

  5. Q:Describe the difference among short-term, medium-term, and long-term scheduling? • Long-term scheduler(or job scheduler) – selects which processes should be brought into the ready queue • Short-term scheduler(or CPU scheduler) – selects which process should be executed next and allocates CPU

  6. Addition of Medium Term Scheduling

  7. Schedulers (Cont) • Short-term scheduler is invoked very frequently (milliseconds)  (must be fast) • Long-term scheduler is invoked very infrequently (seconds, minutes)  (may be slow) • The long-term scheduler controls the degree of multiprogramming

  8. Q:說明I/O-bound process&CPU-bound process? • Processes can be described as either: • I/O-bound process– spends more time doing I/O than computations, many short CPU bursts • CPU-bound process– spends more time doing computations; few very long CPU bursts

  9. Q:何謂Interprocess Communication?可能方法? • Processes within a system may be independent or cooperating • Cooperating process can affect or be affected by other processes, including sharing data • Reasons for cooperating processes: • Information sharing • Computation speedup • Modularity • Convenience • Cooperating processes need interprocess communication (IPC) • Two models of IPC • Shared memory • Message passing

  10. Communications Models

  11. Q:Blocking (TRX) vs nonblocking? • Message passing may be either blocking or non-blocking • Blocking is considered synchronous • Blocking send has the sender block until the message is received • Blocking receive has the receiver block until a message is available • Non-blocking is considered asynchronous • Non-blocking send has the sender send the message and continue • Non-blocking receive has the receiver receive a valid message or null

More Related