EmbLogic's Blog

process

difference between systemd & init?

Posted in Uncategorized | Leave a comment

Parallel Port Device Driver Status(Nibble & Byte mode)

Before writing to the port i m setting the value of Control register by setting the its 5th bit at LOGIC 1. and after performing write operation i am checking the status of control register… I am surprised as the status of Control register is always incrementing as I incrementing the value from user side(eg. A, B, C…etc) …..

?????????????

Posted in Device Drivers, Parallel Port Driver | Leave a comment

Problem in Assignment of structure:-Question no. 1

Why this shows error in this question?But it shows the result.

1   #include<stdio.h>
2  struct student
3 {
4         int id;
5         char *name;
6         float percentage;
7 }student1,student2,student3;
8
9               int main()
10            {
11                      struct student st;
12                      student1.id=1;
13                      student2.name=”Angelina”;
14                      student3.percentage=90.5;
15                  printf(“Id is :%d \n”,student1.id);
16                  printf(“Name is :%s \n”,student2.name);
17                  printf(“Percentage is :%f\n”,student3.percentage);
18         getc();
19         return 0;
20 }

assstr1.c:20:2: error: too few arguments to function ‘_IO_getc’
/usr/include/libio.h:462:12: note: declared here
make: *** [assstr1] Error 1

Posted in Uncategorized | Leave a comment

issue in shell scripting

what are the two types of files used by the shells to initialise itself???

Posted in Uncategorized | Leave a comment

Fork() and Standard Out

Here is the code snippet of a prog

************** START **********************
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>

int glob_var = 100;

int main(void)
{
int var;
pid_t pid;

var = 200;

printf(“++Before Fork()\n”);

if((pid = fork()) < 0) {
perror(“fork error”);
} else if (pid == 0) {
glob_var++;
var++;
printf(“Within Child = > pid: %d <> Parent pid => %d\n”, getpid(), getppid());
} else {
var–;
glob_var–;
}
printf(“pid = %d, glob_var = %d, var = %d\n”,getpid(), glob_var, var);
exit(0);
}

************** END *******************

and here is the output

******************** OUTPUT START ****************

sudipto$ gcc -Wall -g fork01.c -o fork01
sudipto$ ./fork01
++Before Fork()
pid = 4718, glob_var = 99, var = 199
Within Child = > pid: 4719 <> Parent pid => 4718
pid = 4719, glob_var = 101, var = 201
sudipto$ ./fork01 > temp.out
sudipto$ cat temp.out
++Before Fork()
pid = 4720, glob_var = 99, var = 199
++Before Fork()
Within Child = > pid: 4721 <> Parent pid => 4720
pid = 4721, glob_var = 101, var = 201
sudipto$

******************** OUTPUT END ************************

Question: Why is “++Before Fork()” being printed twice when I read from file? Am i missing something here. Thanks!

Posted in Linux Internals and System Programming | Leave a comment

What is the difference between Dynamic Loading and Dynamic Linking..?

Can any one help in solving this confusion between dynamic loading and dynamic linking. These terms are purely related with .so files I think but I am not getting the exact difference. Any guidance…??

Thank you

Posted in Data Structures with C | 5 Comments

E10 ..pointer to siddarth sir

practise of pointers is done.

Posted in Uncategorized | Leave a comment

Pointers to Siddarth sir:E10

Implementation of pointers done today.Examples using pointers were applied and compiled.

 

Posted in Uncategorized | Leave a comment

Parallel Port : compatibility mode

LED’s are glowing in proper manner.

Assignment 1 and 2 complete.

Posted in Uncategorized | Leave a comment

Parallel Port Device Driver Status:- Compatibility Mode

LED’s Are glowing properly with the user pattern…….

Posted in Device Drivers, Parallel Port Driver | Leave a comment

Information: Regarding Signal Number 32 and 33

Signal              Number           Default Action                  Remarks

SIGWAITING        32                    Ignore        Cocurrancy signal used by threads library

SIGLWP             33                     Ignore        Inter LWP signal used by thread library

Where LWP: light weight process

For further information you can access man pages by giving the command

man 7 signal

Posted in Data Structures with C, Linux Internals and System Programming | Leave a comment

implemented fork

gdeveng sir…implemented fork(),simultaneous fork and wait…right nw working on multiple fork.

Posted in Uncategorized | Tagged | Leave a comment

Parallel Port driver : Vishnu

Messege from vishnu: Led’s are glowing and assignment 1 & 2 completed.

Posted in Uncategorized | Leave a comment

Parallel port driver

LED’s are glowing in right way as the data on the data lines.

 

Posted in Uncategorized | Leave a comment

Parallel Port Device Driver |Compatibility Mode

Successfully Implemented the Compatibility mode(IEEE 1284-1994) On LED 8 array.

Posted in Character Driver, Parallel Port Driver | Tagged | Leave a comment