Linux Flashcards

1
Q

Linux process

A

Defined via struct task_struct

These structs are held in a circular doubly linked list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two interfaces by which a process can execute in kernel space

A

System call

Exception handlers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

process creation

A

Two phased …fork followed by exec

Copy on write mechanism…on fork only parents page tables are duplicated and create a process descriptir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Difference between process and thread

A

Linux doesn’t have differentiation like windows and solaris
Threads are process that shared resources

How to create thread
Clone(vm|fs|files|sighand,0)

How to create a process
Clone(sighand,0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

System calls

A

Identified by a number
Users invoke using software interrupt or expection. On x86 it is interrupt no 128
System call number is given in eax register
To pass parameters registers ebx ecx edx esi edi are used
Return value in eax register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly