Wednesday, June 29, 2005

Kernel info

^^

1. ^^ Where do I put kernel configuration?
1. /etc/system

2. ^^ 2. How do I add more PTYs?
1. Solaris 2.6 / 7
1. Do not attempt to do this with '/usr/bin/adb -k'.
2. Modify /etc/system
1. set pt_cnt=X
3. /usr/sbin/reboot -- -r
2. Solaris 8 / 9 / 10
1. Dynamically allocated.
2. Do not attempt to do this with '/usr/bin/mdb -k'.
3. Limit is forced by modifying /etc/system
1. set pt_cnt=X
4. /usr/sbin/reboot -- -r

3. ^^ What is shared memory?
1. Just as it sounds. Shared memory is an Interprocess
Communication (IPC) mechanism used by multiple processes to access
common memory segments.

4. ^^ How do I know the limits for shared memory kernel tunables?
1. Read /usr/include/sys/shm.h

5. ^^ What is a semaphore?
1. A non-negative integer that is incremented or decremented
relative to available resources.

6. ^^ How do I know the limits for semaphore kernel tunables?
1. Read /usr/include/sys/sem.h

7. ^^ What is a door?
1. A door is a file descriptor that describes a method for
interprocess communication between client and server threads.
2. A door file appears with file mode D---------.

8. ^^ add_drv(1m) fails with "add_drv/rem_drv currently busy; try later".
1. /usr/bin/rm /tmp/AdDrEm.lck

9. ^^ How do I increase the number of file descriptors available to
an application?
1. File descriptors are used for more than just open files,
they also provide the framework for socket i/o.
2. The kernel dynamically allocates resources for open files.
There is no maximum number of file descriptors per system.
3. Depending on the programming interface used, an
application may not be able to reach the file descriptor limit.
4. API limits (ref:Solaris Internals)
1. Solaris 2.6
1. stdio(3S) - 256
1. From stdio(3S); no more than 255 files
may be opened using fopen(), and only file descriptors 0 through 255
can be used in a stream.
2. select(3c) - 1024
1. From select(3c); The default value for
FD_SETSIZE (currently 1024) is larger than the default limit on the
number of open files. It is not possible to increase the size of the
fd_set data type when used with select().
2. Solaris 7 / 8 / 9 / 10
1. stdio(3s) - 256 (32-bit) / 65536 (64-bit)
2. select(3c) - 1024 (32-bit) / 65536 (64-bit)
1. 65536 limit is attainable on 32-bit Solaris 7
2. #define FD_SETSIZE 65536 ; prior to includes
5. System defaults
1. Solaris 2.6 / 7
1. rlim_fd_max 1024
2. rlim_fd_cur 64
2. Solaris 8
1. rlim_fd_max 1024
2. rlim_fd_cur 256
3. Solaris 9 / 10
1. rlim_fd_max 65536
2. rlim_fd_cur 256
6. Modify /etc/system
1. set rlim_fd_max=8192 ; hard limit (per process)
2. set rlim_fd_cur=1024 ; soft limit (per process)

10. ^^ What is a register window?
1. A register window is used by the operating system to store
the current local and in registers upon a system interupt, exception,
or trap instruction.
2. register windows are important to preserve the state of
the stack between function calls.

11. ^^ What is the default memory page size?
1. sun4u
1. 8192 bytes
2. sun4c/sun4m/sun4d
1. 4096 bytes

12. ^^ What is the current memory page size?
1. /usr/bin/pagesize

13. ^^ What kind of binaries can my kernel run?
1. /usr/bin/isainfo -v

14. ^^ What kind of kernel modules can my kernel run?
1. /usr/bin/isainfo -kv

0 Comments:

Post a Comment

<< Home