Skip to main content

SUN Microsystem Interview

5.In matrix manupilation, Shall we use process and thread ?


Well,consider the two matrices mat1 and mat2 are read-only; the result matrix is written to, but each of the threads only writes to a specific part of the array which is used to store the resulting column which that thread is working on. There is never any conflict.

6.What is difference between task and process?

Task: A single execution program.
Process: A process (in somewhat simplistic terms) is one instance of a running program on a system.

7. What is difference between task and thread?
A single thread also has a beginning, a sequence, and an end. At any given time during the runtime of the thread, there is a single point of execution.

8. what is internal implementation of fork() system call?


The fork() function shall create a new process. The new process (child process) shall be an exact copy of
the calling process (parent process) except as detailed below:

The child process shall have a unique process ID.

The child process ID also shall not match any active process group ID.

The child process shall have a different parent process ID, which shall be the process ID of the calling


Upon successful completion, fork() shall return 0 to the child process and shall return the process ID
of the child process to the parent process. Both processes shall continue to execute from the fork()
function. Otherwise, -1 shall be returned to the parent process, no child process shall be created,
and errno shall be set to indicate the error.


The fork() function shall fail if:

The system lacked the necessary resources to create another process, or the system-imposed limit on the
total number of processes under execution system-wide or by a single user {CHILD_MAX} would be exceeded.

The fork() function may fail if:

Insufficient storage space is available.

9. what is internal implementation of gdb debugger ?

A general defn:

GDB is a debugger which is part of the Free Software Foundation's GNU operating system. Its original author is Richard M. Stallman (affectionately known as "RMS")

GDB can be used to debug C, C++, Objective-C, Fortran, Java and assembly programs. There is partial support for Modula-2 and Pascal. It'll run on almost any architecture you can think of that supports Unix, so learning GDB on your home PC will give you the power to debug code just about anywhere Unix can
Post a Comment

Popular posts from this blog

Compact and Repair an Access Database. Add Ref. to : AdoDb, Jro

< ?xml version="1.0" encoding="utf-8" ?>

using ADODB;
using JRO;
using System.Configuration;
using System.Data.OleDb;
using System.IO;

public class CompactAndRepairAccessDb : System.Windows.Forms.Form
private System.ComponentModel.Container components = null;
private JRO.JetEngine jro;
private System.Windows.Forms.Button btnConfirm;
private System.Windows.Forms.TextBox tbxOriginalDbSize;
private System.Windows.Forms.TextBox tbxCompactedDbSize;
private OleDbConnection cnn;

public CompactAndRepairAccessDb() {

FileInfo fi = new FileInfo( ConfigurationSettings.AppSettings["PathOriginal"] );
int s = Convert.ToInt32( fi.Length/1000 );
this.tbxOriginalDbSize.Text = s.ToString() + " kb";

private void btnConfirm_Click(object sender, System.EventArgs e) {
// First close all instances of the database

VBScript to Automate login into gmail

Dim IE
Dim crtScreen
Set IE = CreateObject("InternetExplorer.Application")
USERNAME = "saudaziz"

With IE
.navigate ""
End With

'wait a while until IE as finished to load
Do while IE.busy
set WshShell = WScript.CreateObject("WScript.Shell")
Do While UCase(IE.Document.readyState) <> "COMPLETE"
WScript.Sleep 100
set WshShell=nothing
IE.document.all.Item("Email").value = USERNAME
IE.document.all.Item("pASSWD").value =pASSWORD
Set IE = Nothing