日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

2 solaris基礎(chǔ)和常用知識( 六 )


/tmp , /tmp最多 500M即可 。然后在 / 上面建立/usr , /opt 和/export/home 。
現(xiàn)在補救的辦法是利用軟link的辦法:首先將一些在/或/usr中不太是系統(tǒng)直接
使用的目錄(一定不可以包含/usr/sbin,/sbin, /etc,等等)轉(zhuǎn)移到有空間的分
區(qū)上面 , 然后使用ln建立軟連接 。關(guān)于ln的使用可以man.這種辦法是不得已而
為之 。不是很好把握 , 搞不好就會死機(jī) , 并且啟動不起來 。所以在進(jìn)行此項活
動時 , 首先要備份數(shù)據(jù) , 以免發(fā)生以上情況時丟失 。如果您在下午下班的時間
可以抽出一點時間 , 最好還是將系統(tǒng)重新安裝一遍的好 。因為 , 每一個目錄都
有一定的用意 , 一些軟件的安裝不是地方會讓人感到很別扭 。而使用軟連接又
會降低系統(tǒng)的運行速度 。

93 Q: 求助--請教一個多線程編程問題 。關(guān)于我們發(fā)現(xiàn)的問題具體現(xiàn)象如下:
函數(shù) void* A(void *pInput)
{
char szBuf[30000]; //this buffer maybe larger than 30,000
...
...
}
在多線程程序中 , 該函數(shù)在main中運行(此時相當(dāng)于在主線程中運行)正常 。
如果使用pthread_create創(chuàng)建一個線程 , 以A作為線程入口函數(shù) , 用內(nèi)存測試工
具purify可以觀察到該線程運行過程中出現(xiàn)Beyond Stack Read、Beyond Stack
Write錯誤 。如果把szBuf改為堆中分配的內(nèi)存 , 則無此問題 。據(jù)此 , 我們判斷
是線程的??臻g溢出造成該問題 。按資料描述 , 主線程的缺省棧空間大小為8M
, 子線程缺省棧空間為2M;我們使用pthread_attr_setstack函數(shù)將子線程的棧
空間設(shè)置為8M , 但仍未解決問題 。后又將線程屬 性設(shè)置為
PTHREAD_SCOPE_SYSTEM , 問題仍然存在 。函數(shù)A以靜態(tài)庫方式由第三方提供 ,
我們現(xiàn)需要使之在一個子線程中運行 , 因此希望能夠提供主線程與子線程差異
的資料 , 除堆??臻g、調(diào)度方式外 , 是否還有其他差別 , 造成以上錯誤的發(fā)生
A: In fact, there is no problem in the program. I think there is a bug
in their debug tool: purify. You can use dbx to debug your program.

94 Q: 請問一塊硬盤上可以有兩個Solaris分區(qū)嗎?在一塊硬盤上分了兩個solaris分
區(qū) , 一個是active的系統(tǒng)安裝分區(qū) , 另一個是后來用fdisk創(chuàng)建的 , 請問怎樣把
第二個分區(qū)加入到solaris系統(tǒng)中使用 。謝謝 。
A: Yes, There can be up to six partitions in a disk. you can see the
partition using utility format. Command list:
#format
Then you will see the disks installed in you system.then select the
disks you are interested in. then print "partition" and then "print"
to see the partition information. The partition you want to add to
the system can be identified as c#t#d#s#. Make sure the mount point(
a empty Directory in file system). such as /disk1.then run the
command:
#mount /dev/dsk/c#t#d#s# /disk1

run the command
#df -k
to verify the slice(partition) is properly installed.

95 Q: 請問在Solaris 2.7上,可以動態(tài)改變分區(qū)大小嗎? 我的工作站劃分分區(qū)不合理,
根分區(qū)太小,已經(jīng)滿了,可以使用工具動態(tài)改變嗎?
A: No, If you want to modify it, the whole disk data will be lost.
In fact, I think it high time for you to re-instal the solaris
system. In the new installation. You really need just two partitions
swap and root. Leave no more than 1G to swap partition and all the
left to root.Don"t forget to backup all you data before re-installation.

96 Q: 用CC編譯器如何實現(xiàn)結(jié)構(gòu)成員按字節(jié)對齊 , 類似于其他編譯器的#pragma pack(1)
功能 。
A: It is a standard compilation option(#pragma pack). It is also
supported in Solaris C.You can get documents about SC options from
http://sunlibray under workshop directory.

97 Q: 為什么SUN的本地界面有時候會出現(xiàn)死掉的情況 , 此時kill掉用戶的dtsession

推薦閱讀