第二次作业
现企第二次作业及答案(1)

《现代企业管理方法》第二次作业一、单项选择题(每题给出4个选项,其中一个是正确的。
)1.最早给控制下定义的是( A ),他认为:在一个企业中,控制就是核实所发生的每一件事是否符合所规定的计划、所发布的指示以及所确定的原则。
A、法约尔B、泰罗C、孔茨D、韦伯2.控制的整体性特征是指(C )。
A、控制应能迅速适应外部环境的变化B、控制主要是对组织中人的控制C、控制是全体成员的工作,对象包括组织的各个方面D、控制不仅仅是监督,更重要的是指导、帮助以及员工的参与3.( D )存在的最大弊端是在实施矫正措施之前偏差已经发生了。
A、监督控制B、前馈控制C、现场控制D、反馈控制4.下列控制标准中,不属于货币控制标准的是( A )。
A、实物标准B、价值标准C、成本标准D、收益标准5.根据设计的生产能力确定机器的产出标准属于(B )。
A、统计标准B、经验标准C、定性标准D、工程标准6.科学管理之父泰罗首创的通过动作研究确定生产定额的方法是( B )的早期形式。
A、统计方法B、工业工程法C、经验估计法D、德尔非法7.在控制的过程中,( C )是控制的关键。
A、制定控制标准B、衡量工作绩效C、纠正偏差D、制定控制计划8.被许多公司称为“走动管理”的管理控制方法是(B )。
A、报告法B、现场观察法C、内部审计D、比率分析法9.在人力资源管理中,员工被认为是( D )。
A、企业重要的费用支出B、和机器一样的生产要素C、企业沉重的负担D、有价值的、难以模仿的资源10.需要工作分析人员亲自从事所要分析的工作,以获得第一手资料的工作分析法是(A )A、工作实践法B、观察法C、面谈法D、写实法11.在绘制技能管理图时,首次资料收集一般采用(C )A、实践法B、日志法C、问卷法D、观察法12.某企业预计明年的销售量会大幅增加,根据统计,以前的人均销售额为每人500件产品,年销售5000件,预计明年将达到年销售12000件,销售部门设两个管理层次,管理幅度为5人,那么销售部门总共需要( A )人员A、30B、24C、29D、2513.企业获得初级技术人员和管理人员的最重要的途径是( B )A、劳务市场招聘B、校园招聘C、猎头公司招聘D、再就业中心14.适合于挑选管理人员的甄选方法是( C )A、申请表B、工作抽样C、测评中心D、履历调查15.在开发分析能力、综合能力和评价能力时,( C )比较合适。
经济法概论第二次在线作业

经济法概论第二次在线作业经济法第二次在线作业—经济法基础一、单项选择题(每题2分,共32分)1.行政法规的制定部门是( D )。
A.省级、自治区、直辖市人民政府B.国务院直属机构C.全国人民代表大会D.国务院1、【正确答案】D【答案解析】本题考核经济法的渊源。
法规包括行政法规、地方性法规。
行政法规是由国务院制定的规范性文件。
2.下列规范性文件中,属于规章的是(D)。
A.深圳市人民代表大会制定的《深圳经济特区注册会计师条例》B.国务院制定的《中华人民共和国外汇管理条例》C.全国人民代表大会常务委员会制定的《中华人民共和国公司法》D.中国人民银行制定的《人民币银行结算账户管理办法》2、【正确答案】 D【答案解析】本题考核经济法的渊源。
本题考核规章的制定机关。
规章包括由国务院部委及具有行政管理职能的直属机构依据法律、行政法规制定的国务院部门规章,以及由省、自治区、直辖市和较大的市的人民政府根据法律、法规制定的地方政府规章,选项D属于部门规章的范围。
3.引起某一经济法律关系发生、变更或消灭的数个法律事实的总和,称为( D )。
A.法律依据B.法律后果C.法律事实D.事实构成3、【正确答案】D【答案解析】本题考核事实构成的概念。
一般而言,经济法律关系的发生、变更和消灭只需一个法律事实出现即可成立,但有的经济法律关系的发生、变更和消灭则需要两个以上的法律事实同时具备。
引起某一经济法律关系发生、变更或消灭的数个法律事实的总和,称为事实构成。
4.下列各项中,属于法律事实中事件范围的是( C )。
A.经营管理行为B.偷税行为C.洪水D.公司股票上市4、【正确答案】C【答案解析】本题考核事件的范围。
ABD选项均为行为,C选项属于绝对事件范围。
5.仲裁裁决作出后,当事人就同一纠纷,不能再申请仲裁或向法院起诉,这个体现的仲裁原则是( D )。
A.独立性原则B.自愿原则C.以事实为依据,以法律为准绳,公平合理解决纠纷原则D.一裁终局原则5、【正确答案】D【答案解析】本题考核仲裁的基本规定。
工程经济第二次作业

第四章三、计算题1. 某项目前五年的财务净现值为50万元,第6、7、8年年末净现金流量分别为40、 40、30万元,若基准收益率为8%,试求该项目在8年中形成的财务净现值。
解:75.114)08.01(30])08.01()08.01[(4050876=++++++=---FNPV2. 已知某拟建项目财务净现金流量如下表所示,该行业的基准投资回收期为8年,试年4.750018=+-=t P3. 某建设项目,当银行利率为i =10% 时, FNPV =200万元;当银行利率为i=12% 时,FNPV =-100万元。
用插值法求内部收益率。
解:%33.11%)10%12(100200200%10=--++=FIRR第五章1. 某建材厂准备生产一种新型建筑制品,由于缺乏资料,对此产品的市场需求 量只能估计成高、一般、差,而每种自然状态出现的概率无法预测。
工厂考虑了三种方案Q 1、Q 2和Q 3,其损益值如下表所示。
试判断该决策问题属于哪一类问题,并用大中取大、小中取大和平均概率法进行决策。
解:该决策属不确定型决策1)大中取大法:max (24,20,16)=24 选Q 12)小中取大法;max (10,15,16)=16 选Q 3 3)平均概率法:Q 1=1/3*(24+16+10)=16.7 Q 2=1/3*(20+20+15)=18.3Q 3=1/3*(16+16+16)=16 选Q 24..某企业引入一种新产品,寿命期均为5年,预测了销路有三种可能的自然状态及相应的概率。
每种状态又可能处于有竞争(概率为0.9)或无竞争(概率为0.1)的市场状态。
各资料如下表。
现面临设备选择,可选用Ⅰ设备或Ⅱ设备,投资额分别为200万元和10万元。
试用决策树法对设备选用进行决策。
当寿命期为多少年时,选Ⅰ设备有利?⑤=0.9×12+0.1×20=12.8⑥=0.9×(-20)+0.1×(-20)=-20②=0.6×73+0.2×12.8+0.2×(-20)=42.36净利润=5×42.36-200=11.8万元Ⅱ设备:⑦=11×0.9+30×0.1=12.9⑧=2×0.9+5×0.1=2.3⑨=-10③=0.6×12.9+0.2×2.3+0.2×(-10)=6.2净利润=6.2×5-10=21万元故应选Ⅱ设备为好。
第二次计分作业参考答案

江苏开放大学形成性考核作业学号姓名课程代码课程名称评阅教师第2次任务共4次任务江苏开放大学任务内容:(请将各题答案填在作答结果相应位置)专题讨论:规模经济:中国彩电行业的洗牌案例内容改革开放之后,国人的收入明显增加,冰箱、彩电、洗衣机替代自行车,缝纫机和收音机成为人们家庭建设上追求的新“三大件”。
当时的电视机是主要黑白的,后来彩电才进入了为数不多的家庭。
可无论是黑白电视还是彩色电视,由于日本的品牌质量出色,在市场上几乎占据了绝对的优势,人们茶余饭后津津乐道的是日立、东芝、索尼、JVC、三洋、松下等品牌。
当时中国的经济还处于极度的短缺当中,电视机在“票证时代”还是一种奢侈品,人们需要凭关系、走后门才能买到,如果哪个家庭拥有一台日本原装进口的14寸电视机是件令人羡慕的事。
1978年国家开始批准引进彩电生产线后,中国电视机行业开始迅猛发展。
据统计,到1985年,全国共引进了113条彩电装配生产线,几乎遍布于全国各省;彩电企业也遍地开花,到九十年代中期,全国的彩电企业超过了200家。
在这股迅猛发展的浪潮中,涌现出了长虹、TCL、康佳、创维、海尔等为国人所熟知的品牌。
1996年3月26日,长虹挑起行业内的第一次大规模价格战,电视机行业从此全面洗牌,据国家信息中心的统计,20世纪90年代中后期,有竞争力的彩电品牌尚有5、60个,价格战的冲击使得很多企业退出市场,高路华、乐华、嘉华、熊猫等品牌陆续消失;2006年,TCL、长虹、康佳、创维、海信、海尔和厦华等七大品牌占据了国内市场约75%的市场份额。
彩电业寡头垄断的市场结构特征越来越明显。
案例分析任何产业都有其适度的发展规模,而彩电业是一个规模经济性较为显著的产业。
二十世纪八十年代的迅猛发展使得中国电视机的产量大增,到1985年我国电视机年产量就超过美国,达到1663万台,成为仅次于日本的世界第二大电视机生产国。
1987年,我国电视机产量达到1934万台,一举超过日本,成为世界上最大的电视机生产国。
图论习题答案2

第四次作业
四(13).设M是二分图G的最大匹配,则 | M || X | max| S | | N ( S )| ,
SX
证明: | X | max| S | | N ( S )| min(| X | | S |) | N ( S )| ,而(X - S ) N ( S )是G的一个覆盖,则 min(| X | | S |) | N ( S )|是G的最小覆盖,
第七次作业
• 五(28).设sn是满足下列条件的最小整数,把 {1,2,...,sn}任划分成n个子集后,总有一个子集 中含有x+y=z的根,求s1,s2,s3是多少? • 解:n=1,枚举得s1=2; • s2=5 • s3=14
第七次作业
五(34).求证r(k, l) = r(l, k) 证明:若G含有K k 子图,则G c 含有k个顶点的独立集;若G含有 l个顶点的独立集,则G c 含有K l 子图。则命题成立。
五 (13).若 是单图 G 顶的最小次数,证明; 若 1则存在 1边着色, 使与每顶关联的边种有 1种颜色。 反证法:假设在 v1处无 i 0色 设 C (E 1 , E 2 ,..., E 1 )为 G 的( 1) 最佳边着色 第一步:构造点列: v1 , v 2 ,..., v h , v h 1 ,....., vl ,.... v1处无 i 0色, v j v j 1着 i j色,且在 v j点处 i j 色重复出现,可知在 v j1处仅一 个 i j色;证明如下: 用反证法证明,假设在 v j1处 i j色重复出现,将 v j v j 1改成 v j 所关联的边 没有的颜色 im,则可以对图 G 的找色进行改善。与 C 是最佳边着色矛盾, 假设不成立。 又 是单图 G 顶的最小次数,则必存 在最小整数 h使得 i h i l 第二步:着色调整: v j v j 1着 i j-1色 ( j 1,2,..., h ),所得新着色为 C ' 在 C '中, v1处多了个 i 0色, v h 1处少了个 i h 色,其他点的边着色数 不变, 所以 C ' 还是 1最佳边着色
经济学基础第二次形考作业

江苏开放大学形成性考核作业学号姓名所在教学点课程代码110139课程名称经济学基础评阅教师第二次任务共四次任务【第二次形成性考核】(理论教学)第一部分习题一、填空题(15*2=30分)1.在边际产量曲线与平均产量曲线相交前,边际产量高于平均产量;在相交后,边际产量低于平均产量;在相交时,平均产量达到最大。
2.如果生产者的货币成本增加,则等成本线向右平行移动;货币成本减少,则等成本线向左平行移动。
3.短期总成本曲线一条从原点出以,向右上方倾斜的曲线。
4.短期边际成本曲线与短期平均成本曲线相交于短期平均成本曲线的最低点,这个相交点被称为收支相抵点。
5.短期边际成本曲线与平均可变成本曲线相交于平均可变成本曲线的最低点,这个点被称为停止营业点。
6.在停止营业点上,价格只能弥补可变成本,这时所损失的是固定成本。
7.在经济分析中,利润最大化的原则是MR=MC 。
8.在完全竞争市场上,对整个行业来说,需求曲线是一条向右下方倾斜的曲线;对个别企业来说需求曲线是一条水平线。
9.在完全竞争市场上,企业短期均衡的条件是MR=MC且MR>A VC ,长期均衡的条件是P=MR=SMC=LMC=SAC=LAC=AR 。
10.垄断市场上短期均衡的条件是SMC=MR ,长期均衡的条件是LMC=SMC=MR 。
11.在垄断竞争市场上,短期均衡的条件是SMC=MR ,长期均衡的条件是LMR=LMC 和P=LAR=LAC 。
12.边际替代率递减决定了等产量曲线凸向原点。
13.在长期内,一切生产要素都是可以调整的,没有固定成本。
14.在完全竞争市场中,需求曲线、平均收益曲线、边际收益曲线和曲线都从合在一起,且平行于用于表示需求量的横轴。
15.在价格不变条件下MR = MC,在价格递减条件下MR < MC。
二、选择题(15*2=30分)1.一个企业使用50单位的劳动,可以生产出1800单位的产量;使用60单位的劳动,可以生产出2100单位的产量。
英语第二次作业题

英语第二次作业题大学英语(上)考试卷总分:100分单选题1、The village_______ my mother grew up in is not far from thecity.(3分)A、 whatB、whereC、whichD、wherever2、The girl desires that she ______ an opportunity to receive higher education.(3分)A、should giveB、givenC、be givingD、be given3、His salary as a driver is much higher than ________.(3分)A、a porterB、is a porterC、that of a porterD、as a porter4、What a bad memory I’ve got! I even forgot ____the book with me.(3分)A、to takeB、takingC、takeD、taken5、It was____fun to play games on the grassland that moreand more children gathered.(3分)A、such a greatB、so great aC、such greatD、so great6、People at the party worried about him, because no one was aware ____ he had gone.(3分)A、of whereB、of the place whereC、whereD、the place7、- Nancy was badly injured in the accident yesterday and she was sent to hospital.- Oh, really? I_________. I ________ visit her.(3分)A、didn't know; will go toB、don't know; will go toC、didn't know; am going toD、haven't known; am going to8、Weather_____,we are going to the Great Wall this weekend.(3分)A、permittedB、permittingC、permitsD、permission9、- Take this medicine twice a day, Peter?- Do I have to take it? It ________ so terrible.(3分)A、is tastingB、is tastedC、tastesD、has tasted10、- It’s time to tidy your room, Harry!- See the tidy room, Mum! _________ is where it should be.(3分)A、SomethingB、AnythingC、EverythingD、Nothing多选题1、- Madam, do all the buses go downtown?- ______. (3分)A、Wow, you got the ideaB、No, never mindC、Pretty well, I guessD、Sorry, I'm new here2、- May I see your tickets, please?- ________.(3分)A、No, they are mineB、No, you can'tC、SureD、Yes, you can3、? Why are you interested in working for our company? ?_________________.(3分)A、Because I need to support my family.B、Because your company has a good reputation.C、Because I just graduated from university.D、Because you can give me a high salary.4、- Hi, welcome back! Have a nice trip?- ____________.(3分)A、Oh, fantastic! Fresh air, and sunshine every dayB、Come on, I've got lots of funC、By the way, I don't like SaturdaysD、Well, I'll look forward to your phone call5、? What’s happening with the new teaching building? ? ________________.(3分)A、It’s not an easy job.B、I’ve just come back.C、I’ve never been there before.D、It’s held up by the bad weather this week.6、- Could you help me with my physics, please?- ________.(3分)A、No, no wayB、No, I couldn'tC、No, I can'tD、Sorry I can't. I have to go to a meeting right now7、- How often do you go dancing?- ______. (3分)A、I will go dancing tomorrowB、YesterdayC、Every other dayD、I've been dancing for a year8、- Thank you for your invitation.- _________.(3分)A、It doesn't matter.B、It's a pleasure.C、It's a small thing.D、I'll appreciate it.9、? Mary, are you and your husband busy this weekend??_________________.(3分)A、This weekend we may go to cinema.B、No, we’re not.C、Oh, it’s none of your business.D、Welcome to our party.10、- Is Mary there?- _________.(3分)A、Speaking.B、I'm not Mary.C、Who are you?D、Mary is well today.阅读理解题1、Our child’s behavior is greatly influenced by the way we react to what he has done. Our reactions help to determine whether our child will repeat his behavior or whether he will do something different. This statement is a very important part of a principle of behavioral psychology.The principle states that a behavior is influenced or affected by how the environment ---- people, places and things ---- immediately responds to the behavior. Perhaps without realizing it, you have used this principle many times.On the occasion when you told your child what a good boy he was after he cleaned up his room, you used the principle. When you sent your child to his room for fighting with his brother, you used the principle. When I gave Kim a cookie after she started to cry, I used the principle. In each of these examples, a particular behavior occurred first ---- cleaning up a room, fighting, and crying.In addition, there was a reaction to eachbehavior ---- the child was praised, sent to his room, or given a cookie. By these actions, we have influenced the previous behaviors and have helped to determine whether those behaviors will occur again in the future.(10分)1、1.What is the lecture mainly about?(单选题)A、Children and environmental protection.B、Children’s behavior and fighting.C、Children’s behavior and our response.D、Children and principles.2、2.On what kind of principle is the lecture based?(单选题)A、A principle in chemistry.B、A principle in behavioral psychology.C、A principle in physics.D、A principle in geology.3、3.Who do you think the audience at this lecture might be?(单选题)A、T eachersB、DoctorsC、Social workers.D、Parents4、4.According to the lecture, why was the child sent to his room?(单选题)A、As a kind of punishment.B、As a kind of reward.C、As an experiment on the principle.D、As an example of the principle.5、5.What does the lecturer mean by "environment"?(单选题)A、Rooms, cookies and toys.B、Water, air and forest.C、People, places and things.D、Family, school and friends.2、The fridge is considered a necessity. It has been so since the 1960s when packaged food first appeared with the label: “store inthe refrigerator”.In my fridgeless Fifties childhood, I was fed well and healthily. The milkman came daily, the grocer, the butcher, the baker, and theice-cream man delivered two or three times a week. The Sunday meat would last until Wednesday and surplus(剩余的) bread and milk became all kinds of cakes. Nothing was wasted, and we were never troubled by rotten food. Thirty years on, food deliveries have ceased; fresh vegetables are almost unobtainable in the country.The invention of the fridge contributed comparatively little to the art of food preservation. A vast way of well-tried techniques already existed ? natural cooling, drying, smoking, salting, sugaring, bottling ...What refrigeration did promote was marketing ? marketing hardware and electricity, marketing soft drinks, marketing dead bodies of animals around the globe in search of a good price.Consequently, most of the world’s fridges are to be found, not inthe tropics where they might prove useful, but in the wealthy countries with mild temperatures where they are climatically almost unnecessary. Every winter, millions of fridges hum away(不断地嗡嗡作响) continuously, and at vast expense, busily maintainanartificially-cooled space inside and artificially-heated house ?while outside, nature provides the desired temperature free of charge.The fridge’s e ffect upon the environment has been evident, while its contribution to human happiness has been insignificant. If you don’t believe me, try it yourself, invest in a food cabinet (橱柜)and turn off your fridge next winter. You may miss the hamburgers,but at least you’ll get rid of that terrible hum.(10分)1、1.The statement “In my fridgeless Fifties childhood, I was fedwell and healthily.” (Para.2) suggest that _______.(单选题)A、the author was well-fed and healthy even without a fridge inhis fiftiesB、the author was not accustomed to using fridges even in hisfiftiesC、there was no fridge in the author’s home in the 1950sD、the fridge was in its early stage of development in the 1950s2、2.Why does the author say that nothing was wasted before the invention of fridges?(单选题)A、People would not buy more food than was necessary.B、Food was delivered to people two or three times a week.C、Food was sold fresh and did not get rotten easily.D、People had effective ways to preserve their food.3、3.Who benefited the least from fridges according to theauthor?(单选题)A、InventorsB、ConsumersC、ManufacturersD、Traveling salesmen(巡回推销员)4、4.Which of the following phrases in Para.5 indicates the fridge’s negative effect on the environment?(单选题)A、“Hum away continuously”.B、“Climatically almost unnecessary”.C、“Artificially-cooled space”.D、“With mild temperatures”.5、5.What is the author’s overall attitude toward fridges?(单选题)A、NeutralB、CriticalC、ObjectiveD、Compromising完形填空题1、Scientists have studied consumer behavior recently and found 21 the look of the package has a great effect 22 the"quality" of theproduct and on how well it 23 , because "Consumers generallycannot 24 between a product and its package. Many products are packages and many packages are products," as Louis Cheskin, the first social scientist studying consumers’ feeling for packaging, noticed.Colors are one of the best tools in packaging. Studies of eyemovement have shown that colors draw human 25 quickly. Take V8 for example. For many years, the bright red color of tomatoes and carrots on the thin bottle makes you feel that it is very good for your body. And the word"green" today can keep food prices26 .27 are another attraction. Circles often suggest happiness and peacefulness, because these shapes are 28 to both the eye and the heart. That’s 29 the round yellow M signs of McDonald’s are inviting to both young and old.This new consumer response to the colors and shapes of packages reminds producers and sellers that people 30 to satisfy both body and soul.(10分)1、21(单选题)A、thatB、whatC、suchD、as2、22(单选题)A、withB、ofC、atD、on3、23(单选题)A、buysB、sellsC、offersD、works4、24(单选题)A、showB、displayD、differ5、5(单选题)A、attentionB、eyeC、presenceD、perception6、26(单选题)A、to go upB、to go downC、going upD、going down7、27(单选题)A、PackagesB、ShapesC、T oolsD、Products8、28(单选题)A、pleasantlyB、pleasingC、pleasedD、pleasure9、29(单选题)A、howB、becauseC、whereD、why10、30(单选题)A、sellB、makeD、produce2、Directions:There are 10 blanks in the following passage. For each blank, there are four choices marked A, B, C and D. You should choose the ONE answer that best completes the passage.As more women in the United States move up the professional ladder, more are finding 41_______ necessary to make business trips alone. Since this is new for many, some tips are certainly in order.If you are married, it is a good idea to 42 _____ your husband and children to learn to cook a few simple meals while you are away. They will be much happier and 43 ________they will enjoy the experience.If you will be eating alone a good deal, choose good 44 _______. In the end, they will be much better for your digestion. You may alsofind it useful to call the restaurant 45_______ advance and statethat you will be eating alone. You will probably get better service and 46 _______certainly a better table. Finally, and most importantly, anticipate your travel 47_______ as a business woman; this startswith lightweight luggage which you can easily manage even when fully 48_______. Take a folding case inside your suitcase; it will come in extremely handy for dirty clothes, 49_______ for business documentsand papers you no longer need on the trip. And make sure you have a briefcase so that you can keep currently required papers separate. Obviously, experience helps, but you can makethings 50_______ on yourself from the first by careful planning, so that right from the start you really can have a good trip! (10分)1、41(单选题)A、itB、thatC、whichD、what2、42(单选题)A、makeB、decideC、encourageD、show3、43(单选题)A、likelyB、probablyC、absolutelyD、surely4、44(单选题)A、placesB、hotelsC、supermarketsD、restaurants5、45(单选题)A、inB、atC、forD、on6、46(单选题)A、seldomB、hardlyC、almostD、undoubtedly7、47(单选题)A、lifeB、needsC、scheduleD、experience8、48(单选题)A、packageB、HeldC、packingD、packed9、49(单选题)A、so long asB、alsoC、as well asD、as much as10、50(单选题)A、worseB、happierC、difficultD、easier。
中国石油大学(北京)操作系统 第二次在线作业满分答案

第二次在线作业单选题 (共30道题)展开收起1.(2.5分)在可变分区存储管理中,最优适应分配算法要求对空闲区表项按( )进行排列。
A、A.地址从大到小B、B.地址从小到大C、C.尺寸从大到小D、D.尺寸从小到大我的答案:D 此题得分:2.5分2.(2.5分)避免死锁的一个著名的算法是()。
A、A.先入先出法;B、B.银行家算法;C、C.优先级算法;D、D.资源按序分配法。
我的答案:B 此题得分:2.5分3.(2.5分)可重定位内存的分区分配目的为()。
A、A、解决碎片问题B、B、便于多作业共享内存C、C、回收空白区方便D、D、便于用户干预我的答案:A 此题得分:2.5分4.(2.5分)逻辑地址就是()。
A、A.用户地址B、B.相对地址C、C.物理地址D、D.绝对地址我的答案:B 此题得分:2.5分5.(2.5分)进程和程序的一个本质区别是()。
A、A.前者为动态的,后者为静态的;B、B.前者存储在内存,后者存储在外存;C、C.前者在一个文件中,后者在多个文件中;D、D.前者分时使用CPU,后者独占CPU。
我的答案:A 此题得分:2.5分6.(2.5分)某进程在运行过程中需要等待从磁盘上读入数据,此时该进程的状态将。
A、A.从就绪变为运行;B、B.从运行变为就绪;C、C.从运行变为阻塞;D、D.从阻塞变为就绪我的答案:C 此题得分:2.5分7.(2.5分)常不采用( )方法来解除死锁。
A、A.终止一个死锁进程B、B.终止所有死锁进程C、C.从死锁进程处抢夺资源D、D.从非死锁进程处抢夺资源我的答案:B 此题得分:2.5分8.(2.5分)设两个进程共用一个临界资源的互斥信号量为mutex,当mutex=-1时表示()A、A.一个进程进入了临界区,另一个进程等待B、B.没有一个进程进入了临界区C、C.两个进程都进入了临界区D、D.两个进程都在等待我的答案:A 此题得分:2.5分9.(2.5分)两个进程合作完成一个任务,在并发执行中,一个进程要等待其合作伙伴发来信息,或者建立某个条件后再向前执行,这种关系是进程间的()关系。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
第二次作业
1.semilog plot : 程序:
clear all ; x=1:1:5;
y=[15,25,55,115,144];
semilogy(x,y,'rs--','MarkerFaceColor','g','LineWidth',2,'MarkerEdgeCo lor','k','MarkerSize',10); xlabel('years');
ylabel('number of students'); title('growth trend'); xlim([0 6]);
运行结果:
012
3456
10
1
10
2
10
3
years
n u m b e r o f s t u d e n t s
growth trend
2.bar graph : 程序:
clear all ; x=1:1:5; y=rand(1,5);
bar(x,y,'r');
title('Bar graph of 5 random values');
运行结果:
12345
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Bar graph of 5 random values
3.插入和面绘制: 程序:
clear all ; z0=rand(5,5); x=1:5;
[x0,y0]= meshgrid(x,x); y=1:0.1:5;
[x1,y1]= meshgrid(y,y); %meshgrid 生成绘制3-D 图形所需的网格数据 z1=interp2(x0,y0,z0,x1,y1);
surf(z1); %surf 命令绘制得到的是着色的三维曲面
shading interp ; %shading interp 会区分每个线型区域 的颜色,并且插入与其相近的颜色
colormap(hsv); hold on ;
contour(z1); %绘制二维等值线图 colorbar; caxis([0 1]);
hold off ;
运行结果:
20
40
60
20
40
60
00.20.40.60.81
00.10.2
0.30.40.50.60.70.80.9
1
4.使用find : 程序:
function ind=findNearest(x,desiredVal) c=abs(x(:)-desiredVal); ind=x(find(c(:)<1));
脚本: x=1:5
desiredVal=2.5
ind=findNearest(x,desiredVal)
运行结果: x =
1 2 3 4 5
desiredVal =
2.5000
ind =
2 3
5.循环和流程控制
程序:
function loopTest(N)
for i=1:N
if mod(i,2)==0&&mod(i,3)~=0 %如果i能被2整除不能被3整除
disp(['',num2str(i),' is divisible by 2']);
else if mod(i,3)==0&&mod(i,2)~=0 %如果i能被3整除不能被2整除 disp(['',num2str(i),' is divisible by 3']);
else if mod(i,3)==0&&mod(i,2)==0 %如果i能被2整除能被3整除 disp(['',num2str(i),' is divisible by 2 AND 3']);
else
disp(['',num2str(i),' is NOT divisible by 2 AND 3']);
end
end
end
end
运行结果:
>> loopTest(6)
1 is NOT divisible by
2 AND 3
2 is divisible by 2
3 is divisible by 3
4 is divisible by 2
5 is NOT divisible by 2 AND 3
6 is divisible by 2 AND 3
6.平滑器:
程序:
function smoothed=rectFilt(x,width)
if(mod(width,2)==0)
width %选择width为奇数
end;
for n=1:length(x)
if n<3 || n>length(x)-2
smoothed(n)=x(n);%边缘的点保持不动
else
smoothed(n)=mean(x((n-2):(n+2)));%平滑算法end
end
脚本:
x=xlsread('noisyData.xls');
width=11;
smoothed=rectFilt(x,width);
figure;
plot(x,'--','lineWidth',2);%plot x
hold on;
plot(smoothed,'r','lineWidth',2);%plot smoothed hold off;
xlabel('Index');
ylabel('Data value');
title('Smoothing Demonstration');
legend('Original Data','Smoothed');
运行结果:
10203040
5060708090100
-1.5-1
-0.5
0.5
1
1.5
Index
D a t a v a l u e
Smoothing Demonstration
Original Data Smoothed
7.绘制圆的函数 a.同心圆
程序:function [x,y]=getCircle(center,r)
t=-2*pi:0.01:2*pi for i=1:length(t) a=t(i);
x(i)=r*cos(a)+center(1); y(i)=r*sin(a)+center(2); end
脚本:
center=[0 0];
[x,y]=getCircle(center,1);hold on plot(x,y,'linewidth',4,'color','b'); [x,y]=getCircle(center,4);hold on plot(x,y,'linewidth',4,'color','k'); [x,y]=getCircle(center,7);hold on plot(x,y,'linewidth',4,'color','g'); [x,y]=getCircle(center,10);hold on plot(x,y,'linewidth',4,'color','y'); [x,y]=getCircle(center,13);hold on
plot(x,y,'linewidth',4,'color','r');
axis equal;
运行结果:
10
5
-5
-10
-15-10-5051015
b.olympic的logo
程序:
figure;
r=0.5;
[x,y]=getCircle([-1 0],r);hold on
plot(x,y,'linewidth',5,'color','b');
[x,y]=getCircle([0 0],r);hold on
plot(x,y,'linewidth',5,'color','k');
[x,y]=getCircle([0.5 -0.4],r);hold on
plot(x,y,'linewidth',5,'color','g');
[x,y]=getCircle([-0.5 -0.4],r);hold on
plot(x,y,'linewidth',5,'color','y');
[x,y]=getCircle([1 0],r);hold on
plot(x,y,'linewidth',5,'color','r');
axis equal;
运行结果:
10
5
-5
-10
-15-10-5051015。