Net Programmming
Net Programmming
CAT
Synchronous APIs:
If an API call is synchronous, it means that code execution will block (or wait) for the
API call to return before continuing. This means that until a response is returned by the
API, your application will not execute any further. Its kind of performance issue in your
app.
Asynchronous APIs:
Asynchronous calls do not block (or wait) for the API call to return from the server.
Execution continues on in your program, and when the call returns from the server, a
“callback” function is executed.
3. Model-driven programmability inherits the power of models. There are two types of
Yet Another Next Generation YANG models, open and native. Discuss the two types
of Yet Another Next Generation (YANG) models (5 marks)
Openconfig modes are developed by vendors and designed to intergrate to features or
configurations that are relevant only to that platform. While native are developed by the
vendors.
i) Fork ()
Processes use this system call to create processes that are a copy of themselves. With the help
of this system Call parent process creates a child process, and the execution of the parent
process will be suspended till the child process executes.
ii) Mkdir ()
The mkdir() function creates a new directory named by the path name pointed to by path
iii) chdir ()
is a system function (system call) which is used to change the current working directory
iv) lseek ()
is a system call that is used to change the location of the read/write pointer of a file
descriptor
5. Within the context of how user processes communicate with the operating
system, differentiate between a system call and a signal ( 5 marks
system call is the interface that kernel provide to outside , they are the rendezvous point
between user space and kernel space. It's how normal, user-level code traps into kernel
space when something a little more complex needs to be made - reading from a device,
writing to a device, changing a hardware configuration, sending network packets, you
name it. while signal is a mechanism to let process receive info from kernel or other
process, signals are an independent and different communication mechanism. Signals are
used by the kernel to asynchronously notify user processes of various events (in some
cases, I/O available, or an invalid memory access attempt, or an illegal instruction, etc.),
but they are also used between processes: if you have the correct permissions, you can
send a signal from a user-space process to another user-space process.
6. Define inter process communication (IPC) and hence discuss one known application
of IPC (5 marks)
Interprocess communication (IPC) is used for programs to communicate data to each
other and to synchronize their activities. Semaphores, shared memory, and internal
message queues are common methods of interprocess communication.
is used for exchanging data between multiple threads in one or more processes or
programs. The Processes may be running on single or multiple computers connected by a
network. The full form of IPC is Inter-process communication.
It is a set of programming interface which allow a programmer to coordinate activities
among various program processes which can run concurrently in an operating system.
This allows a specific program to handle many user requests at the same time.