University Assignment: CEG2350 Operating Systems Concepts

Verified

Added on  2023/05/27

|30
|6331
|487
Homework Assignment
AI Summary
This document presents solutions to a computer science homework assignment, likely for an Operating Systems course (CEG2350). The assignment covers a wide range of core operating systems concepts. The questions address topics such as cryptographic hash functions (SHA-2 and MD5), process and thread scheduling (FIFO), file system design, version control systems, networking fundamentals (routers, hubs, DNS), process management (child processes, shells), multi-user system architecture, virtualization, regular expressions, memory management (page faults, segmentation faults, bus errors), and command-line shells. The solutions provide correct answers to multiple-choice questions, testing the student's understanding of these fundamental operating systems principles. The assignment highlights the importance of understanding concepts like process scheduling, memory management, networking, and security in the context of operating systems design and implementation.
Document Page
NOTE: THE ANSWERS ARE MARKED IN YELLOW
Question 1
Which of the following is true?
A) SHA-2 is a set of cryptographic hash functions designed by the U.S. National Security Agency (NSA) and published in 2001 by the
National Institute of Standards and Technology (NIST) as a U.S. Federal Information Processing Standard (FIPS).
B) SHA-2 digests (checksums) are 224, 256, 384 or 512 bits.
C) We should unquestioningly trust NSA provided cryptographic hash functions because the NSA has never hidden "back doors" to enable
easy unauthorized decryption by governmental organizations.
D) Carnegie Mellon University (CMU) Software Engineering Institute (SEI) now says that SHA-2 "should be considered cryptographically
broken and unsuitable for further use.”
Question 1 options:
C, and D
A and B
A, B, and D
A, B, and C
Question 2
Which of the following may operating system process/thread schedulers attempt to optimize?
A) CPU Utilization: Percent of time that the CPU is running threads
B) CPU Throughput: Number of completed “operations” per second.
C) Turnaround time: Process end time – Process start time.
D) Response time: Minimize total time process waits while ready to run
E) Waiting time: Minimize total time process spends not ready to run
F) Efficiency: Conserve power or other resources
G) Latency: Minimize (or standardize) process response times
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
H) Fairness: Distribute resources to processes equitably
Question 2 options:
All but B
All but H
All of them
Only H
Question 3
Which of the following statements is true? You may select more than one.
Question 3 options:
A
)
In many file system designs, there are two kinds of fragmentations possible. (i) File content is stored in disk
blocks. File content is seldom an exact multiple of disk blocks, so the last block used is almost never full.
This is known as internal fragmentation. (ii) Large files are almost always stored in non-consecutive blocks
scattered around non-volatile memory. This is known as external fragmentation.
B
)
sudo apt-get update updates the locally stored database of what applications are installed and
what newer versions are now available. sudo apt-get update replaces older applications with
newer ones.
Document Page
C) In Debian Linux version like Lubuntu, sudo apt-get install
nameOfThePackage installs the package; sudo apt-get remove
nameOfThePackage uninstalls it. The command dpkg -l lists all the packages
installed.
D) In Windows, software is packaged in a file format known as .msi,
and msiexec.exeinstalls such packages. When you double-click on
a .msi file, the Graphical User Interface (GUI) front-end of this
program is invoked by association. The msiexecprogram has
many command-line switches not available through the GUI.
Question 4
Which of the following statements are true?
A) Any type of file on a computer can be placed under version control.
B) SCCS, CVS, RCS, SVN, and GIT are all version control tools.
C) All version control tools require "check out" and "check in" of files to prevent simultaneous edits to the same file by different users.
D) Version control systems are useful for projects implemented by a single person.
Question 4 options:
A and B
Document Page
A, B, and C
A, B, and D
A and C
Question 5
Which of the following statements are true?
A) A router is a networking device that forwards data packets between computer networks. Routers perform the traffic directing functions on
the Internet.
B) An Ethernet hub is a network hardware device for connecting multiple Ethernet devices together and making them act as a single network
segment. It has multiple input/output (I/O) ports, in which a signal introduced at the input of any port appears at the output of every other port.
C) An Internet Service Provider (ISP) is an organization that provides services for accessing and using the Internet.
D) The Domain Name System (DNS) is a decentralized naming system for computers, services, or any resource connected to the Internet. It
translates domain names to the numerical IP addresses needed for the purpose of locating and identifying computer services and devices with
the underlying network protocols.
E) In a man-in-the-middle attack, the attacker secretly relays and possibly alters the communication between two parties who believe they are
directly communicating with each other. A man-in-the-middle attack can be used to circumvent asymmetric cryptographic protocols.
Question 5 options:
A, D, E
B, C, E
A, B, C, D
A, B, C
B, C, D
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Question 6
Which of the following statements are true?
A) A child process usually “inherits” the run time environment/permissions of the parent process that starts it.
B) Child processes return status to the parent when the child terminates.
C) Child processes terminate if the parent terminates unless the child is detached from its parent.
D) A shell is usually the parent of each process started by the shell.
Question 6 options:
B, C, and D
A, B, and C
A, B, C, and D
C, and D
Question 7
Which of the following statements are true about FIFO (Batch) Process Scheduling?
A) FIFO (Batch) Process Scheduling is not preemptive.
B) FIFO (Batch) Process Scheduling is not equitable (one process may hog the CPU).
C) Latency of queued process start is often unpredictable
D) Most modern operating systems use FIFO (Batch) Process Scheduling because it is very efficient.
Document Page
Question 7 options:
Only C
Only D
A, B, and D
A, B, and C
Question 8
Which of the following statements are true?
A) Multi-user systems have user accounts to enable accounting, security, logging, and resource management per user.
B) Multi-user systems correlate usernames with user IDs.
C) File ownership may be correlated with a user ID.
D) Multi-user systems may require user login and authentication to determine authorization/permission to access system resources.
E) Modern versions of the Windows operating systems are roughly equivalent to a single-user, single-account operating systems; this means
that all processes can modify the boot sector and perform other low-level hard drive modifications. This enables viruses and other
clandestinely installed software to integrate themselves with the operating system in a way that is difficult to detect or undo.
Question 8 options:
A, B, D, and E
Only E
A, B, C, and D
A, B, C, D, and E
Question 9
Document Page
Which of the following statements is true? You may select more than one.
Question 9 options:
A
)
Many modern CPUs provide hardware level support/optimization for virtualization and creation of Virtual
Machines.
B
)
A hypervisor is a virtualization technique.
C) Python is a scripting language commonly on Linux based systems.
D) The Java Virtual Machine (JVM) is a complete system emulation
and usually hosts a guest operating system.
Question 10
Which of the following regular expressions only matches variable names with all of the following rules?
1) Variable names must start with an alphabetic character or an underscore.
2) If a variable name starts with an underscore, the variable name must include at least one alphabetic character.
3) Variable names may include numbers at any position after the start.
Note: This question has one of the lowest correct answer rates of any question used in CEG2350 exams. Why is this? If the answer isn't
obvious to you just by looking at the options, why don't you create some test cases and actually test each of the candidate regular expressions?
Question 10 options:
1 and 3
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
(^[a-zA-Z][a-zA-Z0-9_]*)|(^[_]+[0-9]*[a-zA-Z]+[a-zA-Z0-9_]*)
(.[a-zA-Z][a-zA-Z0-9_]*)|(^[_]+[a-zA-Z0-9_]*)
(^[a-zA-Z][a-zA-Z0-9_]*)|(^[_]+[a-zA-Z0-9_]*)
(.[a-zA-Z][a-zA-Z0-9_]*)|(^[_]*[a-zA-Z0-9_]$)
Question 11
Which of the following statements are true?
A) A virtual machine (VM) is a software implementation of a machine (i.e. a computer) that executes programs like a physical machine.
B) Virtual machines enable multiple OS environments co-existing on the same computer in strong isolation from each other.
C) The terms "virtual Machine" and "virtual memory" refer to the same concept.
D) Virtual machines may emulate an instruction set architecture (ISA) different from that of the host machine.
E) The “host” operating system controls the physical hardware. One or more “guest” operating systems control virtual hardware.
Question 11 options:
A, B, C, and D
A and E
A, B, and C
A, B, D, and E
Question 12
Which of the following statements are true?
Document Page
A) A page fault is a type of fault detected by computer hardware when a running program accesses a memory page that is mapped into the
virtual address space, but not actually loaded into main memory. Software that handles page faults is generally a part of the operating system.
When handling a page fault, the operating system generally tries to make the required page accessible at the location in physical memory or
terminates the program in case of an illegal memory access.
B) A segmentation fault is a type of fault detected by computer hardware with memory protection to notify an operating system (OS) about a
memory access violation. The OS will, in response, usually perform some corrective action, generally passing the fault on to the offending
process or causing abnormal termination of the process.
C) A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a
memory location in a way that is not allowed e.g. attempting to write to a read-only location or fetch an instruction from non-executable
memory.
D) A bus error is a type of fault detected by computer hardware to notify an operating system (OS) that a process is trying to access memory
that the CPU cannot physically address i.e. an invalid address for the address bus. In modern use on most architectures these are much rarer
than segmentation faults, which occur primarily due to memory access violations.
E) Computer applications make a call using the application programming interface (API) to access shared resources, like the keyboard,
mouse, screen, disk drive, network, and printer. These can fail in two ways: Blocked Calls or Faults. A blocked call is a request for services
from the operating system that halts the computer program until results are available. Faults originate from API calls, from the operating
system, and from other applications, and typically, any fault that is not handled by an application causes premature application termination.
Fault-tolerant software continues to meet operational requirements in spite of the possibility of blocking and faults.
Question 12 options:
A, C, D
A, B, C, D, E
A, E
B, E
A, B, C, E
Question 13
Which of the following statements are true?
Document Page
A) MD5 is a cryptographic hash function producing a 128-bit (16-byte) hash value, typically expressed in text format as a 32 digit
hexadecimal number.
B) MD5 is used to verify data integrity.
C) MD5 was designed by Ron Rivest in 1991.
D) It is exceedingly unlikely for two files with different contents to unintentionally have the same MD5 hash value, but two files with
different contents may be deliberately crafted to have the same MD5 hash value.
E) The CMU Software Engineering Institute considers MD5 essentially "cryptographically broken and unsuitable for further use".
Question 13 options:
A, B, C, D, and E
A
C and E
Only E
A and B
B and C
Question 14
Which of the following statements are true?
A) Different command line shells interpret different programming languages
B) ksh is a shell available on some Unix systems
C) tclsh is a shell that interprets the TCL language
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
D) Shells may be graphical and use a mouse.
Question 14 options:
B, C, and D
A, B, and D
C and D
A, B, C, and D
A, B, and C
Question 15
Which of the following statements are true?
A) A blocked process is not ready to run until some condition is met.
B) A process may block until an I/O operation completes.
C) A process may block until a timer expires.
D) A process may block until exclusive access to a resource is obtained.
E) Processes never block.
Question 15 options:
Only A
A, B, and D
Only E
A, B, C, and D
Question 16
Document Page
Bash is a Turing Complete programming environment, and give sufficient time and memory, Bash could be used to implement a Java Virtual
Machine.
Question 16 options:
True
False
Question 17
Which of the following are true?
A) Files are collections of bytes associated with metadata.
B) Files may be stored in persistent memory
C) Files may be stored in volatile memory
D) Files are not the only way to organize and store information
Question 17 options:
A, B, C and D
B and C
C and D
A and B
Question 18
The terms endian and endianness refer to the convention used to interpret the bytes making up a data word when those bytes are stored in
computer memory or transmitted over a network. In computing, memory commonly stores binary data by organizing it into 8-bit units called
bytes. Each byte has a unique address. When reading or writing a data word consisting of multiple such units, the order of the bytes stored in
memory determines the interpretation of the data word. Endianness refers to the question: Does the most significant byte of a multi-byte word
have a lower address (come first) or a higher address (come after) the least significant byte.
Question 18 options:
chevron_up_icon
1 out of 30
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]