You are on page 1of 3

Sri Lanka Institute of Information Technology

MID term exam

R.M.S.S Rathnayake

IT19172774

MLB_WD_Y2S1_13.1

Secure operating systems IE2032


Question 1

1) Chmod u=rwx ,g=rx ,o=r myApp.c

2)

i) 4 process

ii) 9 printf statements

Question 2
1)

i) 2 threads

ii) 2 outputs; 0 & 1

III) The pthread join () function provides a basic process that allows a program to delay for a
thread to end. Instead, the program may opt to clean up services that the thread used after the
thread ends

iv) gcc -pthread myThreadApp.c -o MTApp

2)

i) 85

ii) parent

iii) The wait() function will interrupt execution of the calling thread until status information
exists for one of its stopped child processes, or until a signal is transmitted whose purpose is
either to run a signal-catching function or to stop the process.

question 3
3)In multiprogramming I/O and CPU activities are overlapped to increase data throughput and
efficiency of CPU utilization. This is achieved by context switching of process, using CPU and
Processers.

4) In operating systems scheduling is the act of maximizing of CPU utilization . This is carried out
by the CPU and the I/O components of the operating systems using a CPU scheduling.

5) when a,

 process switches from the running state to the ready state.


 process terminates.
 process switches from the waiting state to the ready state.
 process switches from the running state to the waiting state.
 real -time process execute

You might also like