0% found this document useful (0 votes)
10 views

nguyên-lí

Uploaded by

thuanln.23ite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

nguyên-lí

Uploaded by

thuanln.23ite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Câu hỏi trắc nghiệm và ôn tập quản lý bộ nhớ

Phần trắc nghiệm:

Memory hierarchy comprises of Disk, RAM memory, Cache. Select the increasing order of
their access time by CPU for an instruction or date.

A. Disk, RAM, Caches

B. RAM, Disk, Caches

C. Caches, RAM, Disk

D. Ram, Caches, Disk

_____memory allocation avoid problems of wastage of memory and the problems of


underestimating the memory size.

A. Dynamic memory allocation

B. Static memory allocation

C. Contiguous memory allocation

D. None-contiguous memory allocation

Given a two-level page table for 32-bit virtual address with each 10 bits for Page table 1 and
2 and the rest for the offset. Suppose that process A need 12 Mb for running, its virtual
address 0x00403004 refers to address range from:

A. 0 to 4 Mb-1

B. 4 to 8 Mb-1

C. 8 to 12 Mb-1

D. 12 to 16 Mb-1

Process B has a virtual address space with 4 KB for each page. Given its page 2, 3, 5 is
mapped to page frame 1, 4, 6 respectively. The physical addresses of the virtual addresses
20530, 8239, 12387 are:

A. 20245, 8196, 5277

B. 12433, 5641, 20128

C. 16434, 12335, 8291

D. 24626, 4143, 16483


Why Spooling helps?

A. while printing when computer release to do other things

B. jobs go more smoothly with less stop

C. printing it is a more secure method of accessing data

D. none of the mentioned

OS spends much of its time paging also instead of executing applications software, it is
called_________?

A. spooling

B. formatting

C. thrashing

D. booting

How much time will spend when LRU replaces the page?

A. shortest time in memory

B. shortest time in memory without being referenced

C. longest time in memory

D. longest time in memory without being referenced

An address space of 8 pages, each page is 1K in size and mapped into 32 page frames in
memory. How many bits must be used to represent the logical address of this address space?

A. 32 bit

B. 8 bit

C. 24 bit

D. 13 bit

Memory management is_________.

A. Critical for even the simplest operating systems

B. Not used on multiprogramming systems

C. Replaced with virtual memory on current systems


D. Not used in modern operating systems

The address loaded into the memory address register of the memory is referred to as
____________

A. Physical address

B. Logical address

C. Neither physical nor logical

D. None of the mentioned

The run time mapping from virtual to physical addresses is done by a hardware device called
the ____________

A.Virtual to physical mapper

B.Memory management unit (MMU)

C.Memory mapping unit

D.None of the mentioned

The size of a process is limited to the size of ____________

A. physical memory khi mà ko cs máy ảo

B. external storage

C. secondary storage

D. none of the mentioned

Swapping requires a _________

A. motherboard

B. keyboard

C. monitor

D. backing store

The backing store is generally a


____________

A. fast disk

B. disk large enough to accommodate copies of all memory images for all users
C. disk to provide direct access to the memory images

D. all of the mentioned

The major part of swap time is _______ time.

A. waiting

B. transfer

C. execution

D. none of the mentioned

 Waiting time (Thời gian chờ):

 Đây là thời gian hệ thống đợi để truy cập vào backing store (ổ đĩa lưu trữ) hoặc chờ
thiết bị hoàn thành các yêu cầu khác.

 Transfer time (Thời gian truyền):

 Đây là thời gian thực tế cần để di chuyển dữ liệu từ bộ nhớ chính (RAM) sang
backing store (hoặc ngược lại).

Phần bài tập :

Xét chuỗi truy xuất bộ nhớ sau :

1, 2, 3, 4, 3, 5, 1, 6, 2, 1, 2, 3, 7, 5, 3, 2, 1, 2, 3, 6.

Có bao nhiêu lỗi trang xảy ra khi sử dụng các thuật toán thay thế sau đây, biết có 4 khung
trang.

a. LRU.

b. FIFO.

c. Chiến lược tối ưu (OPT).

Quản lý file thư mục


Trắc nghiệm:

1. What is the main function of a file system in an operating system?

a) To manage hardware resources


b) To organize and store files on storage devices

c) To allocate CPU time to processes

d) To manage memory allocation

2. Which of the following is NOT a type of file system?

a) NTFS

b) FAT32

c) EXT4

d) DNS

3. What is the main advantage of the NTFS file system compared to FAT32?

a) Faster read/write speeds

b) Support for file sizes larger than 4GB

c) Compatibility with all operating systems

d) Does not support file permissions

4. What is a directory: thư mục in a file system?

a) A file that contains only text

b) A special file that can hold other files and subdirectories

c) A partition on a hard disk

d) A type of compressed file

5. In which directory structure does each file have only one parent directory?

a) Tree-structured directory

b) Acyclic graph directory

c) Single-level directory

d) Network file system

6. Which operation is NOT typically supported by file systems?

a) Creating a file
b) Deleting a file

c) Running a file directly

d) Renaming a file

7. What does the acronym FAT stand for in FAT32?

a) File Allocation Table

b) File Access Tool

c) File Archiving Technology

d) File Assignment Tracker

8. What is a key feature of journaling file systems like EXT4?

a) They automatically delete duplicate files

b) They keep a log of changes to the file system to prevent corruption

c) They do not support large files

d) They only work with flash storage

9. What is a hard link in a file system?

a) A direct pointer to a file’s data blocks

b) A duplicate copy of a file

c) A symbolic name for a file stored in another location

d) A file with special permissions

10. In a UNIX-based operating system, which file system structure allows files to have
multiple parents?

a) Single-level directory

b) Tree-structured directory

c) Acyclic graph directory

d) Two-level directory

Tự luận
1. What is the difference between a file and a directory in an operating
system?

2. Explain the role of a file system in an operating system. How does it


manage file storage?

3. Describe the structure of a hierarchical directory system. How does it


differ from a flat directory system?

4. What is the purpose of file permissions in an operating system, and


how are they typically managed?

5. How does an operating system handle file metadata, and why is this
information important?

6. What are the key components of a typical file control block (FCB)?

7. Explain the concept of journaling in file systems. How does it improve


file system reliability?

Quản lý vào ra
Phần trắc nghiệm

1. What is the primary role of I/O hardware in an operating system?

a) To allocate memory to processes

b) To manage CPU scheduling

c) To allow communication between the computer and external


devices

d) To manage file systems

2. Which of the following is an example of an I/O device?

a) CPU

b) RAM

c) Hard disk drive

d) Cache memory

3. What is the purpose of device drivers in I/O software management?

a) To manage memory allocation


b) To act as an intermediary between hardware devices and the
operating system

c) To create and manage directories

d) To process network protocols

4. Which of the following is NOT a typical I/O device category?

a) Block devices

b) Character devices

c) Sequential devices

d) Network devices

5. In I/O management, what is the difference between a block device and


a character device?

a) Block devices handle data in fixed-size blocks, while character


devices handle data one byte at a time

b) Character devices are faster than block devices

c) Block devices are used for networking, while character devices are for
storage

d) Character devices handle data in blocks, while block devices handle it


sequentially

6. What is direct memory access (DMA) in I/O hardware?

a) A technique where the CPU directly manages all input/output


operations

b) A method that allows I/O devices to send data directly to


memory without involving the CPU

c) A system for managing user permissions for I/O devices

d) A protocol for handling network communications

7. Which layer of the I/O software system is responsible for buffering data
and managing device queues?

a) Device drivers
b) Interrupt handlers

c) User-level I/O software

d) Device-independent software

8. What is an interrupt in the context of I/O hardware?

a) A special signal that informs the CPU of an event needing


immediate attention

b) A technique to reduce memory usage

c) A process scheduling algorithm

d) A method for copying data between devices

9. Which of the following is an example of asynchronous I/O?

a) The CPU waits until an I/O operation is complete before continuing

b) The I/O device sends data to memory without waiting for the
CPU

c) Data is transferred one block at a time with the CPU's full attention

d) A process is suspended until the I/O operation is completed

Ôn tập phần bài tập toán


Trắc nghiệm:

. Using FCFS (First Come First Served) algorithm, find the average
waiting time for the following processes with the given data in the order
Process : Arrival Time : Burst Time respectively A : 2 : 2; B : 0 : 6; C : 7 : 1;
D : 4 : 3.

A. 2,1

B. 3

C. 5

D. 4,5

. Using FCFS (First Come First Served) algorithm, find the order of
execution for the following processes with the given data in the order
Process : Arrival Time : Burst Time respectively A : 2 : 2; B : 0 : 6; C : 7 : 1;
D : 4 : 3.
A. B, D, A, C

B. B, A, C, D

C. B, C, A, D

D. B, A, D, C

. Using SJF (non-preemptive) algorithm, find the average waiting time


for the following processes with the given data in the order Process :
Arrival Time : Burst Time respectively A : 2 : 2; B : 0 : 6; C : 7 : 1; D : 4 : 3.

A. 3,5

B. 2,5

C. 2

D. 4

. Using SJF (non-preemptive) algorithm, find the order of execution for


the following processes with the given data in the order Process : Arrival
Time : Burst Time respectively A : 2 : 2; B : 0 : 6; C : 7 : 1; D : 4 : 3.

A. B, A, C, D

B. B, D, A, C

C. B, A, D, C

D. B, C, A, D

. Using SRTF algorithm, find the average waiting time for the following
processes with the given data in the order Process : Arrival Time : Burst
Time respectively A : 2 : 2; B : 0 : 6; C : 7 : 1; D : 4 : 3.

A. 1

B. 1,5

C. 2,5

D. 2

. Using SRTF algorithm, find the order of execution for the following
processes with the given data in the order Process : Arrival Time : Burst
Time respectively A : 2 : 2; B : 0 : 6; C : 7 : 1; D : 4 : 3.

A. B, D, A, C, D

B. B, A, B, C, A

C. B, C, A, D, B
D. B, A, D, C, B

. Using RR (Round-Robin) algorithm with time quantum: 3, find the


average waiting time for the following processes with the given data in
the order Process : Arrival Time : Burst Time respectively A : 2 : 2; B : 0 :
6; C : 7 : 1.

A. 2,333

B. 1,333

C. 5,333

D. 4,333

. Using RR (Round-Robin) algorithm with time quantum: 3, find the


order of execution for the following processes with the given data in the
order Process : Arrival Time : Burst Time respectively A : 2 : 2; B : 0 : 6; C :
7 : 1.

A. B, A, D, C

B. B, C, A, D

C. B, A, B, C

D. B, C, D, A

. Using Priority (non-preemptive) algorithm, find the average waiting


time for the following processes with the given data in the order Process :
Burst Time : Priority (0 is the highest priority) respectively A : 2 : 2; B : 3 :
6; C : 7 : 1; D : 4 : 3.

A. 7,25

B. 8,25

C. 9

D. 8

. Using Priority (non-preemptive) algorithm, find the order of


execution for the following processes with the given data in the order
Process : Burst Time : Priority (0 is the highest priority) respectively A : 2 :
2; B : 3 : 6; C : 7 : 1; D : 4 : 3.

A. C, D, B, C

B. C, B, A, D

C. C, B, D, A
D. C, A, D, B

. A disk queue with requests for I/O to blocks on cylinders: 85 13 46


91 62, disk head is initially at 50. Considering First Come First Serve
(FCFS) scheduling, find the total head movements?

A. 222

B. 127

C. 214

D. 337

. A disk queue with requests for I/O to blocks on cylinders: 85 13 46


91 62, disk head is initially at 50. Considering Shortest Seek Time First
(SSTF) scheduling, find the total head movements?

A. 127

B. 214

C. 337

D. 119

. A disk queue with requests for I/O to blocks on cylinders: 85 13 46


91 62, disk head is currently at position 50 and is moving in the increasing
direction. The track range is from 1 to 200. Considering Elevator (SCAN)
scheduling, find the total head movements?

A. 119

B. 214

C. 127

D. 337

. A memory has partitions with sizes (in KB): 15, 52, 22, 37, 62, 44. If
a process of size 31 KB requests memory, which partition size (in KB) will
be chosen if using the First Fit method?

A. 52

B. 44

C. 62

D. 15
. A memory has partitions with sizes (in KB): 15, 52, 22, 37, 62, 45. If
a process of size 26 KB requests memory, which partition size (in KB) will
be chosen if using the Best Fit method?

A. 62

B. 22

C. 37

D. 45

. A memory has partitions with sizes (in KB): 15, 52, 22, 37, 62, 46. If
a process of size 41 KB requests memory, which partition size (in KB) will
be chosen if using the Worst Fit method?

A. 22

B. 62

C. 37

D. 52

Deadlock + CPU scheduling


Which one of the following is the deadlock avoidance algorithm?

A. banker’s algorithm

B. round-robin algorithm

C. elevator algorithm

D. karn’s algorithm

What is the drawback of banker’s algorithm?

A. in advance processes rarely know how much resource they will need

B. the number of processes changes as time progresses


C. resource once available can disappear

D. all of the mentioned

For an effective operating system, when to check for deadlock?

A. every time a resource request is made

B. at fixed time intervals

C. every time a resource request is made at fixed time intervals

D. none of the mentioned

A problem encountered in multitasking when a process is perpetually


denied necessary resources is called ____________

A. deadlock

B. starvation

C. inversion

D. aging

Which one of the following is a visual (mathematical ) way to determine


the deadlock occurrence?

A. resource allocation graph


B. starvation graph

C. inversion graph

D. none of the mentioned

The circular wait condition can be prevented by ____________

A. defining a linear ordering of resource types

B. using thread

C. using pipes

D. all of the mentioned

For a deadlock to arise, which of the following conditions must hold


simultaneously?

A. Mutual exclusion

B. No preemption

C. Hold and wait

D. All of the mentioned

For a Hold and wait condition to prevail ____________

A. A process must be not be holding a resource, but waiting for one to be


freed, and then request to acquire it
B. A process must be holding at least one resource and waiting to acquire
additional resources that are being held by other processes

C. A process must hold at least one resource and not be waiting to acquire
additional resources

D. None of the mentioned

Deadlock prevention is a set of methods ____________

A. to ensure that at least one of the necessary conditions cannot hold

B. to ensure that all of the necessary conditions do not hold

C. to decide if the requested resources for a process have to be given or


not

D. to recover from a deadlock

To ensure that the hold and wait condition never occurs in the system, it
must be ensured that ____________

A. whenever a resource is requested by a process, it is not holding any


other resources

B. each process must request and be allocated all its resources before it
begins its execution

C. a process can request resources only when it has none

D. all of the mentioned


A deadlock avoidance algorithm dynamically examines the __________ to
ensure that a circular wait condition can never exist.

A. resource allocation state

B. system storage state

C. operating system

D. resources

All unsafe states are ____________

A. deadlocks

B. not deadlocks

C. fatal

D. none of the mentioned

The Banker’s algorithm is _____________ than the resource allocation graph


algorithm.

A. less efficient

B. more efficient

C. equal
D. none of the mentioned

The data structures available in the Banker’s algorithm are ____________

A. Available

B. Need

C. Allocation

D. All of the mentioned

An edge from process Pi to Pj in a wait for graph indicates that


____________

A. Pi is waiting for Pj to release a resource that Pi needs

B. Pj is waiting for Pi to release a resource that Pj needs

C. Pi is waiting for Pj to leave the system

D. Pj is waiting for Pi to leave the system

If the wait for graph contains a cycle ____________

A. then a deadlock does not exist

B. then a deadlock exists

C. then the system is in a safe state


D. either deadlock exists or system is in a safe state

If deadlocks occur frequently, the detection algorithm must be invoked


________

A. rarely

B. frequently

C. rarely & frequently

D. none of the mentioned

Consider a system having 'm' resources of the same type. These


resources are shared by 3 processes A, B, C, which have peak time
demands of 3, 4, 6 respectively. The minimum value of 'm' that ensures
that deadlock will never occur is

A. 11

B. 12

C. 13

D. 14

A system has 3 processes sharing 4 resources. If each process needs a


maximum of 2 units, then

A. deadlock can never occur


B. deadlock may occur

C. deadlock has to occur

D. none of the mentioned

Which requested resources are granted with deadlock detection?

A. Resources

B. Processes

C. Programs

D. Data

_________ that implies an unsafe state?

A. the existence of deadlock

B. that deadlock will eventually occur

C. the pages of deadlock

D. that some unfortunate sequence of events might lead to deadlock

What are the conditions that cause the deadlock?

A. Coffman, Elphick and Shoshani


B. Mutual exclusion, Wait for, No preemption, Circular wait.

C. Deadlock, Banker, Semaphore, loop for.

D. Cannot determined

In Page Replacement algorithm, how many advantages are there?

A.3

B.5

C.6

D.7

BÀI TẬP LẬP LỊCH CHO CPU:


Giả sử có 4 tiến trình với thời gian thực hiện như sau:

P1: 8 đơn vị thời gian


P2: 4 đơn vị thời gian
P3: 9 đơn vị thời gian
P4: 5 đơn vị thời gian
Thời gian quantum (time slice) là 3 đơn vị thời gian.

Yêu cầu:

Vẽ biểu đồ Gantt cho tiến trình này theo giải thuật RR


Tính thời gian chờ trung bình và thời gian hoàn thành trung bình cho các
tiến trình.
Bài 2: Giả sử có 5 tiến trình với thời gian thực hiện như sau:

P1: 6 đơn vị thời gian


P2: 2 đơn vị thời gian
P3: 8 đơn vị thời gian
P4: 3 đơn vị thời gian
P5: 4 đơn vị thời gian
Các tiến trình đến lần lượt theo thứ tự P1, P2, P3, P4, P5 tại thời điểm 0.

Yêu cầu:

Vẽ biểu đồ Gantt cho tiến trình này theo giải thuật SJF_ non Preemptive
Tính thời gian chờ trung bình và thời gian hoàn thành trung bình cho các
tiến trình.
Bài 3:

Giả sử có 4 tiến trình với thời gian thực hiện như sau:

P1: 7 đơn vị thời gian (đến lúc 0)


P2: 5 đơn vị thời gian (đến lúc 1)
P3: 1 đơn vị thời gian (đến lúc 3)
P4: 2 đơn vị thời gian (đến lúc 5)
Yêu cầu:

Vẽ biểu đồ Gantt cho tiến trình này theo giải thuật SJF_ Preemptive
Tính thời gian chờ trung bình và thời gian hoàn thành trung bình cho các
tiến trình.

ôn tập trắc nghiệm


What types of folders are easy to organize and exploit, but make it
difficult to name the files that don't overlap and users can't group files
and search slowly?
A. 1-level directory

B. 2-level directory

C. Multi-level directory

D. None of the mentioned

In the file system of the first MS-DOS sector, track 0, side 0 for the hard
disk, information about_________

A. Boot sector

B. Partition table

C. FAT table

D. Common data

For a 20M disk with the size of 1K, if managing free volumes using DSLK
how many blocks will it take to manage this disk:

A. 20 blocks

B. 40 blocks

C. 80 blocks
D. 16 blocks

___________ begins at the root and follows a path down to the specified file.

A. Standalone name

B. Relative path name

C. Absolute path name

D. All of the mentioned

The deletion of a link, ________ the original file.

A. deletes

B. affects

C. does not affect

D. none of the mentioned

Consider a disk where blocks 2,3,4,5,8,9,10,11,12,13,17,18,25,26 and 27


are free and the rest of the blocks are allocated. Then the free space bit
map would be :
A. 10000110000001110011111100011111…

B. 110000110000001110011111100011111…

C. 01111001111110001100000011100000…

D. 001111001111110001100000011100000…

As disks have relatively low transfer rates and relatively high latency
rates, disk schedulers must reduce latency times to :

A. ensure high bandwidth

B. ensure low bandwidth

C. make sure data is transferred

D. reduce data transfer speeds

______ is a unique tag, usually a number identifies the file within the file
system.

A. File identifier

B. File name
C. File type

D. None of the mentioned

To create a file ____________

A. allocate the space in file system

B. make an entry for new file in directory

C. allocate the space in file system & make an entry for new file in
directory

D. none of the mentioned

By using the specific system call, we can ____________

A. open the file

B. read the file

C. write into the file

D. all of the mentioned


File type can be represented by ____________

A. file name

B. file extension

C. file identifier

D. none of the mentioned

What is the mounting of file system?

A. crating of a filesystem

B. deleting a filesystem

C. attaching portion of the file system into a directory structure

D. removing the portion of the file system into a directory structure

A file control block contains the information about ____________

A. file ownership

B. file permissions
C. location of file contents

D. all of the mentioned

To create a new file application program calls ____________

A. basic file system

B. logical file system

C. file-organisation module

D. none of the mentioned

The data structure used for file directory is called ____________

A. mount table

B. hash table

C. file table

D. process table
If the block of free-space list is free then bit will ____________

A. 1

B. 0

C. any of 0 or 1

D. none of the mentioned

File attributes consist of ____________

A. name

B. type

C. identifier

D. all of the mentioned

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. Unshortened

Time quantum can be said?

A. Multilevel queue scheduling algorithm

B. Round-robin scheduling algorithm

C. Shortest job scheduling algorithm

D. Priority scheduling algorithm

In UNIX, Which system call creates the new process?

A. Fork

B. Create

C. New

D. None of the mentioned


The new process consists of a copy of the____of the original process. This
mechanism allows the parent process to communicate easily with its child
process.

A. Address space

B. Process state

C. Process number

D. Process identifiers

What are two ways to keep track of memory usages?

A.Physical and Virtual Lists.

B.Virtual and Linked Lists.

C.Physical and Linked Lists.

D.Bit Maps and Linked Lists.

How does First-fit strategy work?


A.Allocate the smallest hole that is big enough; must search entire list,
unless ordered by size.

B.Allocate the largest hole; must also search entire list.

C.Allocate the first hole that is big enough.

D.Start seaching the list from the place where it left off last time.

A entry of the Process table is called: ______

A. All of the other choices

B. Process check block

C. Process management block

D. Process control block

Which of the following do not belong to queues for processes?

A. Job Queue

B. PCB queue

C. Device Queue
D. Ready Queue

A parent process calling _____ system call will be suspended until children
processes terminate.

A. wait

B. fork

C. exit

D. exec

The child process can __________

A. be a duplicate of the parent process

B. never be a duplicate of the parent process

C. cannot have another program loaded into it

D. never have another program loaded into it


The entry of all the PCBs of the current processes is in __________

A. Process Register

B. Program Counter

C. Process Table

D. Process Unit

A single thread of control allows the process to perform __________

A. only one task at a time

B. multiple tasks at a time

C. only two tasks at a time

D. all of the mentioned

If a process is executing in its critical section, then no other processes can


be executing in their critical section. What is this condition called?

A. mutual exclusion

B. critical exclusion
C. synchronous exclusion

D. asynchronous exclusion

Which one of the following is a synchronization tool?

A. thread

B. pipe

C. semaphore

D. socket

When high priority task is indirectly preempted by medium priority task


effectively inverting the relative priority of the two tasks, the scenario is
called __________

A. priority inversion

B. priority removal

C. priority exchange

D. priority modification
To enable a process to wait within the monitor __________

A. a condition variable must be declared as condition

B. condition variables must be used as boolean objects

C. semaphore must be used

D. all of the mentioned

In the non blocking send __________

A. the sending process keeps sending until the message is received

B. the sending process sends the message and resumes operation

C. the sending process keeps sending until it receives a message

D. none of the mentioned

Ôn tập
Câu 1.

What is the concept of an operating system?

A. A computer hardware.
B. Intermediary program between the computer's hardware and the user
program

C. Handling user requests

D. An application software.

Câu 2.

What are 3 states of processes?

A. New, Ready, Running

B. Running, Waiting, Terminated

C. Ready, Running, Waiting

D. Not-running, Running, In execution

Câu 3.

What statement meet the description of the running state of a process?


A. The process is waiting in ready queue.

B. A process waits for a certain event or waits for input/output of an I/O


event

C. The program is in execution and using the processor

D. User launch a new program on disk.

Câu 4.

In a uni-processor system, how many processes can be in the running


state at a dedicated time?

A. Two processes

B. Three processes because they have 3 states.

C. One process

D. All processes which have been loaded in to the main memory.

Câu 5.

What is the shell in operating system?

A. A computer program that exposes users to program their needed


purposes.

B. An user applicaton program use to manage files and folder.


C. A computer program that exposes an operating system's services to a
human user or other programs

D. An application software that help users to manage file system.

Câu 6.

What does "time quantum" of processes?

A. The maximum time the CPU spends executing a process

B. Another name for total running time of each process.

C. The average waiting time for each process in ready queue.

D. The total execution time of each process.

Câu 7.

In dynamic partitioning, what solution does the operating system use to


manage free memory blocks?

A. SCT (Segment control table)

B. PCT (page control table)

C. Linked list or bitmap

D. PCB (Page control Block)

Câu 8.
If the specified block size is too small, what is the result to the operating
system?

A. Waste disk

B. Cannot save large files.

C. Increase the capacity of the disk block management list

D. Disk fragmentation

Câu 9.

The term "time quantum' is used in which scheduling algorithm?

A. First Come First Serve

B. Round-robin

C. Shortest Job First

D. Shortest Remaining-Time First

Câu 10.

Arrange these memory types in decreasing order of speed?

A. Main memory, register, secondary memory, cache memory


B. Register, cache memory, main memory, secondary memory

C. Cache memory, secondary memory, main memory, register

D. Secondary memory, main memory, register, cache memory

Câu 11.

What of the following terms is not a specific operating system?

A. Kali-linux

B. Ubuntu

C. Redhat

D. Linux

Câu 12.

What is the logical unit that contain information in a computer system?

A. User program

B. File

C. Database
D. Directory

Câu 13.

What is the following path "/home/vku/users" called?

A. Dynamic path

B. Current working path

C. Relative path

D. Absolute path

Câu 14.

Which of the following terms are file systems?

A. Files and folders

B. MS-DOS and Windows

C. Processes and threads

D. FAT and NTFS

Câu 15.

What is not a dynamic storage-allocation method?


A. First-fit

B. Worst-fit

C. Best-fit

D. Test-fit

Câu 16.

What is not a dynamic storage-allocation method?

A. Next-fit

B. Worst-fit

C. Nest-fit

D. Best-fit

Câu 17.

What is NRU (a page replacement algorithm) stand for?

A. Not Recently Used

B. Not Repeatly Used

C. Next Round Used


D. Next Remain Used

Câu 18.

What is NFU (a page replacement algorithm) stand for?

A. Not Frequently Used

B. Not Fast Used

C. Next For Used

D. Next Fist Used

Câu 19.

What is FIFO (a page replacement algorithm) stand for?

A. Fast In Fast Out

B. First In First Out

C. Fast In First Out

D. Fit In First Out

Câu 20.

What are four times when OS involved with paging?


A. Process creation, Process execution, Page fault time, Process launching
time

B. Program creation, Process creation, Page fault time, Process


termination time

C. Process creation, Process execution, Page fault time, Process


termination time

D. Process creation, Program creation, Page fault time, Process


termination time

Câu 21.

What are 4 conditions for deadlock?

A. Process creation condition, Hold and wait condition, No preemption


conditions, Circular wait condition

B. Mutual exclusion condition, Hold and wait condition, No preemption


conditions, Circular wait condition

C. Process creation condition, Hold and wait condition, No preemption


conditions, Process termination condition

D. Process creation condition, Hold and wait condition, Mutual exclusion


condition, Process termination condition

Câu 22.

What is the deadlock prevention solution attack to Mutual exclusion


condition?
A. Spool everything

B. Request all resources initially

C. Take resources away

D. Order resources numerically

Câu 23.

What is the deadlock prevention solution attack to Hold and wait


condition?

A. Spool everything

B. Request all resources initially

C. Take resources away

D. Order resources numerically

Câu 24.

What is the deadlock prevention solution attack to No preemption


condition?

A. Spool everything
B. Request all resources initially

C. Take resources away

D. Order resources numerically

Câu 25.

What is the deadlock prevention solution attack to Circular condition?

A. Spool everything

B. Request all resources initially

C. Take resources away

D. Order resources numerically

PHẦN 2:
Câu 1.

Calculate the capacity of a floppy disk with 40 cylinders, 2 tracks per


cylinder, 9 sectors per track, and the size of each sector is 512 bytes

A. 360 KB

B. 80 KB
C. 18 KB

D. 512 KB

Câu 2.

Which type of RAID (Redundant Array of Independent Disks) does not


support redundancy?

A. RAID 0

B. RAID 1

C. RAID 2

D. RAID 5

Câu 3.

In early operating systems, how were programs executed?

A. Sequentially with no concurrency

B. Concurrently with virtual memory

C. Randomly scheduled

D. None of the above


Câu 4.

Assume that the head of a hard disk is currently at cylinder 8. The


requested cylinders, in order, are: 11, 2, 9, 30, 4, 15 and 27. Calculate the
total distance the head must travel using FCFS (First-Come First-Served)
algorithm?

A. 89

B. 34

C. 50

D. 80

Câu 5.

An embedded operating system is designed for:

A. Dedicated functions within a device

B. Consumer-level desktop computers

C. High-performance servers

D. None of the above

Câu 6.

What is a key difference between processes and threads?


A. Threads share memory space

B. Processes share memory space

C. Processes are faster than threads

D. None of the above

Câu 7.

The primary role of the memory manager is to:

A. Track free and allocated memory

B. Manage user login information

C. Monitor CPU speed

D. Control file systems

Câu 8.

Swapping is a method used in:

A. I/O management

B. Process scheduling

C. Memory management
D. Network communication

Câu 9.

Which of the following describes virtual memory?

A. It extends RAM capacity

B. It stores programs permanently

C. It does not require paging

D. It stores data in the CPU registers

Câu 10.

A memory hierarchy is used to manage:

A. Memory speeds and costs

B. Software updates

C. CPU processes

D. Network packets

Câu 11.

Which is a primary role of a file system?


A. Organize data in directories and files

B. Run user applications

C. Manage printer output

D. Control CPU scheduling

Câu 12.

File naming is important because:

A. It allows users to identify and access files easily

B. It ensures data safety

C. It reduces memory consumption

D. It eliminates fragmentation

Câu 13.

Which file structure is the most commonly used in modern systems?

A. Single-level

B. Hierarchical

C. Networked
D. None of the above

Câu 14.

Assume that the head of a hard disk is currently at cylinder 8. The


requested cylinders, in order, are: 11, 2, 9, 30, 4, 15 and 27. Calculate the
total distance the head must travel using SSF (Shortest seek first)
algorithm?

A. 50

B. 34

C. 48

D. 32

Câu 15.

Which of these is an I/O principle?

A. Memory swapping

B. Interrupt handling

C. Process threading

D. Deadlock prevention

Câu 16.
Memory-mapped I/O connects devices directly to:

A. Main memory

B. Disk storage

C. CPU registers

D. The network interface

Câu 17.

Direct Memory Access (DMA) is used to:

A. Allow devices to directly access memory without CPU

B. Control CPU scheduling

C. Extend physical memory capacity

D. Transfer data within the CPU only

Câu 18.

Disk scheduling algorithms primarily improve:


A. CPU performance

B. Disk read/write efficiency

C. File security

D. Network access speeds

Câu 19.

Programmed I/O is different from interrupt-driven I/O because:

A. It waits for devices to be ready

B. It handles data automatically

C. It is more efficient for high-speed devices

D. It transfers data directly to network devices

Câu 20.

A deadlock occurs when:

A. All processes share the same resources

B. Processes wait indefinitely for resources held by each other


C. Memory space is insufficient for process allocation

D. Processes fail to access CPU time

Câu 21.

Which of the following is not a deadlock prevention technique?

A. Resource sharing

B. Avoiding circular wait

C. Preempting resources

D. Mutual exclusion enforcement

Câu 22.

The Banker's algorithm is used for:

A. Deadlock detection
B. Deadlock prevention

C. Deadlock avoidance

D. Process synchronization

Câu 23.

A file has a size of 2200 bytes. The size of each block is 512 bytes. How
many blocks does this file occupy?

A. 4

B. 5

C. 6

D. 7

Câu 24.

Which of the following is not correct about the main classes of I/O
devices?
A. Character devices

B. Block devices and Character devices

C. Stream devices

D. Block devices

Câu 25.

Which scheduling algorithm allocates the CPU first to the process that
requests the CPU first?

A. First-come first-served scheduling

B. Shortest job scheduling

C. Priority scheduling

D. Longest job scheduling

You might also like