[作業系統]的問題(急)

(a) I/O-bound的程式在執行時,花費的等待I/O的時間比花費在處理器上的時間還要多

而processor-boune的程式則剛好相反 假設有個短程排成演算法,會讓那些最近

很少使用處理器的行程有較高的優先順序,請解釋為何這個演算法將會比較偏袒

I/O-bound的程式並且不會永久拒絕讓processor-boune程式使用處理器的時間

(b)系統呼叫(system call)的目的是什麼?系統呼叫如何與作業系統和雙模式

(核心模式及使用者模式)運作有關?

Update:

拜託大大求救

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    (a) I/O-bound的程式在執行時,花費的等待I/O的時間比花費在處理器上的時間還要多

    而processor-bound的程式則剛好相反 假設有個短程排成演算法,會讓那些最近

    很少使用處理器的行程有較高的優先順序,請解釋為何這個演算法將會比較偏袒

    I/O-bound的程式並且不會永久拒絕讓processor-bound程式使用處理器的時間

    Answer: There are a

    few reasons why the preference given to IO bound processes is fair and it will

    not starve the CPU bound processes.

    (A1) the nature of IO bound processes is that they will give

    up CPU voluntarily and frequently when performing IO.

    (A2) IO usually takes a longer time to perform than CPU

    computation, so IO bound processes are not CPU hugging.

    (A3) processor-bound processes are CPU hugger – if they are

    given higher preference, the other processes are likely to starve.

    (b)系統呼叫(system call)的目的是什麼?System calls are made from an

    application program to request the OS to perform certain services that use the

    resources controlled by the OS.

    系統呼叫如何與作業系統和雙模式(核心模式及使用者模式)運作有關?System

    call may allow the program execution within the kernel mode (核心模式?)

    instead of the user mode (使用者模式?) when the resources to support

    the requested services require higher privilege level. For example, a user application may make a

    system call to load another program to be executed. The loading of the code may need to be

    executed in kernel mode.

Still have questions? Get your answers by asking now.