U E D R , A S I H C RSS

Operating System Class/Exam2002_1

1. mainframe computer 의 μš΄μ˜μ²΄μ œμ™€ personal computer 의 μš΄μ˜μ²΄μ œμ™€μ˜ μ£Όμš” 차이점은 무엇인가?

2. λ‹€μŒ μš©μ–΄λ“€μ„ κ°„λ‹¨νžˆ μ„λͺ…ν•˜μ‹œμ˜€.

1) DMA

2) Caching μ—μ„œμ˜ hit ratio λž€?

3) Shell

4) Process


3. 일반적으둜 닀쀑 ν”„λ‘œκ·Έλž˜λ° μ‹œμŠ€ν…œμ—μ„œ λ©”λͺ¨λ¦¬ λ³΄ν˜ΈλΌ μœ„ν•΄ μ–΄λ–€ H/W μž₯μΉ˜κ°€ ν•„μš”ν•˜λ©°, μ–΄λ– ν•œ μ‹μœΌλ‘œ λ©”λͺ¨λ¦¬ λ³΄ν˜ΈλΌ ν–‰ν•˜λŠ”κ°€?

4. system call μ΄λž€ 무엇이며, μ™œ ν•„μš”ν•œκ°€?

5. ν”„λ‘œμ„ΈμŠ€λ“€λΌλ¦¬μ˜ 톡신 λ°©λ²•μœΌλ‘œ Message Passing 방법과 Shared Memory 방법이 μžˆλ‹€. 각각의 방식을 κ°„λ‹¨νžˆ μ„λͺ…ν•˜κ³ , μ„œλ‘œμ˜ μž₯단점을 κΈ°μˆ ν•˜μ‹œμ˜€.

6. short-term, medium-term, long-term Scheduling의 차이점 및 νŠΉμ„±μ— λŒ€ν•΄ κ°„λž΅νžˆ μ„λͺ…ν•˜μ‹œμ˜€.

7. μœ ν•œ μš©λŸ‰ Message Passing 을 μœ„ν•œ send() λ©”μ†Œλ“œμ™€ receive() λ©”μ†Œλ“€μ„ μ™„μ„±ν•˜μ‹œμ˜€. send() λ©”μ†Œλ“œλŠ” queue의 곡간이 μžˆμ„λ•ŒκΉŒμ§€ block ν•˜λ©°, λ°˜λŒ€λ‘œ receive() λ©”μ†Œλ“œλŠ” avariable messageκ°€ μžˆμ„λ•ŒκΉŒμ§€ blockν•΄μ•Ό ν•œλ‹€.

~cpp 
import java.util.*;

public class MessageQueueBounded extends MessageQueue
{
	public MessageQueueBounded() {
		items = new Object[SIZE];
		position = 0;
		isRoom = true;
}

/*
 * This implements a blocking send
 */

public void send(Object o) {
	// wait until there is room
	while (_________________) {
		System.out.println ("Producer Blocked");
		try {
			Thread.sleep(500);
		}
		catch (InterruptedException e) {  }
	}
	System.out.println("Producer UnBlocked");
	_______________ = 0;
	
	if (____________________) {
		isRoom = false;
		System.out.println("Full");
	}
}

/*
 * This implements a blocking receive
 */

public Object receive() {
	// wait until something is there
	while (_________________) {
		System.out.println("Consumer Blocked");
		try {
			Thread.sleep(500);
		}
		catch (InterruptedException e) { }
	}
	System.out.println("Consumer UnBlocked");

	Object it = _________________;
	isRoom = true;
	return it;
}
private Object[] items;
private static final int SIZE = 3;
private volatile int position;
private volatile boolean isRoom;

8. SJF μŠ€μΌ€μ„λ§μ—μ„œ Next CPU burstλΌ κ΅¬ν•˜κΈ° μœ„ν•΄μ„œ μš°λ¦¬λŠ” λ‹€μŒκ³Ό 같은 μ˜ˆμƒμ‹μ„ μ΄μš©ν–ˆλ‹€.
Jn+1 = aTn + (1 - a)Jn

λ§Œμ•½, μ˜ˆμƒ 초기치 (J0 λŠ” 10 이라고 κ°€μ •ν•˜κ³ , μ‹€μ œ CPU burst(ti) κ°€ 6, 4, 6, 4, 13, 13, 13 ....
이라고 κ°€μ •ν•  λ•Œ λ‹€μŒ λ¬ΌμŒμ— λ‹΅ν•˜λΌ.

1) aλΌ 0.7둜 ν–ˆμ„ λ•Œμ˜ μ˜ˆμΈ‘μΉ˜λΌ μΆ”μ ν•˜λΌ.
2) aλΌ 0.5λΌ μ΄ˆκΈ°μΉ˜λ‘œ μ„μ •ν•˜κ³ , 이후 aλŠ” 상황에 따라 κ°€λ³€μ μœΌλ‘œ μ„μ •λœλ‹€λ©΄, 즉,
λ§Œμ•½ ti 와 Jiμ™€μ˜ 차이가 3.0 이상이면 a = 0.7 둜 μ„μ •ν•˜κ³ ,

λ§Œμ•½ ti 와 Jiμ™€μ˜ 차이가 3.0 λΈλ§Œ, 1.0 이상이면 a = 0.5둜 μ„μ •ν•˜κ³ ,

λ§Œμ•½ ti 와 Jiμ™€μ˜ 차이가 1.0 λΈλ§Œμ΄λ©΄ a = 0.3 으둜 μ„μ •ν•œλ‹€λ©΄,

2-1) μ˜ˆμΈ‘μΉ˜λΌ μΆ”μ ν•˜μ‹œμ˜€.

2-2) μ΄λŠ” μ–΄λ–€ νš¨κ³ΌλΌ μœ λ°œν•˜κΈ° μœ„ν•œ 것인가?

2-3) a = 0.5 둜 κ³ μ •μ‹œμΌœ λ†“μ•˜μ„ λ•Œμ™€ λΉ„κ΅ν•˜μ—¬ 차이점을 μ„λͺ…ν•˜μ‹œμ˜€.

9. λ™μ μœΌλ‘œ μš°μ„ μˆœμœ„κ°€ λ³€ν™”λ˜λŠ” preemptive priorty-scheduling algorithm 을 생각해 보자. 큰 값을 가진 μš°μ„ μˆœμœ„ λ²ˆν˜Έκ°€ 더 높은 μš°μ„ μˆœμœ„λΌ κ°€μ§„λ‹€κ³  κ°€μ •ν•˜μž. λ§Œμ•½ ν”„λ‘œμ„ΈμŠ€κ°€ μ΄ˆκΈ°κ°’μœΌλ‘œ μš°μ„ μˆœμœ„κ°’ 0λΌ κ°–κ³ , CPUλΌ κΈ°λ‹€λ¦΄ λ•Œ(ready μƒνƒœ)μ—λŠ” μš°μ„ μˆœμœ„ κ°’ aλΌ κ°–κ³ , running μƒνƒœμ—λŠ” μš°μ„ μˆœμœ„κ°’ b λΌ κ°–λŠ”λ‹€λ©΄,

1) νŒŒλΌλ©”νƒ€ 값이 b > a > 0 의 값을 κ°–λŠ”λ‹€λ©΄ μ΄λŠ” 무슨 μŠ€μΌ€μ„링 μ•Œκ³ λ¦¬μ¦˜μ„ 의λΈν•˜λŠ”κ°€?

2) νŒŒλΌλ©”νƒ€ 값이 a < b < 0 의 값을 κ°–λŠ”λ‹€λ©΄ μ΄λŠ” 무슨 μŠ€μΌ€μ€„λ§ μ•Œκ³ λ¦¬μ¦˜μ„ μ˜λ―Έν•˜λŠ”κ°€? (λ§Œμ•½ μ •ν™•ν•œ μ•Œκ³ λ¦¬μ¦˜ 이름을 κΈ°μˆ ν•˜κΈ°κ°€ μ–΄λ ΅λ‹€λ©΄ μ•Œκ³ λ¦¬μ¦˜μ˜ νŠΉμ„±μ„ μ„€λͺ…ν•˜μ‹œμ˜€)

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:56
Processing time 0.0123 sec