Lưu Trọng Tú 22IT.EB085

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1.

Which command is used to clear the screen and display the operating system prompt
on the first line of the display?

A. Cd

B. Md

C. Cls

D. Rename

2. Maximum length of DOS command using any optional parameter is _________

A. 26 characters

B. 87 characters

C. 127 characters

D. 156 characters

3. Which of the following is not a part of the operating system?

A. Input/output control program

B. Job control program

C. Supervisor

D. Performance monitor

4. Which of the following is not an operating system?

A. UNIX

B. MS-DOS

C. CP/M

D. PASCAL

5. Computer system is divided into how many numbers of components?

A. 1
B. 2

C. 3

D. 4

6. What is the name of the operating system that reads and reacts in terms of actual
time?

A. Real time system

B. Time sharing system

C. Quick response system

D. Batch system

7. Which of the following software is used to simplify using of system software?

A. Time sharing

B. Multi-tasking

C. Operating environment

D. Spreadsheet

8. Context switching is part of……………

A. Interrupt servicing

B. Interrupt handling

C. Polling

D. Spooling

9. Which of the following is an example of a spooled device?

A. A graphic display device

B. A line printer used to print the output of a number of jobs

C. A secondary storage device in a virtual memory system


D. A terminal used to enter input data to a running program

10. Operating system is resident in memory of which part?

A. Middle

B. Lower

C. Upper

D. All of mentioned answers

11. Two basic types of operating systems are…………..

A. Batch and interactive

B. Sequential and real time

C. Batch and time share

D. Sequential and direct

12. An operating system is a program that operates between users and …….?

A. Computer software

B. Computer hardware

C. The application programs

D. CPU and memory

13. In the classification of the operating system model, the type with multiple processors
shares the transmission line, data, clock, memory, and peripheral devices in the form of……..

A. Multi-chapter processing system

B. Multitasking system

C. Parallel processing system

D. Real-time processing system

14. Which function is started at the end of kernel bootstrap?


A. /etc/kernel

B. /etc/init

C. /etc/user

D. /etc/swap

15. What is the register that contains the memory address of the next instruction to be
fetched?

A. Program counter

B. Stack pointer

C. Program status word

D. CPU and memory

16. Which is the suitable real-time system for a car assembly line?

A. Soft real-time system

B. Hard real-time system

C. Both soft real-time and hard real-time system are suitable

D. It depends on the system developer.

17. Which one of the following error will be handle by the operating system?

A. Power failure

B. Lack of paper in printer

C. Connection failure in the network

D. All of the mentioned

18. The turnaround time for short jobs during multiprogramming is usually Shortened and
that for long jobs is slightly ___________?

A. Shortened
B. Unchanged

C. Lengthened

D. Shortened

19. Time quantum can be said?

A. Multilevel queue scheduling algorithm

B. Round-robin scheduling algorithm

C. Shortest job scheduling algorithm

D. Priority scheduling algorithm

20. In Unix, Which system call creates the new process?

A. Fork

B. Create

C. New

D. None of the mentioned

Bài tập 1 :
cho chuỗi : 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1
với 3 khung trang, ban đầu đều trống.
Có bao nhiêu lỗi trang xảy ra khi sử dụng các thuật toán thay thế sau đây: LRU, FIFO, OPT
LRU

RS 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
F0 7 7 7 2 2 2 2 4 4 4 0 0 0 1 1 1 1 1 1 1
F1 0 0 0 0 0 0 0 0 3 3 3 3 3 3 0 0 0 0 0
F2 1 1 1 3 3 3 2 2 2 2 2 2 2 2 2 7 7 7
PF * * * * * * * * * * * *
Có 12 lỗi trang

FIFO

RS 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
F0 7 7 7 2 2 2 2 4 4 4 0 0 0 0 0 0 0 7 7 7
F1 0 0 0 0 3 3 3 2 2 2 2 2 1 1 1 1 1 0 0
F2 1 1 1 1 0 0 0 3 3 3 3 3 2 2 2 2 2 1
PF * * * * * * * * * * * * * * * * *
Có 17 lỗi trang

OPT

RS 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
F0 7 7 7 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 7 7
F1 0 0 0 0 0 0 4 4 4 0 0 0 0 0 0 0 0 0 0
F2 1 1 1 3 3 3 3 3 3 3 3 1 1 1 1 1 1 1
PF * * * * * * * * *
Có 9 lỗi trang

Bài 2:

Xét một hệ thống có bộ nhớ luận lý có 8 trang, mỗi trang có 256 dòng, mỗi dòng chứa 32
từ, mỗi từ là 8 byte được ánh xạ vào bộ nhớ vật lý có 64 trang.

a. Địa chỉ bộ nhớ vật lý có bao nhiêu bit?

b. Địa chỉ bộ nhớ luận lý có bao nhiêu bit?

c. Có bao nhiêu mục trong bảng phân trang? Mỗi mục chứa bao nhiêu bit?

a. Địa chỉ bộ nhớ vật lý có bao nhiêu bit?

Số khung trang: 64 trang => có log2(64) = 6

Số bits cho offset

256 x 32 x 8 = 65536 byte

=> số bits cho offset là log2(65536) = 16 bits

Địa chỉ vật lý gồm: 16 + 6 = 22

b. Địa chỉ bộ nhớ luận lý có bao nhiêu bit?

8 trang cần log2(8) = 3

Địa chỉ luận lý là: 16 + 3 = 19 bits

c. Có bao nhiêu mục trong bảng phân trang? Mỗi mục chứa bao nhiêu bit?

Có 8 mục trong bảng phân trang

Mỗi mục cần 3 bits để biểu diễn

You might also like