logo

csc2404 Assignment Questions Answers 2022

   

Added on  2022-09-27

9 Pages1901 Words17 Views
 | 
 | 
 | 
1
csc2404 Assignment 1
csc2404 Assignment Questions Answers 2022_1

2
Question 1
A “system call” is used by a process to request that the kernel perform a task on behalf of the
requesting process
Why is it necessary that the kernel perform tasks on behalf of processes? Why doesn’t the
process perform the tasks itself?
The operating system consists of two parts, kernel is one of them and kernel being
the core part of the operating system it has to work on task. It acts has an
intermediary between applications and the information that is being executed. The
kernel also ensures that there is little abstraction so that the various tasks can be
accomplished by the various applications involved. This is made an easy task by
the kernel through process intercommunication
The process does not perform the tasks by itself due to the following reasons.
The tasks cannot be executed by the process because they cannot act as
intermediaries between the various software and hardware devices
The process does not have the ability to communicate with each other in the first
place and so making it impossible for software applications to pass information to
the hardware devices
The details of the system call interface is hidden from the programmer as the operating
system supplies a library of standardized function calls4. Linux and macOS has over 300
such system functions.
Explain how these functions actually notify the kernel that a service is being requested of
it, and
A system call is when a program asks for an administration from the part of an
operating system it is being worked on. This is done when there is need for the
working system to cooperate with a certain framework given. The Application
Program Interface works with the system call to give administrations to programs. It
acts as a link between the process used and the existing framework to allow client
programs to ask for administrations.
explain the different methods used to:
identify the system call being requested, and
csc2404 Assignment Questions Answers 2022_2

3
Cat/usr/include/asm/unis td.h | less
Pass the data to the kernel that may be required by the system call.
A call gate is certain location used by an operating system in part of the memory to
a certain place known as the processor. When a processor gets the difference
between an address to a call it then diverts the specified area without bringing about
confusion
Which of the systems described here does Linux use?
The Linux operating system uses kernel thread
Using actual Linux system calls as examples, explain what sort of tasks an operating system
will perform on behalf of a process? (see the man pages intro(2), syscalls(2), and Section 2).
The functions operating system performs on behalf of a process include;
Linux Exec System Call - this system call is used in execution of a file residing in a
process that is active. A new file is executed when exec is called and the previous
executable file replaced. Generally, the exec system call is used to replace the old
program or file from the process with a new program or file. The exec() system call
is executed by the user data segment. The segment is then replaced with the data
file of the name provided during the calling of exec().
Fork System Call - this system call creates new processes which becomes the child
process. The parent process is the process that creates a new process and calls a fork
as well. Both are concurrently executed although they reside on different memory
spaces.
Stat System Call – this call checks the file status such as checking the time of
accessing the file. The file attributes are returned by the stat() system call (Fjeldstad
et al., 2012).
Question 2
Caches are an integral part of modern processor design. What is a Cache? What is its
purpose?
A cache is number of components that are often stored in an inaccessible place. It
is also a type of memory that can be used to boost the speed at which an
information can be accessed in a computer procedure.
csc2404 Assignment Questions Answers 2022_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents