












Preview text:
  lOMoAR cPSD| 58702377 CÂU HỎI TRẮC NGHIỆM  Phần 1   Câu 1  
Lập trình đa luồng là gì?  
a. Đó là một quá trình trong đó hai quá trình khác nhau chạy đồng thời 
b. Đó là một quá trình trong đó hai hoặc nhiều phần của cùng một quá trình chạy  đồng thời  
c. Đó là một quá trình trong đó nhiều quá trình khác nhau có thể truy cập cùng một  thông tin 
d. Đó là một quá trình trong đó một quá trình có thể truy cập thông tin từ nhiều nguồn  Câu 2  
Câu nào sau đây là sai: 
a. By multithreading CPU’s idle time is minimized, and we can take maximum use of it 
b. By multitasking CPU’s idle time is minimized, and we can take maximum use of it 
c. Two thread in Java can have same priority 
d. A thread can exist only in two states, running and blocked   Câu 3 
Phương thức nào sau đây của lớp Thread được sử dụng để tạm dừng một luồng trong một khoảng  thời gian?  a. sleep()  b. terminate()  c. suspend()  d. stop()  Câu 4 
Phương pháp nào sau đây được sử dụng để bắt đầu thực thi một luồng?  a. run()   b. start()  c. runThread()  d. startThread()  Câu 5 
Lớp nào sau đây được dùng để tạo luồng?    lOMoAR cPSD| 58702377 a. String  b. System  c. Thread   d. Runnable          lOMoAR cPSD| 58702377 Phần 2  Quản lý bộ nhớ   Câu 1 
The role of memory manager is  
a. To allocate memory to processes 
b. To control the use of memory by processes   c. To run programs  d. To store information  ---------------------------- 
Vai trò của quản lý bộ nhớ là  
a. Cấp phát bộ nhớ cho các tiến trình 
b. Để kiểm soát việc sử dụng bộ nhớ theo quy trình  
c. Để chạy các chương trình 
d. Để lưu trữ thông tin  Câu 2 
Memory management system with only one user process in the memory at one time is  known as   a. Virual memory  b. Multiprogramming  c. Monoprogramming   d. Swapping 
------------------------------------ 
Hệ thống quản lý bộ nhớ chỉ có một tiến trình người dùng trong bộ nhớ tại một thời  điểm được gọi là  a. Bộ nhớ ảo  b. Đa chương trình  c. Lập trình đơn   d. Hoán đổi    lOMoAR cPSD| 58702377 Câu 3 
Swapping là một kỹ thuật quản lý bộ nhớ mà: 
a. keeps all processes in the memory 
b. brings a process into the memory when it is needed and brings processes that is 
not needed out of memory  
c. allows secondary memory to be addressed as though it were part of main memory. 
d. keeps only one process in the meory at one time 
 Đáp án: b. đưa một tiến trình vào bộ nhớ khi cần và đưa ra ngoài bộ nhớ các tiến trình  không cần thiết      Câu 4 
Một câu phát biểu sai về bộ nhớ ảo dựa trên phân trang là: 
a. Program’s address space is broken up into fixed size pages 
b. Physical memory is divided into fixed size page frames 
c. If instruction refers to a page not in the memory, the memory manager gets the 
page, reads it in, and re-starts the instruction 
d. The number of pages must be equal to the number of page frames               Phần 3  Câu 1  
Increasing the RAM of a computer typically improves performance because: 
(A) Virtual memory increases 
(B) Larger RAMs are faster 
(C) Fewer page faults occur 
(D) Fewer segmentation faults occur 
--------------------------------------------- 
Tăng RAM của máy tính thường cải thiện hiệu suất vì:  (A) Tăng bộ nhớ ảo 
(B) RAM lớn hơn sẽ nhanh hơn    lOMoAR cPSD| 58702377
(C) Ít xảy ra lỗi trang hơn 
(D) Xảy ra ít lỗi phân đoạn hơn   
Explanation: When there is more RAM, there would be more mapped virtual pages in physical 
memory, hence fewer page faults. A page fault causes performance degradation as the page has 
to be loaded from secondary device.  Câu 2 
Một hệ thống máy tính hỗ trợ địa chỉ ảo 32 bit cũng như địa chỉ vật lý 32 bit. Vì không còn bộ nhớ 
ảo, điều nào dưới đây là đúng? 
(A) EfÏcient implementation of multi-user support is no longer possible 
(B) The processor cache organization can be made more efÏcient now (C) Hardware 
support for memory management is no longer needed  
(D) CPU scheduling can be made more efÏcient now 
 Đáp án: C. Hỗ trợ phần cứng cho quản lý bộ nhớ không còn cần thiết nữa 
Explanation: For supporting virtual memory, special hardware support is needed from Memory 
Management Unit. Since operating system designers decide to get rid of the virtual memory 
entirely, hardware support for memory management is no longer needed  Câu 3  Bộ nhớ ảo là: 
(A) Large secondary memory  (B) Large main memory 
(C) Illusion of large main memory  (D) None of the above 
 Đáp án: C. Ảo giác về bộ nhớ chính lớn 
Explanation: Virtual memory is illusion of large main memory.  Câu 4 
Nội dung thiết yếu trong mỗi mục của bảng trang là: 
(A) Virtual page number  (B) Page frame number 
(C) Both virtual page number and page frame number 
(D) Access right information 
 Đáp án: C. Cả số trang ảo và số khung trang  Explanation: 
A page table entry must contain Page frame number. Virtual page number is typically used as index 
in page table to get the corresponding page frame number. 
------------------------------------------------    lOMoAR cPSD| 58702377 Phần 4  I/O Management  Câu 1 
Chính sách lên lịch đĩa nào sau đây tạo ra ít chuyển động đầu đọc nhất?  (A) FCFS  (B) Circular SCAN  (C) Elevator    
Answer: (C)    
Explanation: Circular scanning works just like the elevator to some extent. It begins its scan toward 
the nearest end and works its way all the way to the end of the system. Once it hits the bottom or 
top it jumps to the other end and moves in the same direction. Circular SCAN has more head 
movement than SCAN (elevator) because Circular SCAN has circular jump and it does count as a  head movement. 
SCAN (elevator) is the best choice here.  Câu 2 
Hình thức giao tiếp nào dưới đây mô tả chế độ I/O?  Source: nptel 
(A) Programmed mode of data transfer  (B) DMA  (C) Interrupt mode 
(D) Polling  Đáp án: D. Polling Answer: (D) Explanation: See Polling      Phần 5  
File Management    --------------------------- 
Trả lời – Phần 5  
1d); 2d); 3a); 4a); 5c) 6b) ---------------------------------  Câu 1  
A basic element of data in a file is:  
(Thành phần cơ bản của dữ liệu trong một tệp là:)   a. Memory  b. Record  c. Value    lOMoAR cPSD| 58702377 d. Field   Explanation 
A basic element of data in a file is a field. A field is a specific piece of information within a record 
that represents a single attribute or characteristic. It can hold a value or multiple values related 
to that attribute. For example, in a database of employees, a field could be "employee name" or 
"employee ID." Fields are used to organize and store data in a structured manner, allowing for 
efÏcient retrieval and manipulation of information within a file.  Câu 2  
_____ đề cập đến các bản ghi logic.    a. Physical organization    b. Logical organization 
c. Structural organization  d. File organization  Explanation 
File organization refers to the logical structuring of records. It involves arranging data in a 
systematic manner within a file, which allows for efÏcient storage, retrieval, and manipulation of 
information. This can include various methods such as sequential, indexed, or hashed file 
organization. By organizing files, it becomes easier to locate and access specific data, improving 
overall efÏciency and effectiveness in data management.      Câu 3 
Records are treated as a unit. 
Các bản ghi được xử lý như một đơn vị.  a. True  b. False  Explanation 
Records are treated as a unit means that when dealing with a database, all the information related 
to a particular record is considered together. This means that any changes or updates made to the 
record will affect all the fields and attributes associated with it. Treating records as a unit ensures 
data integrity and consistency within the database. Therefore, the correct answer is True.  Câu 4 
Loại tổ chức tệp nào sau đây lưu trữ dữ liệu theo thứ tự và có chỉ mục:  a. Pile    lOMoAR cPSD| 58702377 b. Sequential  c. Indexed  d. Indexed Sequential  
Đáp án: d. Lập chỉ mục tuần tự  Explanation 
In the "Pile" file organization, data is collected in the order in which they arrive, with each record 
consisting of one burst of data. This means that the records are simply added to the file as they 
come in, without any specific organization or structure. The data is stored in a continuous manner, 
with no particular indexing or sequencing applied. This type of file organization is simple and 
straightforward, but it can make searching and accessing specific records more time-consuming  and inefÏcient.                Câu 5 
The ______maintains the key characteristic of the sequential file: Records are organized in 
sequence based on a key field.  a. Pile  b. Sequential  c. Indexed    d. Indexed Sequential  ----------------------- 
______ duy trì đặc điểm chính của tệp tuần tự: Các bản ghi được sắp xếp theo thứ tự dựa  trên trường khóa.  a. Một đống  b. Tuần tự 
c. Tuần tự được lập chỉ mục  d. Lập chỉ mục   -----------------------------    lOMoAR cPSD| 58702377 Explanation 
Indexed Sequential maintains the key characteristic of the sequential file by organizing records in 
sequence based on a key field. This means that the records are stored in a specific order 
according to the values in the key field, allowing for efÏcient searching and retrieval of records 
based on this key. Additionally, the index component of the indexed sequential file helps to 
further enhance the performance by providing a separate data structure that allows for faster 
access to specific records. Câu 6  
Hệ thống đặt chỗ hàng không và hệ thống kiểm soát kho là ví dụ của hệ thống __  a.  Sequential file    b. Indexed file 
c. Indexed Sequential file  d. None of the above  Explanation 
Airline reservation systems and inventory control systems typically use indexed files. Indexed files 
allow for efÏcient access and retrieval of data by using a separate index structure that contains 
pointers to the actual data records. This index structure enables quick searching and sorting of 
data, making it suitable for applications that require frequent data retrieval and updates. 
Sequential files, on the other hand, store data in a sequential order and do not provide efÏcient 
access to specific records. Therefore, the correct answer is indexed file. --------------------------------
--------------------------------     
Phần 6 – (Làm trước)   Process Management  Câu 1 
Sự khác biệt giữa chương trình và quy trình là chương trình là thực thể tích cực trong khi quy trình 
là thực thể thụ động.  a. True  b. False   Explanation 
The explanation for the given correct answer, which is False, is that the statement is incorrect. The 
difference between a program and a process is not that a program is an active entity while a 
process is a passive entity. In fact, it is the opposite. A program is a passive entity that resides on a 
storage device, while a process is an active entity that is created when a program is loaded into 
memory and executed. Therefore, the correct answer is False.  Câu 2     lOMoAR cPSD| 58702377
Khi một tiến trình con được tạo ra, điều nào dưới đây là khả năng có thể xảy ra liên quan đến không 
gian thực thi hoặc không gian địa chỉ của tiến trình con? 
a. The child process has a new program loaded into it 
b. The child process runs concurrently with the parent 
c. The child is a duplicate of the parent  d. All of the above  
Đáp án: d. Tất cả các câu trên  Explanation 
When a child process is created, it is possible for the child process to have a new program loaded 
into it. This means that the child process can start executing a different program than the parent 
process. Additionally, the child process can run concurrently with the parent process, meaning that 
both processes can execute simultaneously. Lastly, the child process can be a duplicate of the 
parent process, which means that it inherits the same code, data, and resources from the parent 
process. Therefore, all of the given statements are possibilities in terms of the execution or address  space of the child process.        Câu 3 
Một khối điều khiển tiến trình (PCB) ____ 
a. Is an example of a process queue. 
b. Determines which process is to be execute next. 
c. Includes information on the process’s state.  
d. Stores the address of the next instruction to be processed by a different process. 
Đáp án: c. Bao gồm thông tin về trạng thái của tiến trình  Explanation 
A process control block includes information on the process's state. This means that it contains 
details about the current status of the process, such as the values of its registers, the priority level, 
the program counter, and other relevant information. This information is crucial for the operating 
system to manage and control the execution of processes effectively. By having access to the 
process's state, the operating system can make informed decisions about scheduling, resource 
allocation, and process management.  Câu 4 
____ cung cấp API để tạo và quản lý chủ đề.    lOMoAR cPSD| 58702377   a. Set of system calls    b. Thread library  c. Multithreading model  d. Multicore system 
Đáp án: b. thư viện luồng  Explanation 
A thread library provides an API for creating and managing threads. This library includes various 
functions and methods that allow programmers to create, start, pause, resume, and terminate 
threads. It also provides synchronization mechanisms like locks, semaphores, and condition 
variables to ensure proper coordination and communication between threads. By using a thread 
library, developers can easily implement multithreading in their applications without having to 
directly deal with low-level system calls or the complexities of managing threads at the operating  system level.  Câu 5 
Một luồng được cấu thành từ một ID luồng, bộ đếm chương trình, tập hợp thanh ghi và heap.  a. True  b. False   Explanation 
A thread is not composed of a heap. A thread is a lightweight process that consists of a thread ID, 
program counter, and register set. The heap, on the other hand, is a region of memory used for 
dynamic memory allocation. Therefore, the statement that a thread is composed of a thread ID, 
program counter, register set, and heap is false.  Câu 6 
Mô hình đa luồng ____ phân bổ nhiều luồng cấp người dùng cho số lượng luồng kernel ít hơn hoặc  bằng số lượng.    a. One-to-one model    b. Many-to-many model  c. Many-to-one model  d. Many-to-some model  Explanation 
The many-to-many multithreading model allows for the mapping of many user-level threads to an 
equal or smaller number of kernel threads. This model provides flexibility and efÏciency by allowing 
multiple user-level threads to be executed concurrently on multiple kernel threads. The mapping 
between user-level and kernel threads can be dynamically adjusted, allowing for better load 
balancing and resource utilization.    lOMoAR cPSD| 58702377         Câu 7 
Có thể có sự đồng thời mà không cần song song không?  a. True  b. False  Explanation 
Concurrency refers to the ability of a system to execute multiple tasks simultaneously, while 
parallelism refers to the actual execution of those tasks simultaneously. In other words, 
concurrency is about managing multiple tasks at the same time, but not necessarily executing 
them simultaneously. Therefore, it is possible to have concurrency without parallelism, where 
tasks are managed and scheduled to run concurrently, but not necessarily executed in parallel.  Câu 8 
Hầu hết các hệ điều hành hiện đại đều hỗ trợ các luồng nhân.  a. True  b. False  Explanation 
The statement suggests that most modern operating systems have the capability to support kernel 
threads. This means that these operating systems can handle multiple tasks simultaneously by 
dividing them into smaller units of execution called threads. Kernel threads are managed by the 
operating system's kernel, which allows for efÏcient multitasking and resource sharing. Therefore,  the given statement is true.      Câu 9 
Một ______________ lưu trạng thái của tiến trình đang chạy và phục hồi trạng thái của tiến trình  tiếp theo sẽ chạy.  a. None of the above  b. Save-and-restore  c. Context switch  d. State switch    lOMoAR cPSD| 58702377 Explanation 
A context switch is the process of saving the current state of a running process and restoring the 
state of the next process to be executed. This allows the operating system to efÏciently manage 
multiple processes by temporarily suspending one process and resuming another. During a context 
switch, the operating system saves the current process's state, including its program counter, 
registers, and other relevant data, and then loads the saved state of the next process to be 
executed. This ensures that each process can continue from where it left off, maintaining the 
illusion of concurrent execution.  Câu 10 
Một tiến trình đã kết thúc, nhưng tiến trình cha chưa ngừng (), được gọi là tiến trình _____  a. Terminated  b. Orphan  c. Zombie  d. Init  Explanation 
A zombie process is a process that has terminated but still exists in the process table because its 
parent process has not yet called the wait() system call to retrieve its exit status. This can happen if 
the parent process has terminated or is not properly handling its child processes. Zombie 
processes do not consume system resources but can still occupy space in the process table until 
they are properly reaped by the parent process.    Câu 11 
Trong một hệ thống máy tính có một bộ xử lý đơn, sẽ không bao giờ có hơn một tiến trình trong  trạng thái Running.  a. True  b. False  Explanation 
In a single-processor system, only one process can be executed at a time. The processor can only 
handle one instruction at a time and can only switch between processes through context 
switching. Therefore, it is true that there will never be more than one process in the Running state  in a singleprocessor system. 
=====================================================