Interview Question


Country: India




Comment hidden because of low score. Click to expand.
3
of 3 vote

statically and dynamically(Run time)
statically means :

first=MKDEV(int major, int minor);
then
u can use the return type of MKDEV that is first in this function

int register_chrdev_region(dev_t first, unsigned int count,
char *name);

dynamic means :in run time u need to create device file there u need to enter
eg mknod /dev/filename typeofdevice majornumber minornumber

- Kamal January 06, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Not sure what this question means. Can you be a bit more descriptive?

- zortlord January 05, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hey mayurnandurkar,

Are you talking about endianness (big-endian/little-endian)?

-Rachit

- Rachit January 06, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

no. thats regarding linux device driver.

- mayur_nandurkar January 06, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

when u know the major number and minor number u will use statically when u dnt know which major number and minor number u will use u will use dynamically

- Anonymous January 06, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Its from Drivers perspective. How we can assign Major no & minor no to any device.
kamal, which one should we prefer, static or dynamic.?

- Anonymous January 06, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

One of the ways is to use mknod -m666 followed by device name on /dev c MAJOR MINOR

- bhaumikbhatt March 07, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

there are two ways to assign a major and minor number to device.
1)statically
2)dynamically
statically:register_chrdev_region(dev_t first, unsigned int count,
char *name); it is a kernel call it is responsible for allocating device number statically.
-> it accept three arguments 1.device number.
->integer value it is your driver supported to number of devices.
->driver name.
2)dynamically:alloc_chrdev_region(); it is responsible for allocatting
device numder dynamically,means this call says to kernel to allocate freelly avilable major number.

- ch.suresh June 27, 2016 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More