Professional Documents
Culture Documents
Solution 4105 MID 18 19
Solution 4105 MID 18 19
1(b)
1(c)
Virus: Virus is a software or computer program that connects itself
to another software or computer program to harm a computer
system and spread to other computers. A virus is attached to an
executable file and cannot spread itself unless a user executes the
malicious file.
Trojan Horse: These are malicious programs that look like a genuine
applicationTrojan horses do not replicate themselves. Trojans open a
backdoor entry to a computer which gives malicious
users/programs access to the system, allowing confidential and
personal information to be stolen.
2(c)
On a single-processor system, multiple processes don’t actually
run at the same time since there’s only one processor. Instead,
the processor switches among the active processes. Because
computers are so fast compared with people, it appears to the
user as though the computer is executing all of the tasks at once.
To make a single core able to run multiple processes,
time-division multiplexing is used. Here the OS sets up a timer
which interrupts the system at a fixed interval. A single interval is
known as a time slice. Everytime this interrupt occurs, the OS
runs the scheduling routine, which picks the next thread that is
due to be executed. Reassigning a CPU from one task to another
one is called a context switch. Basically, the state of CPU’s
registers and program counter at any time represent a context.
Whenever a process is entering the suspend mode, its context is
saved in memory/stack. The processor then recovers (or creates)
the context for the new process. When the first process is going
to execute again, its context is recovered. This context switch is
done by either software (operational system) or hardware.
2(d)
1. The data required to be printed is transferred from the
computer to the laser printer. This is usually via an ethernet
cable or wirelessly if the printer has wireless capabilities.
2. The printer then has to reach the required temperature via
the heating of the corona wire. This wire, once heated,
passes an electrical static charge to the drum unit.
3. The drum unit, now negatively charged, receives data from
a laser.
4. Once the laser is activated, the beam reflects off a moving
mirror unit which directs the beam directly onto the drum
unit.
5. In the areas where the beam hits the drum, the charge is
changed from negative to positive. The positively charged
areas now represent where toner particles will adhere to
the drum and be directly transferred onto the paper.
6. The ink roller now begins to coat the drum with toner. Toner
is composed of microscopic ink particles which, now
negatively charged, adhere to the positively charged areas
on the drum unit.
7. A positively charged sheet of paper is now passed close to
the drum, attracting the negatively charged toner particles
onto the page.
8. The paper, now containing the inked content, is passed into
the fuser unit where the rollers melt and fuse the toner
particles to the paper.
The page is then passed through to the other side of the printer,
and you now have one successful printout!
2(e)
Parallel and distributed computing are both computing
paradigms where multiple computer systems work on a single
problem. In distributed computing each node has separate local
memory and processors. The nodes communicate with each
other over a network, usually the internet. Each node works on a
small part of the whole problem. But in parallel computing, a
system has multiple processors that are connected together
using a shared memory pool. The system breaks the larger
problem down into small parts, then breaks those parts into
individual instructions that are executed on different
processors.
3(c)
3(d)
Binary Subtraction using 2's Complement - YouTube
4(a)
A hard disk consists of one or more circular plates coated with a thin
magnetic layer. These plate (s) are attached concentrically on a
rotating hub or shaft and always rotate with a constant speed
around its own axis. The circular plates are divided into tracks,
which are distributed as equidistant concentric circles. Each track
contains a constant number of sectors, which divides each track into
equal sections. A sector contains at least 512 bytes. This size is the
smallest unit of disk access; as a result, at least an entire sector
must be read or written. But modern hard drives use 4KB physical
sectors.
a SSD consists of semiconductor memory building blocks, it contains
no mechanical parts. The smallest unit of an SSD is a page, which is
composed of several memory cells. Several pages on the SSD are
summarized to a block. A block is the smallest unit of access on a
SSD. Currently, the physical block size for modern flash memory is
4096 bytes.
A file system defines how files are named, stored, and retrieved
from a storage device. This can be compared to a library's
cataloging system. The catalog contains the names of all books
stored in the library and employs various techniques to sort these
books into categories. It records the entry and borrowing of
different books over time. In the same way a logical file system
stores references to every file stored on the physical storage, divides
storage into partitions for easier management, logs and facilitates
the creation and deletion of files.
4(b)
Step - 1: Start
Step - 2: Initialise an array ‘digits’
Step - 3: Let, place = 0 , D = the decimal number to be converted
and B = Base of the target number system.
Step - 4: Let Digit[place] = D mod B.
Step - 5: Let D = D div B
Step - 5: Let place = place + 1
Step - 6: if D > 0, Go to Step 3
If D == 0, Continue.
Step - 7: Reverse the array ‘digits’
Step - 8: Print the array ‘digits’
4(c)
The following are some reasons why developers use IDEs:
4(d)
Compiler is the software that translates the program written in a
high-level language to machine language. The program written in
high-level language is referred to as the source code and compiled
program is referred to as the object code. When creating a program,
the compiler takes the human readable code and then converts it
into object code. This object code is written in assembly code. The
compiler performs various checks and optimization during this
process. The object code is then passed onto the Assembler, which
takes the object code and turns it into machine code. The assembler
assigns memory to the variables and instructions in the code.
Machine code created by the assembler is platform dependent and
code from one architecture does not work on another. Since a
project may contain multiple different modules and libraries, all of
them are converted to object code using the process above and then
sent to the linker. The linker takes all the modules and resolves
references between them and assigns absolute memory locations to
everything, The linker then produces a binary executable that can be
run on the target computer or architecture.