[理工] 101交大OS數題
嗯...被101交大OS慘電所以來問問題了
1.A mutex lock is a special semaphore whose value ranges only between 0 and 1.
(第1題)
這句是對的
但是我覺得不一定啊
counting semaphore應該不限定只能這兩個值吧
2.To flexibly utilize memory,the memories of user and kernel processes are all
allocated through the general paging and virtual memory interface.
(第4題)
直覺告訴我這是錯的
但確切不知道該怎麼改才好
3.When inserting our ATM card into an ATM machine,we will be requested to enter
a 4-digit personal identification number for up to three times.If a person lost
his ATM card,what is the chance that the thief can withdraw money from his
account?
(第10題)
答案是3/1000
不知道怎麼算出來的
4.Currently,the Unix kernel implements a method to avoid deadlock problems with
kernel data structures from occuring in the kernel.
(第11題)
想問這個錯在哪
5.The following program is vulnerable to buffer-overflow arrack:
#include <stdio.h>
int main(int argc,char *argv[])
{
char buffer[256];
if(argc < 2)
return -1;
else{
strcpy(buffer,argv[1]);
return 0;
}
}
(第17題)
想問一下
是argv[1]給太長
buffer就會塞不下的關係嗎
拜託大家了~
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.253.88.37
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1485942429.A.DD9.html
→
02/01 17:50, , 1F
02/01 17:50, 1F
→
02/01 17:50, , 2F
02/01 17:50, 2F
→
02/01 17:55, , 3F
02/01 17:55, 3F
→
02/01 17:55, , 4F
02/01 17:55, 4F
→
02/01 17:56, , 5F
02/01 17:56, 5F
→
02/01 17:59, , 6F
02/01 17:59, 6F
→
02/01 18:01, , 7F
02/01 18:01, 7F
→
02/01 18:02, , 8F
02/01 18:02, 8F
→
02/01 18:03, , 9F
02/01 18:03, 9F
→
02/01 18:03, , 10F
02/01 18:03, 10F
→
02/01 18:03, , 11F
02/01 18:03, 11F
→
02/01 18:04, , 12F
02/01 18:04, 12F
→
02/01 18:05, , 13F
02/01 18:05, 13F
→
02/01 18:05, , 14F
02/01 18:05, 14F
→
02/01 18:05, , 15F
02/01 18:05, 15F
→
02/01 18:05, , 16F
02/01 18:05, 16F
→
02/01 18:07, , 17F
02/01 18:07, 17F
→
02/01 18:07, , 18F
02/01 18:07, 18F
推
02/01 18:09, , 19F
02/01 18:09, 19F
→
02/01 18:09, , 20F
02/01 18:09, 20F
→
02/01 18:09, , 21F
02/01 18:09, 21F
→
02/01 18:10, , 22F
02/01 18:10, 22F
→
02/01 18:10, , 23F
02/01 18:10, 23F
→
02/01 18:10, , 24F
02/01 18:10, 24F
推
02/01 20:17, , 25F
02/01 20:17, 25F
→
02/01 20:18, , 26F
02/01 20:18, 26F
→
02/01 20:18, , 27F
02/01 20:18, 27F
→
02/01 20:59, , 28F
02/01 20:59, 28F
→
02/01 21:35, , 29F
02/01 21:35, 29F
→
02/01 21:35, , 30F
02/01 21:35, 30F
→
02/01 21:35, , 31F
02/01 21:35, 31F
→
02/01 22:04, , 32F
02/01 22:04, 32F
→
02/01 22:05, , 33F
02/01 22:05, 33F
→
02/01 22:05, , 34F
02/01 22:05, 34F
→
02/01 22:05, , 35F
02/01 22:05, 35F
→
02/01 22:06, , 36F
02/01 22:06, 36F
→
02/01 22:07, , 37F
02/01 22:07, 37F
→
02/01 22:07, , 38F
02/01 22:07, 38F
推
02/01 22:34, , 39F
02/01 22:34, 39F
→
02/01 22:45, , 40F
02/01 22:45, 40F