Вы находитесь на странице: 1из 5

MKN 1043

SISTEM OPERASI KOMPUTER

JENIS TUGASAN :

INDIVIDU

TAJUK :

TUTORIAL 3

DISEDIAKAN OLEH:

MUHAMMAD ADHA AQIL BIN KHAION

NO. MATRIK:

E20171018843

NAMA PENSYARAH :

ENCIK AMRI BIN YUSOFF

Diploma Sains Komputer (Komputeran Internet)


Semester 1 (Sesi 2017/2018)
Fakulti Seni,Komputeran dan Industri Kreatif
Tutorial 3

1. process which is able to create another process is known as

____Multitasking_______________.

2. In what situation parent process may terminate execution of children processes?

The child has exceeded its usage of some of the resources that it has been allocated.

(To determine whether this has occurred, the parent must have a mechanism to inspect

the state of its children.)


The task assigned to the child is no longer required.
The parent is exiting, and the operating system does not allow a child to continue if

its parent terminates.

3. In a computer, there are two ways a process may appear either independent or

cooperating. What is the difference between independent and cooperating process.


Independent
If it cannot affect or be affected by the other processes executing in the system. Any

process that does not share data with any other process is independent

Cooperating process
if it can affect or be affected by the other processes executing in the system. Clearly,

any process that shares data with other processes is a cooperating process.

4. What are the advantages of cooperating processes?


The advantages of cooperating system process is cooperating processes require an

interprocess communication (IPC) mechanism that will allow them to exchange data

and information. There are two fundamental models of interprocess communication

:shared memory and message passing. In the shared-memory model, a region of


memory that is shared by cooperating processes is established. Processes can then

exchange information by reading and writing data to the shared region. In the

message-passing model, communication takes place by means of messages exchanged

between the cooperating processes

5. What is interprocess communication (IPC)?


Inter-process communication (IPC) is a mechanism that allows the exchange of data

between processes. By providing a user with a set of programming interfaces, IPC

helps a programmer organize the activities among different processes. IPC allows one

application to control another application, thereby enabling data sharing without

interference.

IPC enables data communication by allowing processes to use segments, semaphores,

and other methods to share memory and information. IPC facilitates efficient message

transfer between processes. The idea of IPC is based on Task Control Architecture

(TCA). It is a flexible technique that can send and receive variable length arrays, data

structures, and lists. It has the capability of using publish/subscribe and client/server

data-transfer paradigms while supporting a wide range of operating systems and

languages.

6. State two models of IPC?


Message-passing model: In this, the communicating processes exchange messages

with one another to transfer information. Messages can be exchanged between the

processes either directly or indirectly through a common mail box. Message passing is

useful for exchanging smaller amounts of data, because no conflicts need be avoided.

It is also easier to implement than is shared memory for inter computer

communication. But the main disadvantage is it can handle only small amounts of

data.

Shared-Memory model : In this, processes use shared memory creates and shared

memory attaches system calls to create and gain access to regions of memory owned

by other processes. Two or more processes can exchange information by reading and

writing data in the shared areas. Shared memory allows maximum speed and

convenience of communication, since it can be done at memory speeds when it takes

place within a computer Problems exist, however, in the areas of protection and

synchronization between the processes sharing memory.

7. Shared memory allows two or more processes to exchange information by reading

and writing data in the shared memory. Explain how cooperating process is

implemented in shared memory with bounded buffer.


The unbounded buffer places no practical limit on the size of the buffer. The

consumer may have to wait for new items, but the producer can always produce new

items. The bounded buffer assumes a xed buffer size. In this case, the consumer

must wait if the buffer is empty, and the producer must wait if the buffer is full.

8. Explain how cooperating process is implemented by using message passing?


Message passing provides a mechanism to allow processes to communicate and to

synchronize their actions without sharing the same address space. It is particularly useful

in a distributed environment, where the communicating processes may reside on different

computers connected by a network. For example, an Internet chat program could be

designed so that chat participants communicate with one another by exchanging

messages.

Вам также может понравиться