Font size
WorksheetsComputer Science Quiz
Total questions: 132
Worksheet time: 1hrs 6mins
RAID level works worst with operating systems that habitually ask for data one sector at a time
0
1
2
3
What is the output of the following command: echo $((5/2* 2)) ?
1
5
4
2
A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used(LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below 4, 7, 6, 1, 7, 6, 1, 2, 7, 2
2
4
6
7
How many layers are there in the I/O software system?
3
4
6
5
If FIFO page replacement is used with three page frames, how many page faults will occur with the reference string 1, 3, 0, 3, 5, 6, (if the three frames are initially empty)?
6
4
7
3
If FIFO page replacement is used with three page frames, how many page faults will occur with the reference string 1, 2, 3, 4, 1, 2 (if the three frames are initially empty)?
6
4
5
3
If LRU page replacement is used with three page frames, how many page faults will occur with the reference string 7, 0, 1, 2, 0, 3 (if the three frames are initially empty)?
5
4
6
3
If optimal page replacement is used with four page frames, how many page faults will occur with the reference string 7, 0, 1, 2, 0, 3, 0 if the four frames are initially empty?
5
6
4
7
Assume we have a 16-bit virtual address and a 4-KB page size. How many indexes are in a one-level page table?
16
4
8
64
While the search for cylinder 11 is in progress, new requests appear for cylinders 1, 36, 16, 34, 9, and 12. Considering SSF (Shortest Seek First) scheduling, what is the total number of head movements?
61
111
60
108
A computer has 4GB RAM of which the operating system occupies 2GB. The processes are all 1024 MB and have the same characteristics. How many percent is CPU utilization when these programs are idle waiting for I/O 50% of the time?
75%
90%
1%
50%
A computer with a 32-bit virtual address uses a two-level page table. Virtual addresses are split into a 10-bit top-level page table field (PT1), a 10-bit second-level page table field (PT2), and an offset. How many PT1, PT2, and offsets are there with the virtual address 0x00403008 or 0000 0000 0100 0000 0011 0000 0000 1000?
PT1=1; PT2=3; offset=8
PT1=1; PT2=1; offset=8
PT1=4; PT2=3; offset=8
PT1=4; PT2=1; offset=8
A computer with a 32-bit address uses a two-level page table. Virtual addresses are split into a 10-bit top-level page table field, a 12-bit second-level page table field, and an offset. What is the size of the pages?
512B page
1-KB page
2-KB page
4-KB page
In Windows 95, which is the maximum partition size, if the FAT type is FAT-32 and the block size is 16 KB?
1TB
2TB
512MB
128MB
In Windows 95, which is the maximum partition size, if the FAT type is FAT-16 and the block size is 4 KB?
128MB
256MB
512MB
1024MB
If FIFO page replacement algorithm is used with four page frames, how many page faults will occur with the reference string 0172327103 if the four frames are initially empty?
4 Pages
5 Pages
6 Pages
7 Pages
Suppose there are 4 memory blocks, B1, B2, B3, and B4, with sizes of 600K, 500K, 200K, and 300K, respectively. And we have 4 processes, P1, P2, P3, and P4, with corresponding request sizes of 250K, 420K, 150K, and 450K. When applying the best-fit algorithm, which memory blocks are allocated to the process?
P1-B4, P2-B2, P3-B3, P4-B1
P1-B4, P2-B1, P3-B3, P4-B2
P1-B1, P2-B2, P3-B4, B4: none allocated
P1-B1, P2-B2, P3-B3, B4: none allocated
Suppose the free memory area has the following sizes in the following order: 10KB, 4KB, 15KB, 18KB, 7KB, 9KB, 13KB, and 20KB. A process that needs 12 KB of memory has been placed into a 20 KB block. Which of the following Memory Management algorithms is applied to the selection process?
Worst-fit
First-fit
Best-fit
Next-fit
Suppose there are 4 memory blocks, B1, B2, B3, and B4, with sizes of 30K, 15K, 50K, and 20K, respectively. And we have 4 processes, P1, P2, P3, and P4, with corresponding request sizes of 15K, 20K, 20K, and 50K. What is the algorithm for all processes to be allocated memory?
Best-fit
Next-fit
First-fit
Worst-fit
Suppose there are 6 memory blocks B1, B2, B3, B4, B5, and B6 with corresponding sizes of 300 KB, 600 KB, 380KB, 200 KB, 750 KB, and 125 KB. And we have 5 processes, P1, P2, P3, P4, and P5, with corresponding request sizes of 115KB, 500KB, 358KB, 200 KB, and 375 KB. When applying the best-fit algorithm, which memory block is process P5 assigned to?
B5
B3
B4
B2
The first general-purpose electronic computer, the ENIAC, had 18,000 vacuum tubes and consumed watts of power.
1400,000
140,000
14,000
1,400
include(s) every peripheral unit in the system such as disks, clocks, keyboards, displays, a
Memory
CPU
Software
What is the state of the file when the process finishs and this file can be accessed by other processes?
Exit
Terminate
Exist
Suspend
What is the time takes to move the arm to the proper cylinder is called?
Seek time
Position time
Rotational delay
Transfer time
What is the address that the main memory unit sees and manipulates called?
Physical address
Address space
Physical space
Logical address
What is the Ostrich algorithm?
A deadlock recovery algorithm
A deadlock dealing algorithm
A deadlock detection algorithm
A deadlock avoidance algorithm
What are the basic states of a process?
Running, Ready, and Blocked
Running, Blocked, and Exit
Create, Running, and Exit
Create, Running, and Blocked
What addresses are typically used by most DMA controllers for transmission?
Logical memory
Abstract memory
Virtual memory
Physical memory
What technique is not used in the implementation of Virtual Memory?
Paging
Physical address
A deadlock dealing algorithm
Partition
What kind of file access did early operating system provide?
Liner access
Unsequential access
Random access
Sequential access
Which of the following information bits in the page table entry is used to indicate the types of access that are permitted?
Present/absent bit
Caching disabled
Protection bit
Modified bit
Which of the following is an Operating System component?
Process Management
Speed Management
Space Management
Time Management
Which of the following process state transitions (from-to) is illegal?
Ready, Blocked (waiting)
Running, Blocked (waiting)
Blocked, Ready
Running, Ready
Which of the following is not a common directory attribute or property?
Directory name
Directory structure
Directory owner
Directory path
Which early operating system was designed for the UNIVAC I computer and is often considered one of the first operating systems?
MS-DOS
UNIX
COBOL
EDVAC
Which operation is appropriate when system calls notify the OS that the file is coming and set some of its attributes?
Delete
Create
Read
Write
Which operating system runs on systems with any CPU (multi-processor, multi-core, multi-chip)?
Embedded OS
Multiprocessor OS
PC OS
Server OS
Which RAID level, which duplicates all the disks, offers fault tolerance through disk mirroring?
RAID 1
RAID 0
RAID 5
RAID 6
Which file access method is often used to optimize access to large files in a file system?
Sequential access
Direct access
Indexed access
Linked access
Which operation in stable storage involves writing and verifying a block on both drives until it is successfully written and verified?
Stable read
Crash recovery
Stable write
Data synchronization
Which condition, if not present in the system, can help prevent deadlocks?
Mutual exclusion
Hold and wait
No preemption
Circular wait
Which memory management technique involves dividing memory into fixed-sized partitions to accommodate varying process sizes?
Paging Management
Contiguous Allocation
Segmentation
Virtual Memory Management
Which condition among the four conditions for deadlock is described by 'Each resource is either currently assigned to exactly one process or is available'?
Mutual exclusion condition.
Hold-and-wait condition.
No-preemption condition.
Circular wait condition.
Which tool is used for both Deadlock Detection & Recovery and Deadlock Avoidance?
Resource Request Matrix
Resource Allocation Matrix
Resource Graph
Pie chart
Which deadlock condition does 'Take resources away' attack?
Hold and wait
Mutual exclusion
No preemption
Circular wait
Which type of clock in a computer system keeps track of the current time and date and is typically battery-powered to retain data even when the system is turned off?
System clock
CPU clock
Real-time clock (RTC)
Network clock
Which resource allocation method can help prevent deadlocks by requiring processes to request and hold all necessary resources at once?
Contiguous allocation
Clustered allocation
Linked allocation
Resource allocation
Which OS has three kinds of services: batch, transaction processing, timesharing?
Server OS
Multiprocessor OS
PC OS
Mainframe OS
Who is responsible for the Banker's algorithm?
Dijkstra
Zobel
Which OS has three kinds of services: batch, transaction processing, timesharing?
Server OS
Multiprocessor OS
PC OS
Mainframe OS
Who is responsible for the Banker's algorithm?
Dijkstra
Zobel
Newton
Ostrich
Which I/O mode is most suitable for transferring data between memory and I/O devices without the CPU being bothered?
Direct Memory Access
Programmed I/O
Interrupt-driven I/O
Polling
When the computer is booted, what is used to read in and executes?
BIOS, Boot Block
CPU, BIOS
BIOS, MBR
MBR, BIOS
When a new process is created in a paging system, which of the following is appropriate to determine program size and create page table?
process creation time.
process execution time.
page fault time.
process termination time.
When a directory has been read, it should be closed to free up internal table space that is
Close
Closedir
Delete
Opendir
When a process is running in a contention zone, no other processes are running in the same zone. What is this condition called?
Mutual exclusion.
Bounded-waiting.
Progress.
Critical exclusion.
When a virtual memory system manages memory in fixed length units, which of the following terms correctly represents its unit?
Frame
Page
Block
Segment
A key concept in all operating systems is the_
Files
Process.
Input/Output
The Shell
A program causing page faults every few instructions is said to be
thrashing
crashing
error agent
trojan
A straight forward and quite general solution is to provide the machine with many completely independent address spaces, which is called?
Segment
Paging
Partition
Virtual
AVMM (Virtual Machine Monitor) creates the illusion of multiple (virtual) machines on the same physical hardware. What is VMM also known?
Hypovisor
hypervisor
shell
console
A simple structuring model for a monolithic system is.
Main procedure
Service procedures
Utility procedures
All of the above
A problem closely related to deadlock and livelock is
Starvation
Communication
Two-phase locking
Prevention
A preemptive version of shortest job first (SJF) is_
Shortest Process Next
First-Come, First-Served
Shortest remaining time next
Shortest used time
An interrupt has four properties: The PC (Program Counter) is saved in a known place. All instructions before the one pointed to by the PC have completed. No instruction beyond the one pointed to by the PC has finished. The execution state of the instruction pointed to by the PC is known. What type of Interrupt is it?
Imprecise interrupt
Synchronous interrupt
Sequential interrupt
Precise interrupt
Blu-ray discs are examples of which type of I/O device?
Block device
Disk device
Input device
Character device
Consider the statement: "Each resource is either currently assigned to exactly one process or is available." Which of the following is appropriate for this statement?
No-preemption
Hold-and-wait
Mutual exclusion
Circular wait
Consider a disk queue with requests for I/O to blocks on cylinders: 98, 37, 14, 65, 67. The disk arm motion, if the disk head is initially at 53, is 53, 98, 37, 14, 65, 67. Which the disk arm scheduling algorithms is used?
FCFS
SSF
SJF
Elevator
Disk can be divided up into one or more partitions. The first block of every partition is called:
Boot block
Free block
Super block
MBR
Main memory is usually called
RAM
ROM
EEPROM
CMOS
Most virtual memory systems use a technique called_
Page Fault
Page Frames
Page Table
Paging
In Unix, which the POSIX system call creates the new process?
fork
create
new
CreateProcess
In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
FIFO
LRU
NRU
OPT
In Unix, which command is used to move the file pointer?
Write
Mount
Link
Iseek
In the Linux OS, which key combination stops the ping command in the terminal?
Ctrl+Break.
Ctrl+D.
Ctrl+C.
Ctrl+Z.
In Window OS, which command is used to create a new directory?
Mkdir
Rmdir
Chdir
Chmod
In virtual memory, a solution adopted in the 1960s was to split programs into little pieces called_
overlays
pages
page table
page fault
In the FIFO page replacement algorithm, what data structure is commonly used to implement the page replacement queue?
Stack
Queue
Linked list
Array
What data structure is commonly used to implement the page replacement queue?
Stack
Queue
Linked list
Array
In I/O Devices, the software that talks to a controller, giving it commands and accepting responses, is called
device driver
DMA
device interface
interrupt
In the context of a file system, how many letters do all current operating systems allow as legal file names?
Zero to eight
One to ten
One to eight
One to nine
In DMA transfer cycle, what is the form of operation called when the DMA controller tells the device to acquire the bus, perform a series of transfers, and then release the bus?
Fly-by mode.
Word-at-a-time mode
Burst mode
Caching mode
In a file structure, what type of file is obviously quite different from the unorganized byte streams used in UNIX and Windows and is used on some mainframes for commercial data processing?
Byte sequence
Record sequence
Unstructure
Tree of records
In file access system, random access files are essential for many applications, for example database systems. What two methods are used to specify where to start reading?
Write and Read
Write and Seek
Read and Seek
Read and Write
In a system with multiple processes and resources, which algorithm is commonly used to determine if the resource allocation state is safe or not?
Dijkstra's Algorithm
Banker's Algorithm
Kruskal's Algorithm
Floyd-Warshall Algorithm
In interprocess communication, which synchronization method requires hardware support?
TSL Instruction
Peterson's Solution
Sleep and Wakeup
Semaphores
In UNIX, which type of file is used to model disks?
Regular files.
Character special files.
Block special files.
Directories.
In Linux, the command ps -aux gives the equivalent of the following in MS-Window
Start/shutdown.
Start/Run input CMD.
Open program Task Manager.
Open Add/Remove program.
In file systems, what is sector 0 of the disk called?
Boot block
Superblock
MBR(Master Boot Record)
Free space mgmt
Which of the following is the correct about the type of file sharing described above?
Synchronous Linking
Symbolic Linking
Traditional (hard) Linking
Synthetic Linking
In memory-mapped I/O, to prevent the situation where the software enters an infinite loop while waiting for a device to become. What hardware features or mechanisms can be put in place?
Selectively able caching
Selectively disable buffer
Selectively able buffer
Selectively disable caching
If a process has begun to burn a Blu-ray, suddenly taking the Blu-ray recorder away from it and giving it to another process will result in a garbled Blu-ray. What does the scenario above indicate?
It's an Un-preemptable resource
It's a Preemptable resource
It's a Non-sharable resource
It's a Non-preemptable resource
In the context of memory management, what is the primary advantage of segmented memory over paging in memory management?
Simplified address translation
Efficient use of memory space
Reduced overhead in memory management
Elimination of fragmentation
Regarding the computer's interrupt, which of the following is the number on the address lines that is used as an index into a table to fetch a new program counter?
interrupt vector
interrupt handler
interrupt pointer
interrupt executer
Regarding the hypervisor, the operating system running on the hardware is called the host operating system. Which of the following is the correct type?
Type 1
Type 2
Type 3
Type 4
Sector 0 of the disk is called the and is used to boot the computer.
DMA
MBR
FAT
NTFS
Which of the following is not a part of the operating system?
Performance monitor
Input/output control program
Job control program
Supervisor
Structure of a disk drive consists of
only one metal platter
two metal platters
one or more metal platters
many metal platters
The was invented to attach all the slow I/O devices, such as the keyboard and mouse, to the computer.
ISA
PCI
one or more metal platters
USB
To prevent people from hogging too much disk space, multiuser operating systems often provide a mechanism for enforcing a limit on individual user space. What do we call this mechanism?
Disk Quota
Allocation Limit
Disk Space Limit
Disk Allocation Limit
Time to move the arm to the proper cylinder is called?
Seek time
Rotational delay
Actual data transfer time
Access time
The virtual address space consists of fixed-size units called pages. The corresponding units in the physical memory are called,
Page Fault
Page Frames
Page Table
Paging
The simplest form of I/O is to have the CPU do all the work. What is it called?
Processed I/O
Programmed I/O
CPU I/O
Memory-mapped I/O
The simplest form of directory system is having one directory containing all the files. it is called the
Root directory
User directory
Parent directory
Current directory
The basic concepts on which all operating systems are built are processes, memory management, I/O management, the file system, and security. What is the interface that is provided to access the services of the operating system?
System calls
API
Library
Assembly instruction
The CPU is the most important part of the computer. What is the simple model of the instructions being retrieved from memory and run by the CPU?
Fetch, decode, and execute
Fetch, execute, and decode
Decode, fetch, and execute
Execute, decode, and fetch
This register contains the condition code bits, which are set by comparison instructions, the CPU priority, the mode (user or kernel), and various other control bits is called the:
All of the above
PSW (Program Status Word)
IR (Instruction Register)
PC (Program Counter)
In a file system, what does it give when a process creates a file?
A name
A thread
A process
A space
What is a preemtable resource?
The one that can be taken away from the process owning it with no ill effects
The one that can be taken away from the process owning it with ill effects
The one that can not be taken away from the process owning it with no ill effects
The one that can not be taken away from the process owning it with ill effects
What is a nonpreemtable resource?
The one that can be taken away from its current owner with potentially causing failure.
The one that can be taken away from the process owning it with no ill effects
The one that cannot be taken away from its current owner without potentially causing failure.
The one that cannot be taken away from its current owner without potentially causing failure.
What is the role of the file system in disk management?
To organize and track files and data on the disk.
To allocate memory for disk operations.
To manage the disk's hardware components.
To design disk controllers.
What is the role of the Memory Management Unit (MMU) in a computer system?
The MMU translates virtual addresses into physical addresses
It controls the allocation of memory to different processes.
It manages the paging and swapping of memory pages.
It is a data structure used in computer operating systems for virtual memory management
What is the purpose of Direct Memory Access (DMA) in I/O hardware?
To enable devices to transfer data to and from memory without CPU intervention.
To manage device controllers.
To allocate memory for device drivers.
To provide user interfaces for I/O devices.
What is the primary purpose of process control blocks (PCBs) in process management?
To display information about running processes on the screen.
To store the user's program and data.
To maintain information about each process, including its state, program counter, and CPU registers.
To allocate memory for new processes.
What is the primary purpose of the Kernel in an operating system structure?
To provide a user-friendly interface.
To manage hardware resources and provide services to software.
To store user data and files.
To control the display and graphics of the user interface.
What is the primary disadvantage of using a fixed-size page table in a paging system?
It limits the number of pages a process can have.
It results in excessive memory consumption.
It requires a complex page replacement algorithm.
It leads to inefficient page allocation.
What is the main advantage of using the Clock Algorithm over the Second Chance Algorithm in terms of page replacement efficiency?
The Clock algorithm eliminates the need to move pages around, reducing overhead.
The Clock algorithm increases the complexity of implementation.
The Clock algorithm guarantees fewer page faults compared to Second Chance algorithm.
The Clock algorithm uses more memory to maintain the circular structure.
What is the main function of a watchdog timer in an operating system?
Measure the performance of user programs and memory consumption.
The Clock algorithm eliminates the need to move pages around, reducing overhead.
Detect system crashes and reset the system if necessary.
Schedule tasks to execute at predetermined real-time intervals.
Manage memory allocation.
What is segmentation with paging, and how does it enhance memory management?
A technique for managing multiple memory segments simultaneously.
A method that combines the flexibility of segmentation with the efficiency of paging.
A scheme that uses fixed-size pages to allocate memory.
A scheduling algorithm for thread management.
What is fragmentation in the context of file-system implementation?
A technique for managing directory structures.
The allocation of memory for file storage.
The splitting of files or free space into smaller, non-contiguous blocks.
The arrangement of files on storage devices.
What are the weaknesses of RAID 0?
Requires the highest number of disks in RAID modes
There is no data recovery mechanism
The unit of data transmitted is at the BIT level
Does not improve read and write speeds
What are the two types of I/O devices roughly?
Block devices and sequence devices
Block devices and character devices
Character devices and I/O devices
Character devices and digital devices
What does 'no preemption' imply in the context of deadlocks?
Resources can be preempted from one process to another.
Resources cannot be preempted once allocated.
Processes can be terminated to free up resources.
Resources are allocated in a circular manner.
What does the term 'blocking' refer to in the context of I/O software?
A technique for managing device drivers.
A mechanism for ensuring device synchronization.
The process of stopping a process until an I/O operation is completed.
A method of allocating memory for I/O operations.
What does a resource allocation graph represent in the context of deadlock detection?
A graph that shows the number of resources allocated to each process.
A graph that depicts the processes and resources and their relationships.
A chart showing the execution order of processes.
A diagram of CPU scheduling.
What defines a critical section in the context of the Windows operating system?
It is a segment of code that only one thread can execute at a time to avoid data inconsistency or conflicts.
It is a section of code where the processor gives priority to execute multiple threads simultaneously.
It is a section of code where hardware interrupts are disabled to ensure uninterrupted execution.
It is a part of the kernel where system-level processes are given higher priority over user-level processes.
What types of operations is DMA useful for?
Transfers large and fast data between memory and I/O devices.
Transfers large and slow data between memory and I/O devices.
Transfers slow and small data between memory and I/O devices.
Transfers small data between memory and cache or memory and I/O devices.
What happens to the program counter after an instruction is fetched?
It is reset to zero
It is updated to point to the next instruction
It is used to store the result of the instruction
It is used to store the total length of the program being executed
Which of the following statements regarding deadlock is correct?
Allocation is a logical process while acquisition is its physical implementation.
Banker's Algorithm is used to guarantee absolute mutual exclusion during resource acquisition.
C. A combination of semaphore and mutex ensures safe resource allocation
D. Kernel is responsible for exclusive resource acquisition by a process while IPC takes care of safe resource allocation among multiple processes.
Which of the following actions does the operating system take to execute a new process?
A. Provide immediate CPU for process
B. Delivery the resources must be process.
C. Create immediate PCB blocks for process.
D. Provide immediate Register for process.
Which of the following best describes the relationship between threads within a single process?
A. Threads are completely independent and do not share any resources
B. Threads share the same memory space but have their own registers.
C. Threads are separate and isolated from one another
D. Threads are tightly integrated, and they all have their own separate memory space
Which of the following best describes the difference between a process and a thread in the context of the Windows operating system?
A. A process contains multiple threads and shares resources, while a thread is an independent execution unit within a process.
B. A process is a program in execution, while a thread is a sequence of instructions that can execute independently
C. A process and a thread are essentially the same in Windows OS, with no significant difference between them.
D. A process represents system resources, while a thread is responsible for user interface interactions in Windows OS.
