0% found this document useful (0 votes)
8 views12 pages

What Is A Process in An Operating System

The document contains a series of questions and answers related to operating systems, covering topics such as process management, scheduling algorithms, memory management, and file systems. It includes multiple-choice questions that test knowledge on concepts like process states, thread vs. process differences, deadlock conditions, and disk scheduling algorithms. Additionally, it discusses technical aspects such as RAID types, virtual memory, and I/O principles.

Uploaded by

ngochnb.23ns
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)
8 views12 pages

What Is A Process in An Operating System

The document contains a series of questions and answers related to operating systems, covering topics such as process management, scheduling algorithms, memory management, and file systems. It includes multiple-choice questions that test knowledge on concepts like process states, thread vs. process differences, deadlock conditions, and disk scheduling algorithms. Additionally, it discusses technical aspects such as RAID types, virtual memory, and I/O principles.

Uploaded by

ngochnb.23ns
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/ 12

 What is a process in an operating system?

a) A thread running in the CPU


b) An instance of a program in execution
c) A set of I/O operations
d) A type of hardware resource

 What happens during process creation?


a) The program is executed immediately
b) Memory and resources are allocated, and the PCB is initialized
c) Threads are created automatically
d) The CPU starts scheduling the process

 What does the Process Control Block (PCB) NOT include?


a) Process state
b) Program counter
c) Network address
d) Memory limits

 In which state does a process wait to be assigned( chờ để đc giao) a CPU?


a) Running
b) Blocked
c) Ready
d) Terminated

 What causes a process to transition to the "Blocked" state?


a) Completion of I/O operations
b) Waiting for an event or I/O operation to finish
c) Requesting more CPU time
d) Completing execution

 Which state represents a process that has finished execution?


a) Blocked
b) New
c) Terminated
d) Ready

 What is the purpose of the program counter in the PCB?


a) To keep track of I/O operations
b) To manage thread execution
c) To store the address of the next instruction
d) To control access to memory
 Which scheduling algorithm operates like a FIFO queue?
a) SJF (Shortest Job First)
b) FCFS (First Come First Served)
c) RR (Round-Robin)
d) Priority Scheduling

 What differentiates threads from processes?


a) Threads share the same memory space, processes do not
b) Threads are larger and heavier than processes
c) Processes share the same stack, but threads do not
d) Processes can only run on a single CPU

 What is a key feature of Round-Robin scheduling?


a) Processes are scheduled based on their burst time
b) Processes are given fixed time slices (quantum)
c) Processes with lower priority are executed first
d) Processes are executed in the order they arrive

 What is the disadvantage of user-space thread implementation?


a) All threads are blocked if one is blocked
b) It requires heavy kernel interaction
c) It does not allow multithreading
d) It is slower to create threads

 Which of the following is NOT an IPC method?


a) Shared memory
b) Pipes
c) CPU scheduling
d) Sockets

 What is the main advantage of kernel-supported multithreading?


a) Faster thread creation
b) Threads are independent of each other
c) Improved performance on multi-core processors
d) Easier thread management

 Which scheduler determines the processes to move into the "Ready" queue?
a) Medium-term Scheduler
b) Short-term Scheduler
c) Long-term Scheduler
d) Priority Scheduler
 What does the Time Quantum represent in the Round-Robin algorithm?
a) The number of processes in the Ready Queue
b) The maximum burst time for each process
c) The fixed time slice given to each process for execution
d) The total time to complete all processes

 What happens if a new process with a shorter burst time arrives during SRTF
scheduling?
a) The currently executing process finishes its execution
b) The new process preempts the current process
c) The new process goes to the end of the queue
d) Both processes execute simultaneously

 Which scheduling algorithm is preemptive?


a) FCFS
b) SJF non-preemptive
c) SRTF (Shortest Remaining Time First)
d) HRRN

 Which process scheduling algorithm focuses on minimizing response time?


a) Multilevel Queue
b) Round-Robin
c) Priority non-preemptive
d) FCFS

 What type of resource is allocated to a process during its creation?


a) CPU only
b) Memory only
c) CPU, memory, and I/O resources
d) Storage only

 What does the HRRN (Highest Response Ratio Next) algorithm prioritize?
a) Processes with higher burst times
b) Processes with the shortest response time
c) Processes with the highest response ratio
d) Processes with the shortest arrival time
 What is the main drawback of memory that is not partitioned?
a) It cannot store data larger than 1KB
b) It leads to internal fragmentation
c) It has no physical address space
d) It leads to external fragmentation

 What is the difference between First Fit and Next Fit allocation methods?
a) First Fit starts from the beginning, Next Fit continues from the last allocated location
b) First Fit finds the largest block, Next Fit finds the smallest block
c) First Fit is faster, while Next Fit is slower
d) First Fit uses fixed partitions, while Next Fit uses variable partitions

 In paging, what does the page table store?


a) Base address of each segment
b) Logical and physical address mapping
c) Size of each page
d) Virtual addresses

 What does the size of the page table depend on?


a) Number of processes
b) Page size and number of pages
c) Virtual address size only
d) Physical memory size

 If a system uses a page size of 4KB, what is the size of the offset (d)?
a) 10 bits
b) 12 bits
c) 16 bits
d) 32 bits

 Which of the following is a key difference between paging and segmentation?


a) Paging can lead to external fragmentation, while segmentation cannot
b) Paging uses fixed-sized pages, while segmentation uses variable-sized segments
c) Paging is more complex than segmentation
d) Segmentation eliminates fragmentation altogether

 What is the purpose of the TLB (Translational Look-Aside Buffer)?


a) To speed up memory allocation
b) To store processes in secondary storage
c) To translate virtual addresses to physical addresses quickly
d) To manage segmentation tables

 What does "swap out" mean in swapping?


a) Moving a process from the disk to the CPU
b) Removing a process from RAM and storing it on the hard disk
c) Allocating memory to a new process
d) Replacing one page with another in the page table

 What is a potential drawback of poor swapping algorithms?


a) Reduced virtual memory
b) Increased page faults
c) Smaller page table sizes
d) Decreased external fragmentation

 How many bits are required to address a memory space of 256MB?


a) 28 bits
b) 32 bits
c) 24 bits
d) 16 bits
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 dedica
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 prog
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 m
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 What of the following terms is not a specific operating system?
11.
A. Kali-linux
B. Ubuntu
C. Redhat
D. Linux kernel

Câu What is the logical unit that contain information in a computer system?
12.
A. User program
B. File
C. Database
D. Directory
Câu What is the following path "/home/vku/users" called?
13.
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 What is NFU (a page replacement algorithm) stand for?
18.
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 con
B. Mutual exclusion condition, Hold and wait condition, No preemption conditions, Circular wait con
C. Process creation condition, Hold and wait condition, No preemption conditions, Process terminat
D. Process creation condition, Hold and wait condition, Mutual exclusion condition, Process termina
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:
Calculate the capacity of a floppy disk with 40 cylinders, 2 tracks per cylinder, 9 sectors per track,
Câu 1.
of each sector is 512 bytes
A. 360 KB 40×2×9×512=360KB
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
Assume that the head of a hard disk is currently at cylinder 8. The requested cylinders, in order, a
Câu 4.
27. Calculate the total distance the head must travel using FCFS (First-Come First-Served) algorith
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 packetsc
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
Assume that the head of a hard disk is currently at cylinder 8. The requested cylinders, in order, a
Câu 14.
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
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