COMP3000 Midterm Review
What is preemptive multitasking?
Allowing multiple CPUs to execute tasks simultaneously
Allowing processes to voluntarily yield control of the CPU
Involves interrupting the currently executing process to schedule another
Involves executing tasks in sequence without interruption
What is the purpose of the FUSE (Filesystem in Userspace) system?
To allow users to create file systems without going through the kernel
To manage file permissions and access control
To improve disk performance by caching frequently accessed files
To provide a virtual file system for network-attached storage
What is the function of the RAM in a computer system?
To permanently store data and programs
To execute instructions and perform calculations
To provide temporary storage for data and programs
To manage input/output operations
What is the purpose of environment variables in an operating system?
To store user preferences for system settings
Communicate data and preferences to child processes
To manage internal commands in the shell
To control access permissions for files and directories
Which of the following is an example of an environment variable?
Cd
~/.PATH
Ls
Help
Where are environment variables accessible within an operating system?
Only within the shell
Only within specific processes
Throughout the entire operating system
Only within specific user directories
Which of the following statements best describes indirect execution in computing?
Programs are run directly through the CPU
Programs are compiled into machine code that the CPU can understand
Programs are interpreted into machine code by an interpreter
Programs are executed using a virtual machine
What is the purpose of limited direct execution in operating systems?
To execute programs written in compiled languages
To allow processes to execute syscalls without full access to the CPU
To switch the CPU into kernel mode for certain operations
To improve the performance of interpreted languages
What is the role of the PCB (Process Control Block) in operating systems?
To manage the execution context of a process
To schedule processes for execution
To switch the CPU between processes
To track metadata about each process
What is the main difference between threads and processes in computing?
Threads share the same address space, while processes do not
Threads have their own Program Counter (PC) register values, while processes do not
Threads have separate stacks and Stack Pointers (SP), while processes do not
Threads have their own memory allocation, while processes do not
How does swapping help improve memory management in operating systems?
By dividing the address space into fixed-sized pages
By allocating physical memory for each page
By swapping pages of memory onto disk to free up physical memory
By swapping the address space in the RAM
What is the difference between mechanisms and policies in operating systems?
Mechanisms refer to how decisions are made, while policies refer to what decisions are made
Mechanisms refer to what decisions are made, while policies refer to how decisions are made
Mechanisms refer to low-level operations, while policies refer to high-level rules and guidelines
Mechanisms refer to high-level rules and guidelines, while policies refer to low-level operations
What is the role of the kernel in providing abstraction in operating systems?
To manage the execution context of processes
To provide a layer of abstraction between hardware and software
To switch the CPU between processes
To track metadata about each process
Why are fork() and exec() separate operations in operating systems?
Because fork() only creates a duplicate of the parent process, while exec() replaces the current process image with a new one
Because fork() and exec() are used to create threads in a process
Because fork() and exec() are used to manage memory allocation in a process
Because fork() and exec() are used to manage file operations in a process
What is the difference between concurrency and parallelism in computing?
Concurrency refers to processes running at the same time on different CPUs, while parallelism refers to processes running on a shared CPU
Concurrency refers to processes running at exactly the same time, while parallelism refers to processes running at slightly different times
Concurrency refers to processes running at the same time on a shared CPU, while parallelism refers to processes running at the same time on different CPUs
Concurrency and parallelism are the same thing in computing
What is the main difference between static and dynamic memory allocation?
Static allocation allocates memory at compile time, while dynamic allocation allocates memory at runtime
Static allocation allocates memory on the stack, while dynamic allocation allocates memory on the heap
Static allocation is faster than dynamic allocation
Dynamic allocation allows for the resizing of memory blocks
What is the purpose of "/sbin/getty" in the process of interacting with a computer?
Launches the shell
Gets the terminal
Prompts for login
Manages user accounts
What does the "init" process in Unix-like operating systems do?
It manages signals in the system
It reaps zombie processes
It handles user logins
It launches the shell
What is the purpose of the ">" redirection operator in Unix-like operating systems?
They redirect input from a file into a process
They redirect output from a process into a file
They create new files
They append output to an existing file
How does a shell pipeline (|) work in Unix-like operating systems?
It connects input from one process to the output of the other process
It connects output from one process to the input of another process
It connects multiple programs together to form a single command
It redirects output to a file
How can you provide input to a process in Unix-like operating systems using redirection?
By using the">" operator
By using the "<" operator
By using the">>" operator
By using the"|" operator
What is the purpose of the "ioctl()" function in Unix-like operating systems?
It creates a new file
It opens a file for reading and writing
It performs I/O control operations on a file
It reads data from a file descriptor
What is the purpose of the "sigaction()" function in signal handling?
It sends a signal to a process
It sets a signal handler for a specific signal
It suspends the execution of a process
It resumes the execution of a suspended process
What is the significance of the "mountpoint" in Unix-like operating systems?
It is the location where filesystems are mounted in the directory tree
It is a command used to list mounted filesystems
It is a file that contains information about mounted filesystems
It is a system call used to mount filesystems
What is the purpose of the superblock in a filesystem?
It contains the metadata about the whole filesystem
It stores the actual data blocks of files
It maps human-readable filenames to inode numbers
It contains the file metadata, such as link count and data block pointers
How does a symbolic link differ from a hard link in Unix-like operating systems?
A symbolic link can only be created on directories, while a hard link can be created on files
A symbolic link points to a pathname, while a hard link points to an inode
A hard link can span different file systems, while a soft link cannot
A symbolic link has its own inode, while a hard link shares the inode of the original file
What happens when a file is copied within the same filesystem in Unix-like operating systems?
A new inode is created for the copied file
The link count of the original file is decreased by 1
The file is simply relinked to the new pathname
The inode of the original file is removed
What is the purpose of the "fsck" command in Unix-like operating systems?
It creates a new filesystem
It checks and repairs filesystem inconsistencies
It mounts a filesystem to a specific mount point
It lists all mounted filesystems
How does a directory differ from a regular file in Unix-like operating systems?
A directory has its own inode, while a regular file shares the inode of the parent directory
A directory can be accessed at the granularity of blocks, while a regular file cannot
A directory contains only metadata about files, while a regular file contains actual data
A directory contains a collection of tuples (filename, inode number), while a regular file contains data blocks
How are block devices different from character devices in Unix-like operating systems?
Block devices are accessed at the granularity of blocks, while character devices are accessed at the granularity of characters.
Block devices are addressable, while character devices are not
Block devices are used for storing files, while character devices are used for storing device drivers
Block devices have a major number that identifies the type of device, while character devices do not
What is the difference between the logical size and the physical size of a file in Unix-like operating systems?
Logical size can be larger than physical size due to internal fragmentation
Logical size is the actual size of the file, while physical size is the allocated space on disk
Physical size is the actual size of the file, while logical size is the allocated space on disk
Physical size can be larger than logical size due to external fragmentation
What is the purpose of a file descriptor in Unix-like operating systems?
It stores the actual data blocks of a file
It maps human-readable filenames to inode numbers
It is an integer assigned to files opened by a process
It contains metadata about a file, such as link count and data block pointers
What is the purpose of the dentry in a Unix-like filesystem?
It contains the actual data of the file
It maps human-readable filenames to inode numbers
It is a special type of file used for storing device drivers
It stores the metadata about the file, such as permissions and timestamps
What is the purpose of the "fsync" system call in Unix-like operating systems?
It flushes the buffer cache to disk
It synchronizes the filesystem with the disk
It creates a new filesystem
It checks the filesystem for errors
What happens when a file is removed in a Unix-like filesystem?
The file is immediately deleted from disk
The link count of the file is decreased by 1
The inode of the file is immediately removed
The file is moved to a trash bin for recovery
{"name":"COMP3000 Midterm Review", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is preemptive multitasking?, What is the purpose of the FUSE (Filesystem in Userspace) system?, What is the function of the RAM in a computer system?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
More Quizzes
RP 33 Ch.1-Ch.3
10518
Vital Signs Quizer
1050
Biologie
320
Találd ki (Jasmine) válaszait!
1260
Justin Bieber quiz
100
Would you rather...
940
Székelyudvarhely, az egykori város
1050
Here you goo :>
34176
LUKONYI BOYS PRIMARY SCHOOL STD 8 SCIENCE ASSIGNMENT FOR WEEK 1
2512125
ტატისტიკა 2 , თავი მე-2
23120
Taylor Swift Eras
1478
Englanti 7h 13.5
1587