---
# System prepended metadata

title: 第三周

---

上課問題
===
what CLI
what system programs
what is microkernel system structure
what is debug
what SYSGEN program



題目
===
* 林子皓
1. what different between the one-step boot and two-step boot?
    Ans:
    * one-step boot:the bootstrap program is already in a fixed in the memory
    * two-step boot:stored a pointer in the memory，and load bootstrap program into memory

2. How OS helps the system run efficiently?
Ans:
    * Resource allocation - When  multiple users or multiple jobs running concurrently, resources must be allocated to each of themMany types of resources - CPU cycles, main memory, file storage, I/O devices.

    * Accounting - To keep track of which users use how much and what kinds of computer resources

    * Protection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other
3.
* 楊秉沅

* 王尚鵬
1. If an application is calling a system call “open()”, please re-order the following steps to make it has the correct order:
    a. OS execute the code
    b. Application call open()
    c. OS use the index number to find the code of open()
    d. Return the result to the application if needed
    e. System call interface find the index number of open()
    
    Ans: b>e>c>a>d
    
2. What is the simplest way to pass parameters to the OS?
    
    Ans: Pass the parameters in the registers.
    
3. What are the six types of system calls?
    
    Ans: Process Control, File Manipulation, Device Manipulation, Information Maintenance, Communication, Protection.
* 楊閔恩
1. When using system calls, sometimes many parameters are required. How are these parameters passed to the operating system? There are three methods, please explain them.
 
    Ans：
    1. simple test：pass the parameters in registers.
    2. Memory Block：parameters store in a block,or table in memory,and address of block passed as a parameter in a register.
    3. stack：parameters placed,or pushed,onto the stack by the program and popped off the stack.

2. What are the advantages and disadvantages of using a microkernel? Please explain.
 
    Ans：
    advantages：
    1. Easier to extend a microkernel.
    2. Easier to move operating systems to new architectures.
    3. More reliable.
    4. More secure
    
    disadvantages：
    1. User space and kernel space will communicate more frequently, and system performance may be affected.