EmbLogic's Blog

c assignments

Done uptil arrays …doubt in recursion

Posted in Uncategorized | Leave a comment

Avtar Singh C & c++ assignment status

I have completed 8 assignments with some doubts on floating point numbers and working on 9th assignment.

some problems are comming in 9th assignment.

Also done 1 assignment of c++.

Posted in Uncategorized | Tagged | Leave a comment

Daily report of Project 5 Character Driver

RCS file: driver3.c,v
Working file: driver3.c
head: 1.16
branch:
locks: strict
root: 1.16
access list:
symbolic names:
keyword substitution: kv
total revisions: 16; selected revisions: 16
description:
Here we have implemented completion
We have introduced two completion variables
With the help of flag we have implemented it
It is running accurate for 10 multi-threaded app
—————————-
revision 1.16 locked by: root;
date: 2013/08/08 13:14:03; author: root; state: Exp; lines: +53 -7
Firstly we have initialised init_timer function in hello_init function
expires value we have given is J + HZ
we have made one function timer_f in which we have called system call in_interrupt and in_atomic
Now main thing is that we have added kernel timer in write and read function both
in_interrupt returns 256
in_atomic returns 1
some discussion is required on these values
At the end we have called del_timer function in clean_up function
—————————-
revision 1.15
date: 2013/08/06 07:22:42; author: root; state: Exp; lines: +13 -5
Now here we have implemented rdtscl function to measure jiffie_64 counter value
we have implemented in write function ad found out the counter differnce
—————————-
revision 1.14
date: 2013/08/06 06:27:57; author: root; state: Exp; lines: +8 -1
Now used time_after_eq
time_before
time_before_eq functions
—————————-
revision 1.13
date: 2013/08/06 06:17:26; author: root; state: Exp; lines: +16 -3
Now here we have calculated current jiffies value at the start and end of write function and compare with the help of time_after function
—————————-
revision 1.12
date: 2013/08/06 05:51:10; author: root; state: Exp; lines: +69 -11
Now here we have calculated jiffies current value and HZ value in hello_init function
Also we have converted jiffies value int microseconds, millisecond, nanosecond, seconds with the help fo function jiffies_to_timespec and jiffies_to_timeval
—————————-
revision 1.11
date: 2013/08/01 13:03:44; author: root; state: Exp; lines: +8 -0
Here we have checked one capability condition in __getuser function
—————————-
revision 1.10
date: 2013/08/01 11:47:22; author: root; state: Exp; lines: +19 -2
Now in again ioctl function we have used __put user functio
function
—————————-
revision 1.9
date: 2013/08/01 09:52:21; author: root; state: Exp; lines: +42 -0
Firstly, we have define a function ioctl
In that function we have used switch statement and used __get user function for both SQSET and SQUANTUM function
Now here we observe that user app change the value of qset_size as well as quantum_size
Further changes are noticable at IO i.e.read and write function
—————————-
revision 1.8
date: 2013/07/30 07:15:13; author: root; state: Exp; lines: +1 -0
Now here we have declared one buffer in read_proc function
Then we point buff address to start which points to page
Refer figure on notebook for understanding
—————————-
revision 1.7
date: 2013/07/30 07:03:02; author: root; state: Exp; lines: +14 -4
Now here we have again made some changes
Now we have called remove_proc_entry function in release function
Rather calling on cleanup function
Because it will remove only one entry as clean up function executes once
—————————-
revision 1.6
date: 2013/07/30 06:26:23; author: root; state: Exp; lines: +7 -5
Now here we have made some changes
Rather calling create_proc_entry function in init function we have called in open function
So that this
Function called no of times as no of apps called/executes.
—————————-
revision 1.5
date: 2013/07/29 12:57:51; author: root; state: Exp; lines: +2 -2
Also we have removed our entry from proc filesystem by calling function hello_exit
Function is remove_proc_entry
—————————-
revision 1.4
date: 2013/07/29 12:52:03; author: root; state: Exp; lines: +29 -14
Here we have defined create_proc_read_entry function after kmalloc
Also we have defined read_proc function
We have created an entry in /proc file system with the name of napp1
—————————-
revision 1.3
date: 2013/07/29 09:28:44; author: root; state: Exp; lines: +20 -12
Here we have implemented spinlock
But we have found that as this system is having 2 cores. Therefore, it is capable of handling 1 multithreaded app
Now i will run this code on i5 laptop and observe the result
—————————-
revision 1.2
date: 2013/07/28 11:22:47; author: root; state: Exp; lines: +23 -8
Here we have implemented wait queues
We have taken two wait queues variable
We have implemented this problem with the help of flags
This is running correct for 10 multi threaded apps
—————————-
revision 1.1
date: 2013/07/28 08:49:34; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: header.h,v
Working file: header.h
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
Here we have given header file for Completion
Also we have declared two completion variable in sculldev structure
—————————-
revision 1.8 locked by: root;
date: 2013/08/08 13:11:35; author: root; state: Exp; lines: +4 -1
Here we have added two header files in order to implement kernel timers
linux/timer.h
linux/hardirq.h
And we have initialised struct timer_list in struct scull_dev
—————————-
revision 1.7
date: 2013/08/06 07:25:34; author: root; state: Exp; lines: +1 -0
Included header file defined at user space i.e. asm/msr.h
—————————-
revision 1.6
date: 2013/08/06 05:49:14; author: root; state: Exp; lines: +5 -0
We have added two header files for Measuring time lapses
jiffies.h and time.h
—————————-
revision 1.5
date: 2013/08/01 12:07:17; author: root; state: Exp; lines: +5 -1
Here we have added header files for ioclt operation
And initialised ioctl function in struct file operations
—————————-
revision 1.4
date: 2013/07/29 12:55:37; author: root; state: Exp; lines: +1 -0
Here we have added haeder file for proc
—————————-
revision 1.3
date: 2013/07/29 09:30:38; author: root; state: Exp; lines: +2 -0
Here we have added header file for spinlock
Also we have declared spinlock variable in struct scull_dev
—————————-
revision 1.2
date: 2013/07/28 11:21:38; author: root; state: Exp; lines: +3 -0
Now here we have given header file for wait queue
Also we have declared wait queue variable in struct sculldev
—————————-
revision 1.1
date: 2013/07/28 08:52:06; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

*********CHAR DRIVER********

RCS file: lkm2.c,v
Working file: lkm2.c
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
today i am not able to solve the ioctl function problem.
related to set quantum, it will not execute properly and crash when i call this command.
—————————-
revision 1.5 locked by: root;
date: 2013/08/12 16:59:36; author: root; state: Exp; lines: +93 -36
Here I Implement the kernel timer ,firstly register it then declare a jitter function.
Then used that jitter function to use in_interrupt and in_atomic function.
—————————-
revision 1.4
date: 2013/08/02 22:27:03; author: root; state: Exp; lines: +17 -14
Implement the jiffies_)to_timeval and jiffies_to_timespec funtion to convert the jiffies into second,microsecond and nanosecond.
done it successfull.
—————————-
revision 1.3
date: 2013/08/02 02:18:16; author: root; state: Exp; lines: +48 -6
Implement timer into the driver just check it that how much time is being taken by read/writr operation to perform the task.
but when i used to convert the jiffies into human readable time then it crashed the kernel.
—————————-
revision 1.2
date: 2013/08/01 18:26:08; author: root; state: Exp; lines: +9 -9
Implement the ioctl by using set quantum , set qset.
—————————-
revision 1.1
date: 2013/08/01 01:26:39; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

C assignment status

I have completed 4 assignments.

Posted in Uncategorized | Leave a comment

c assignment

Completed 4 assignment

Posted in Uncategorized | Leave a comment

30.1.30 : Monika

Completed first 6 assignments in C with doubt in some questions and the most difficult which i felt is low-level file i/o in which how do we create a file of a fixed size? Is it related to page size?

Also trying now those assignments with C++..

Posted in Uncategorized | Leave a comment

ashish saggar

completed 4assignments with 1 qes left and assignment no 7

 

Posted in Uncategorized | Leave a comment

Kushal Chugh

Completed first 4 C – Assignments with 2 problems left..

Posted in Uncategorized | Leave a comment

E30.01.30 (Character Driver)

implemented busywait delay and processor yielding delay…
—————————-
revision 1.17 locked by: emblogic;
date: 2013/08/07 13:00:03; author: emblogic; state: Exp; lines: +161 -17
implemented delay using busywait method (using cpu_relax).
implemented a delay using processor yielding method(using schedule()).
working on wait_event’s.
—————————-

Posted in Character Driver, Device Drivers | Tagged | Leave a comment

C Assignment Status:

I’ve completed 8 c assignments.And working on next ones.

Posted in Data Structures with C | Leave a comment

C assignments status

completed first 4 assignments, presently working on left over questions in strings and pointers

Posted in Uncategorized | Leave a comment

Charecter Driver logfile

revision 1.33 locked by: sampath;
date: 2013/08/07 12:03:17; author: sampath; state: Exp; lines: +120 -12
Timers Implementation
calculted number of jiffies for char driver operation, used macro time_after to compare jiffie values
converted jiffies to seconds and nanoseconds using jiffies_to_timespec
calculated TSC(cycles since reset) using rdtscl and caculated number of cycles for the char drive operation, also tested using get_cycles
Implemented wallclock time using do_gettimeofday and time_to_tm, created a proc entry by name cureenttime
Implemented a /proc entry for incorporating delay using cpu_relax and schedule by names jitbusy and jitsched respectively
—————————-

Posted in Character Driver, Uncategorized | Tagged | Leave a comment

30.01.30

Implemented busy waiting and scheduling…. I am facing problem in timeout, unable to come out of wait_event_timeout…..

Posted in Character Driver, Device Drivers | Leave a comment

C Assignment Status

Completed 43 question of c assignment.

Posted in Uncategorized | Leave a comment