id stringlengths 1 4 | question stringlengths 6 1.87k | context sequencelengths 5 5 | choices sequencelengths 2 18 | answer stringlengths 1 840 |
|---|---|---|---|---|
5 | Which of the following scheduler policies are preemptive? | [
"Fixed-priority preemptive scheduling is a scheduling system commonly used in real-time systems. With fixed priority preemptive scheduling, the scheduler ensures that at any given time, the processor executes the highest priority task of all those tasks that are currently ready to execute. The preemptive scheduler ... | [
"FIFO (First In, First Out)",
"SJF (Shortest Job First)",
"STCF (Shortest Time to Completion First)",
"RR (Round Robin)"
] | ['STCF (Shortest Time to Completion First)', 'RR (Round Robin)'] |
6 | Which of the following are correct implementation for acquire function ? Assume 0 means UNLOCKED and 1 means LOCKED. Initially l->locked = 0. | [
"is in the lexical scope of the anonymous function. Higher-order funcMons • Functions that operate on other functions, either by taking them as arguments or by returning them, are called higher-order functions. function myFunc() { const anotherFunc = function() { console.log(\"inner\"); } return anotherFunc; } cons... | [
"c \n void acquire(struct lock *l)\n {\n for(;;)\n if(xchg(&l->locked, 1) == 0)\n return;\n }",
"c \n void acquire(struct lock *l)\n {\n if(cas(&l->locked, 0, 1) == 0)\n return;\n }",
"c \n void acquire(struct lock *l)\n {\n for(;;)\n if(cas(&l->locked, 1... | ['c \n void acquire(struct lock *l)\n {\n for(;;)\n if(xchg(&l->locked, 1) == 0)\n return;\n }'] |
11 | In which of the following cases does JOS acquire the big kernel lock? | [
"@1ntext Persa Now, suppose Persa is a packet switch that forwards Alice’s traffic to Bob. Suppose Persa *modifies* the {plaintext, ciphertext} pair sent by Alice. But because Persa does not know *Alice’s private key*, she cannot produce a “consistent” pair: when Bob decrypts [click] Persa’s ciphertext he will not ... | [
"Processor traps in user mode",
"Processor traps in kernel mode",
"Switching from kernel mode to user mode",
"Initialization of application processor"
] | ['Processor traps in user mode', 'Initialization of application processor'] |
15 | In an x86 multiprocessor with JOS, how many Bootstrap Processors (BSP) is it possible to have at most? And how many Application Processors (AP) at most? | [
"use since 1981 when Hunter & Ready, the developers of the Versatile Real-Time Executive (VRTX), first coined the term to describe the hardware-dependent software needed to run VRTX on a specific hardware platform. Since the 1980s, it has been in wide use throughout the industry. Virtually all RTOS providers now us... | [
"BSP: 0, AP: 4",
"BSP: 1, AP: 4",
"BSP: 2, AP: 4",
"BSP: 0, AP: infinite",
"BSP: 1, AP: infinite",
"BSP: 2, AP: infinite"
] | ['BSP: 1, AP: infinite'] |
20 | Assume a user program executes following tasks. Select all options that will use a system call. | [
"The operating system takes control L03.3: System calls CS202 - Computer Systems Lectures slides adapted from the OS courses from Cornell, EPFL, IITB, UCB, UMASS, and UU Question How can a process request (from the OS) for operations that are only possible in the kernel mode (example: IO requests)? 25 26 Requesting... | [
"Read the user's input \"Hello world\" from the keyboard.",
"Write \"Hello world\" to a file.",
"Encrypt \"Hello world\" by AES.",
"Send \"Hello world\" to another machine via Network Interface Card."
] | ['Read the user\'s input "Hello world" from the keyboard.', 'Write "Hello world" to a file.', 'Send "Hello world" to another machine via Network Interface Card.'] |
22 | What is the content of the inode? | [
"ed to the file by the file system Note Inodes are unique for a file system but not globally Recycled after deletion An inode contains metadata of a file Permissions length access time Location of data block and indirection block Each file ha exactly one associated inode OS view Inode persistent ID Storage space is... | [
"Filename",
"File mode",
"Hard links counter",
"String with the name of the owner",
"File size",
"Capacity of the whole file system",
"Index structure for data blocks"
] | ['File mode', 'Hard links counter', 'File size', 'Index structure for data blocks'] |
23 | In x86, what are the possible ways to transfer arguments when invoking a system call? For example, in the following code, string and len are sys_cputs’s arguments. | [
"a letter through the postal system, you have to follow certain rules. - You need to put your letter in an envelope and write a correct address on a particular part of the envelope. - You need to drop your letter in a mailbox. These rules are the “interface” between you and the postal system -- your only way of usi... | [
"Stack",
"Registers",
"Instructions"
] | ['Stack', 'Registers'] |
26 | What is the worst case complexity of listing files in a directory? The file system implements directories as hash-tables. | [
"In computer science, a hash list is typically a list of hashes of the data blocks in a file or set of files. Lists of hashes are used for many different purposes, such as fast table lookup (hash tables) and distributed databases (distributed hash tables). A hash list is an extension of the concept of hashing an it... | [
"$O(1)$",
"$O(number of direntries in the directory)$",
"$O(size of the file system)$",
"$O(number of direntries in the file system)$",
"$O(log(number of direntries in the directory))$"
] | ['$O(number of direntries in the directory)$'] |
40 | In JOS, suppose one Env sends a page to another Env. Is the page copied? | [
"tag probability e pronunciation b oa r d z etc set of record identi ed by a reference e g a database with primary key Words Tokens Introduction Words Tokens Lexicon N gram Conclusion c EPFL J C Chappelier Field representation External v Internal structure i e serialization v memory representation Internal structur... | [
"Yes",
"No"
] | ['No'] |
41 | In JOS and x86, please select all valid options for a system call. | [
"extra wv2 x2x xalan-java xbill xbitmaps xcb-proto xclip xerces2-java xf86-input-acecad xf86-input-aiptek xf86-input-joystick xf86-input-keyboard xf86-input-mouse xf86-input-synaptics xf86-input-vmmouse xf86-input-void xf86-video-apm xf86-video-ark xf86-video-ast xf86-video-chips xf86-video-cirrus xf86-video-dummy ... | [
"A system call is for handling interrupts like dividing zero error and page fault.",
"In user mode, before and after a system call instruction(such as int 0x30), the stack pointer(esp in x86) stays the same.",
"During the execution of a system call, when transfering from user mode to kernel mode, the stack poin... | ['In user mode, before and after a system call instruction(such as int 0x30), the stack pointer(esp in x86) stays the same.'] |
44 | What are the drawbacks of non-preemptive scheduling compared to preemptive scheduling? | [
"Run-to-completion scheduling or nonpreemptive scheduling is a scheduling model in which each task runs until it either finishes, or explicitly yields control back to the scheduler. Run-to-completion systems typically have an event queue which is serviced either in strict order of admission by an event loop, or by ... | [
"It can lead to starvation especially for those real-time tasks",
"Less computational resources need for scheduling and takes shorted time to suspend the running task and switch the context.",
"Bugs in one process can cause a machine to freeze up",
"It can lead to poor response time for processes"
] | ['It can lead to starvation especially for those real-time tasks', 'Bugs in one process can cause a machine to freeze up', 'It can lead to poor response time for processes'] |
45 | Select valid answers about file descriptors (FD): | [
"\"Everything is a file\" is an approach to interface design in Unix derivatives. While this turn of phrase does not as such figure as a Unix design principle or philosophy, it is a common way to analyse designs, and informs the design of new interfaces in a way that prefers, in rough order of import: representing ... | [
"The value of FD is unique for every file in the operating system.",
"FD is usually used as an argument for read and write.",
"FD is constructed by hashing the filename.",
"FDs are preserved after fork() and can be used in the new process pointing to the original files."
] | ['FD is usually used as an argument for read and write.', 'FDs are preserved after fork() and can be used in the new process pointing to the original files.'] |
46 | What is the default block size for a traditional file system, e.g. ext3/4? | [
"the meaning of the standard metric terms. Rather than based on powers of 1000, these are based on powers of 1024 which is a power of 2. The JEDEC memory standard JESD88F notes that the definitions of kilo (K), giga (G), and mega (M) based on powers of two are included only to reflect common usage, but are otherwis... | [
"32 bits",
"32 bytes",
"512 bits",
"512 bytes",
"4096 bits",
"4096 bytes"
] | ['4096 bytes'] |
47 | Suppose a file system used only for reading immutable files in random fashion. What is the best block allocation strategy? | [
"at the beginning of the partition Data blocks Data blocks Data blocks Data blocks Data blocks Data blocks Inodes Free lists • One logical superblock per file system • Stores the metadata about the file system • Number of inodes • Number of data blocks • Where the inode table begins • May contain information to man... | [
"Linked-list allocation",
"Continuous allocation",
"Index allocation with B-tree",
"Index allocation with Hash-table"
] | ['Continuous allocation'] |
50 | Which of the following operations would switch the user program from user space to kernel space? | [
"'s basic functions, such as scheduling processes and controlling peripherals. In the 1950s, the programmer, who was also the operator, would write a program and run it. After the program finished executing, the output may have been printed, or it may have been punched onto paper tape or cards for later processing.... | [
"Dividing integer by 0.",
"Calling sin() in math library.",
"Invoking read() syscall.",
"Jumping to an invalid address."
] | ['Dividing integer by 0.', 'Invoking read() syscall.', 'Jumping to an invalid address.'] |
61 | Which flag prevents user programs from reading and writing kernel data? | [
"s was done without Institutional Review Board (IRB) approval. Despite undergoing review by the conference, this breach of ethical responsibilities was not detected during the paper's review process. This incident sparked criticism from the Linux community and the broader cybersecurity community. Greg Kroah-Hartman... | [
"PTE_P",
"PTE_U",
"PTE_D",
"PTE_W"
] | ['PTE_U'] |
62 | In JOS, after finishing the execution of a user-level page fault handler, how is the program control flow transferred back to the program? (You may get insights from the code snippet of _pagefault_upcall.) | [
"s call downwards, i.e., from application components to those closer to the hardware, while events call upwards. Certain primitive events are bound to hardware interrupts. Components are statically linked to each other via their interfaces. This increases runtime efficiency, encourages robust design, and allows for... | [
"The control flow will be transferred to kernel first, then to Env that caused the page fault.",
"The control flow will be transferred to Env that caused the page fault directly."
] | ['The control flow will be transferred to Env that caused the page fault directly.'] |
64 | What is the content of the superblock in the JOS file system? | [
"JEAN was a dialect of the JOSS programming language developed for and used on ICT 1900 series computers in the late 1960s and early 1970s; it was implemented under the MINIMOP operating system. It was used at universities including the University of Southampton. The name was an acronym derived from \"JOSS Extended... | [
"List of all directories",
"List of all files",
"List of all blocks",
"List of all inodes",
"Total number of blocks on disk",
"Magic number identifying the file system",
"Node with the root directory ('/')"
] | ['Total number of blocks on disk', 'Magic number identifying the file system', "Node with the root directory ('/')"] |
69 | In which of the following cases does the TLB need to be flushed? | [
"walks” page table 49 Translation lookaside buffer (TLB) A cache of recent virtual address to physical address mappings Translating virtual address to physical address: 1. MMU first looks up TLB 2. If TLB hit: physical address can be directly used 3. Only if TLB miss: MMU “walks” page table • TLB misses are expensi... | [
"Inserting a new page into the page table for a user-space application.",
"Deleting a page from the page table.",
"Changing the read/write permission bit in the page table.",
"Inserting a new page into the page table for kernel."
] | ['Deleting a page from the page table.', 'Changing the read/write permission bit in the page table.'] |
71 | Select all valid answers about UNIX-like shell. | [
"le. As all subjects assigned to a role are the same to the system, the system does not have the means to see if there are one or two users to enforce the separation of privilege. Another option, instead of looking at similarity between users, is to look at of permissions that are often needed together to run the s... | [
"The shell is a program, that runs in user-space.",
"The shell is a program, that runs in kernel-space.",
"The shell is a program, which reads from standard input.",
"The shell is a function inside kernel.",
"The shell is the layer, which has to be always used for communicating with kernel.",
"The shell m... | ['The shell is a program, that runs in user-space.', 'The shell is a program, which reads from standard input.', 'The shell is a user interface for UNIX-like systems.'] |
74 | In x86, select all synchronous exceptions? | [
"Automatic mutual exclusion is a parallel computing programming paradigm in which threads are divided into atomic chunks, and the atomic execution of the chunks automatically parallelized using transactional memory. References See also Bulk synchronous parallel",
"synchronous\", serial link. If you have an extern... | [
"Divide error",
"Timer",
"Page Fault",
"Keyboard"
] | ['Divide error', 'Page Fault'] |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3