!!!操作系统全英文期末考试题(带答案)

萌到你眼炸
891次浏览
2020年08月03日 01:15
最佳经验
本文由作者推荐

办公室主任岗位职责-农村社保新政策


XX大学2011 ——2012 学年第一学期

《 操作系统 》期末考试试题(A)








考试
课程
题号
满分
得分
阅卷
教师













考试时间








年 月 日












总分


一.选择题(20分,每题1分)
1. Generally speaking, which one is not the major concern for a operating
system in the following four options?( D )
the computer
the system resources
and apply the interface between user's program and computer
hardware system
-level programming language complier
2. The main disadvantage of batch system is ( C )
utilization is low
not concurrent
of interaction
degree of automation



3. A process transforms from waiting state to ready state is caused by the
( B )
upt event
s scheduling
a process for a program
g for some events
4. The concurrent process is refers to ( C )
process can be run in parallel
process can be run in order
process can be run in the same time
process can not be interrupted
5. In multi-process system, in order to ensure the integrity of public variables,
the processes should be mutually exclusive access to critical areas. The
so-called critical area is ( D )
A.A buffer
B.A date area
onization mechanism
D.A program
6. The orderly use of resources allocation strategy can destroy the condition
( D ) to avoid deadlock.
exclusive
and wait
preemption
ar wait
7. User's applications use the system resources to complete its operation by the
support and services of ( C )
ng the mouse
rd command
call
cal user interface
8. There are four jobs arrived at the same time and the execution time of each
job is 2h. Now they run on one processor at single channel,then the average
turnaround time is ( B )
A.1h
B.5h
C.2.5h
D.8h
9. Among the job scheduling algorithms, ( B ) is related to the job's estimated
running time.
scheduling algorithm


-job-first scheduling algorithm
response ratio algorithm
ed scheduling
memory management, the purpose of using the overlay and swapping is
( C )
g main memory
ing main memory physically
main memory space
ing CPU utilization
the page-replacement algorithm,which one can cause the Belady
phenomenon? ( A )


NG

12. The following description of the system in safe state,which one is
correct?( B )
must cause deadlock if the system is in insecure state
may cause deadlock if the system is in insecure state
may cause deadlock if the system is in secure state
are wrong
lly, when we talk about
( C )
t hardware memory from damaging
t program from losing in memory
t the cross-border call between programs
t the program from being peeped
actual capacity of virtual memory is equal to ( B )
capacity of external memory(disk)
sum of the capacity of external memory and main memory
space that the CPU logical address gives
smaller one between the option B and C
al file's organization is determined by ( D )
ations
memory capacity
al memory capacity
ing system
16.A computer system is configured with two plotters and three printers,in
order to properly drive these devices,system should provide ( C ) device
driver program.
A.5


B.3
C.2
D.1
there are fewer number of channels in system ,it may cause
bottlenecks”. To solve this problem, which of the follow options is not the
effective way?( A )
ing the speed of CPU
the virtual device technology
some hardware buffer on the devices
sing the path between devices and channels
IO devices and main memory are exchanging data, it can be achieved
without CPU's frequently intervention, this way of exchanging data is called
( C )
g
upts
memory access
of them
19. The following description of device management, which one is not
correct?( B )
external devices are managed by the system in uniform
l is a software of controlling input and output
IO interrupt events from the IO channel are managed by device
management
of the responsibility of the operating system is to use the hardware
effectively
operating system used ( A ), it realized a mechanism that we can
use more space to save more time.
NG
l storage
l
y

二.填空题(20分,每空1分)
re may trigger an interrupt by executing a special operation called a
system call .(P7)
there is only one general-purpose CPU, then the system is a
single-processor system.(p12)
3. A process can be thought of as a program in execution. (p79)
a process executes, it changes state. Each process may be in one of the
following states: new, running, waiting, ready or terminated .(p83)


-term(job) scheduling is the selection of processes that will be allowed to
contend for the CPU. And Short-term(CPU) scheduling is the selection of one
process from the ready queue. (p116)
process executing in the operating system may be either independent
processes or cooperating processes. Cooperating processes require an
interprocess communication mechanism to communicate with each other.
Principally, communication is achieved through two schemes: share memory
and message passing. (p116)
7. In modern operating systems, resource allocation unit is process, processor
scheduling unit is thread. (p127)
8. Most modern operating systems provide kernel support for threads; among
these are Windows, as well as Solaris and Linux. (p146)
9. CPU scheduling is the basis of multiprogrammed operating systems. (p153)
10. The FCFS algorithm is nonpreemptive; the RR algorithm is preemptive.
11. Sometimes, a waiting process is never again able to change state, because
the resources it has requested are held by other waiting processes. This situation
is called deadlock . (p245)
12. The main purpose of a computer system is to execute programs. These
programs, together with the data they access, must be in main memory (at least
partially) during execution. (P274)
13. The various memory-management algorithms differ in many aspects. In
comparing different memory- management strategies, we use the follow
considerations: Hardware support, Performance, Fragmentation, Relocation,
Swapping, Sharing and protection . (p310)
14.A process is thrashing if it is spending more time paging than executing.
l memory is a technique that enables us to map a large logical address
space onto a smaller physical memory.(p365)
we solve the major problems of page replacement and frame
allocation,the proper design of a paging system requires that we consider page
size,IO,locking,process creation,program structure,and other issues.(p366)
operating system abstracts from the physical properties of its storage
devices to define a logical storage unit,the file . (p373)
files are the main information-storage mechanism in most computer
system,file protection is needed.(p408)
seek time is the time for the disk arm to move the heads to the cylinder
containing the desired sector.(P457)
hardware mechanism that enables a device to notify the CPU is called
an interrupt .(p499)
三.简答题(30分,每题6分)
is the operating system?What role does the operating system play in a


computer?
开放题,解释操作系统概念,操作系统可以实现哪些基本功能?
关键词:a.管理系统资源, 控制程序运行,改善人机界面,为其他应用软
件提供支持。b.基本功能:进程与处理机管理、作业管理 、存储管理、设
备管理、文件管理。
are five jobs A,B,C,D,E to be running, each of the estimated running
time of A,B,C,D,E is 9 ,6 ,3 ,5 ,x. Write down their running order which has the
shortest average waiting time?
由于短作业优先调度算法可以使作业的平均周转时间最 短,同样使平均等
待时间最短,所以采用段作业优先算法。
下面对x的取值进行讨论:
当0当3当5<=x<=6时,作业的运行顺序应该为C,D,E,B,A;
当6当x>9时,作业的运行顺序应该为C,D,B,A,E

3.
What is the criteria of selecting a proper process scheduling algorithm?

由于各种调度算法都有自己的特性,因此,很 难评价哪种算法是最好的。
一般说来,选择算法时可以考虑如下一些原则:
① CPU利用率(CPU utilization);
② 吞吐量(Throughput);
③ 等待时间(waiting time);
④ 响应时间(response time)。
⑤ 周转时间(Turnaround time)
在选择调度算法前,应考 虑好采用的准则,当确定准则后,通过对各种算
法的评估,从中选择出最合适的算法。

n the following terms:
1)System calls
2)Virtual memory
3)Address relocation
1)系统调用提供了应用程序和操作系统的接口。系统调用把应用程序的请
求传给内核,调用相应的的内 核函数完成所需的处理,将处理结果返回给
应用程序。
2)虚拟存储器是指一种实际上并不存 在的虚假存储器,它是系统为了满足
应用对存储器容量的巨大需求而构造的一个非常大的地址空间,从而 使用
户在编程时无须担心存储器的不足,就好像有一个无限大的存储器供其使
用一样。
3)指当程序装入到与其逻辑地址不同的主存空间时,将程序地址空间的逻
辑地址变换为主存空间的物 理地址的变换过程。



functions do you think the file system can realize?Please use your own
words.
(1)提供方便的文件系统应用接口;
(2)将逻辑文件映射为物理文件;
(3)管理文件存储空间的使用;
(4)保证文件存储的安全性和可靠性。

四.应用题(30分,每题10分)
is a ticket hall can accommodate 100 it is less than 100 people
in the hall, buyers can go into and buy tickets ,then leave the hall. If there has
100 people, then buyers should wait outside the please answer the
following questions:
(1)Is it synchronization or mutual exclusion between the buyers?
(2)Describe the process of buyers with wait() and signal() operation.

A:
(1)购票者直接是互斥关系。
(2)一 个售票厅可容纳100人购票,说明最多允许100人共享售票厅;可引
入一个信号量empty,初值 为100.由于购票者必须是互斥地进行购票,故
应再设一个mutex,初值为1。用 wait() 和signal() 表达如下:
empty,mutex:semaphore;
empty:=100;mutex:=1;
begin:
wait(empty);
wait(mutex);
进入购票,购票后退出
signal(empty);
signal(mutex);
end

a computer system,there is one CPU and two external devices IO1 and IO2,
now three jobs J1,J2 and J3 are already in the main memory to be run,the
priority of them is J1>J2> order and time they use the CPU and devices
are as following:
J1:IO2(30ms),CPU(10ms),IO1(30ms),CPU(10ms).
J2:IO1(20ms),CPU(20ms),IO2(40ms).
J3:CPU(30ms),IO1(20ms).
Now they run at the same time and the use of resources is preemptive,please
answer the following questions(you need not to consider other operating time):


(1)Calculate the time J1,J2,J3 cost from start to finish separately.
(2)What is the CPU utilization when three jobs are finishing?
(3)What is the IO1's utilization when three jobs are finishing?

A:
(1)J1占用完IO2 30ms之后,抢占J2的CPU,运行10ms,再占用IO1 30ms,
然后占用CPU 10ms,完成。所用时间为30+10+30+10=80ms。
J2占用IO1 20ms,抢占了J3的CPU,运行10ms后,被J1抢占CPU,等
待 10ms,之后再次得到CPU,运行10ms,之后占用IO2 40ms,所用时间
为20+10+10+10+40=90ms。
J3占用CPU 20ms被J2抢占,等待30ms,再运行10ms,等待10ms,再
占用IO1 20ms,所用时间为20+30+10+10+20=90ms。
(2)三个作业全部完成时CPU利用率为:(10+20+30+10)90=79=78%。
(3)三个作业全部完成时IO1利用率为:(20+30+20)90=79=78%。

a page virtual storage system, each process has 4 memory allocation
memory the process begins executing ,data area is empty. If now it
calls the pages in the program with this sequence:
5 , 3 , 6 , 4 , 3 , 5 , 1 , 4 , 2 , 5 , 6 , 4 , 2 , 5 , 1
Write down the number of page faults when using the following
page- replacement algorithms and draw the Page trend graph.
(1)FIFO page-replacement algorithm
(2)LRU page-replacement algorithm
(3)OPT page-replacement algorithm

(1)系统采用先进先出淘汰算法,总共缺页10次
5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 4 4 1 1 2 5 6 4 4 4 1
5 3 6 6 6 4 4 1 2 5 6 6 6 4
5 3 3 3 6 6 4 1 2 5 5 5 6
5 5 5 3 3 6 4 1 2 2 2 5
f f f f f f f f f f
(2)系统采用LRU(最少使用)淘汰算法,总共缺页8次
5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 3 5 1 4 2 5 6 4 2 5
5 3 6 4 3 5 1 4 2 5 6 4 2
5 5 6 4 3 5 1 4 2 5 6 4
f f f f f f f f
(3)系统采用OPT淘汰算法,总共缺页7次


5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 4 4 4 4 4 4 4 4 4 4 4
5 3 6 6 6 6 6 6 6 6 6 6 6 1
5 3 3 3 1 1 2 2 2 2 2 2 2
5 5 5 5 5 5 5 5 5 5 5 5
f f f f f f f



XX大学2011 ——2012 学年第一学期

《 操作系统 》期末考试试题(A)








考试
课程
题号
满分
得分
阅卷
教师













考试时间








年 月 日












总分


一.选择题(20分,每题1分)
1. Generally speaking, which one is not the major concern for a operating
system in the following four options?( D )
the computer
the system resources
and apply the interface between user's program and computer
hardware system
-level programming language complier
2. The main disadvantage of batch system is ( C )
utilization is low
not concurrent
of interaction
degree of automation



3. A process transforms from waiting state to ready state is caused by the
( B )
upt event
s scheduling
a process for a program
g for some events
4. The concurrent process is refers to ( C )
process can be run in parallel
process can be run in order
process can be run in the same time
process can not be interrupted
5. In multi-process system, in order to ensure the integrity of public variables,
the processes should be mutually exclusive access to critical areas. The
so-called critical area is ( D )
A.A buffer
B.A date area
onization mechanism
D.A program
6. The orderly use of resources allocation strategy can destroy the condition
( D ) to avoid deadlock.
exclusive
and wait
preemption
ar wait
7. User's applications use the system resources to complete its operation by the
support and services of ( C )
ng the mouse
rd command
call
cal user interface
8. There are four jobs arrived at the same time and the execution time of each
job is 2h. Now they run on one processor at single channel,then the average
turnaround time is ( B )
A.1h
B.5h
C.2.5h
D.8h
9. Among the job scheduling algorithms, ( B ) is related to the job's estimated
running time.
scheduling algorithm


-job-first scheduling algorithm
response ratio algorithm
ed scheduling
memory management, the purpose of using the overlay and swapping is
( C )
g main memory
ing main memory physically
main memory space
ing CPU utilization
the page-replacement algorithm,which one can cause the Belady
phenomenon? ( A )


NG

12. The following description of the system in safe state,which one is
correct?( B )
must cause deadlock if the system is in insecure state
may cause deadlock if the system is in insecure state
may cause deadlock if the system is in secure state
are wrong
lly, when we talk about
( C )
t hardware memory from damaging
t program from losing in memory
t the cross-border call between programs
t the program from being peeped
actual capacity of virtual memory is equal to ( B )
capacity of external memory(disk)
sum of the capacity of external memory and main memory
space that the CPU logical address gives
smaller one between the option B and C
al file's organization is determined by ( D )
ations
memory capacity
al memory capacity
ing system
16.A computer system is configured with two plotters and three printers,in
order to properly drive these devices,system should provide ( C ) device
driver program.
A.5


B.3
C.2
D.1
there are fewer number of channels in system ,it may cause
bottlenecks”. To solve this problem, which of the follow options is not the
effective way?( A )
ing the speed of CPU
the virtual device technology
some hardware buffer on the devices
sing the path between devices and channels
IO devices and main memory are exchanging data, it can be achieved
without CPU's frequently intervention, this way of exchanging data is called
( C )
g
upts
memory access
of them
19. The following description of device management, which one is not
correct?( B )
external devices are managed by the system in uniform
l is a software of controlling input and output
IO interrupt events from the IO channel are managed by device
management
of the responsibility of the operating system is to use the hardware
effectively
operating system used ( A ), it realized a mechanism that we can
use more space to save more time.
NG
l storage
l
y

二.填空题(20分,每空1分)
re may trigger an interrupt by executing a special operation called a
system call .(P7)
there is only one general-purpose CPU, then the system is a
single-processor system.(p12)
3. A process can be thought of as a program in execution. (p79)
a process executes, it changes state. Each process may be in one of the
following states: new, running, waiting, ready or terminated .(p83)


-term(job) scheduling is the selection of processes that will be allowed to
contend for the CPU. And Short-term(CPU) scheduling is the selection of one
process from the ready queue. (p116)
process executing in the operating system may be either independent
processes or cooperating processes. Cooperating processes require an
interprocess communication mechanism to communicate with each other.
Principally, communication is achieved through two schemes: share memory
and message passing. (p116)
7. In modern operating systems, resource allocation unit is process, processor
scheduling unit is thread. (p127)
8. Most modern operating systems provide kernel support for threads; among
these are Windows, as well as Solaris and Linux. (p146)
9. CPU scheduling is the basis of multiprogrammed operating systems. (p153)
10. The FCFS algorithm is nonpreemptive; the RR algorithm is preemptive.
11. Sometimes, a waiting process is never again able to change state, because
the resources it has requested are held by other waiting processes. This situation
is called deadlock . (p245)
12. The main purpose of a computer system is to execute programs. These
programs, together with the data they access, must be in main memory (at least
partially) during execution. (P274)
13. The various memory-management algorithms differ in many aspects. In
comparing different memory- management strategies, we use the follow
considerations: Hardware support, Performance, Fragmentation, Relocation,
Swapping, Sharing and protection . (p310)
14.A process is thrashing if it is spending more time paging than executing.
l memory is a technique that enables us to map a large logical address
space onto a smaller physical memory.(p365)
we solve the major problems of page replacement and frame
allocation,the proper design of a paging system requires that we consider page
size,IO,locking,process creation,program structure,and other issues.(p366)
operating system abstracts from the physical properties of its storage
devices to define a logical storage unit,the file . (p373)
files are the main information-storage mechanism in most computer
system,file protection is needed.(p408)
seek time is the time for the disk arm to move the heads to the cylinder
containing the desired sector.(P457)
hardware mechanism that enables a device to notify the CPU is called
an interrupt .(p499)
三.简答题(30分,每题6分)
is the operating system?What role does the operating system play in a


computer?
开放题,解释操作系统概念,操作系统可以实现哪些基本功能?
关键词:a.管理系统资源, 控制程序运行,改善人机界面,为其他应用软
件提供支持。b.基本功能:进程与处理机管理、作业管理 、存储管理、设
备管理、文件管理。
are five jobs A,B,C,D,E to be running, each of the estimated running
time of A,B,C,D,E is 9 ,6 ,3 ,5 ,x. Write down their running order which has the
shortest average waiting time?
由于短作业优先调度算法可以使作业的平均周转时间最 短,同样使平均等
待时间最短,所以采用段作业优先算法。
下面对x的取值进行讨论:
当0当3当5<=x<=6时,作业的运行顺序应该为C,D,E,B,A;
当6当x>9时,作业的运行顺序应该为C,D,B,A,E

3.
What is the criteria of selecting a proper process scheduling algorithm?

由于各种调度算法都有自己的特性,因此,很 难评价哪种算法是最好的。
一般说来,选择算法时可以考虑如下一些原则:
① CPU利用率(CPU utilization);
② 吞吐量(Throughput);
③ 等待时间(waiting time);
④ 响应时间(response time)。
⑤ 周转时间(Turnaround time)
在选择调度算法前,应考 虑好采用的准则,当确定准则后,通过对各种算
法的评估,从中选择出最合适的算法。

n the following terms:
1)System calls
2)Virtual memory
3)Address relocation
1)系统调用提供了应用程序和操作系统的接口。系统调用把应用程序的请
求传给内核,调用相应的的内 核函数完成所需的处理,将处理结果返回给
应用程序。
2)虚拟存储器是指一种实际上并不存 在的虚假存储器,它是系统为了满足
应用对存储器容量的巨大需求而构造的一个非常大的地址空间,从而 使用
户在编程时无须担心存储器的不足,就好像有一个无限大的存储器供其使
用一样。
3)指当程序装入到与其逻辑地址不同的主存空间时,将程序地址空间的逻
辑地址变换为主存空间的物 理地址的变换过程。



functions do you think the file system can realize?Please use your own
words.
(1)提供方便的文件系统应用接口;
(2)将逻辑文件映射为物理文件;
(3)管理文件存储空间的使用;
(4)保证文件存储的安全性和可靠性。

四.应用题(30分,每题10分)
is a ticket hall can accommodate 100 it is less than 100 people
in the hall, buyers can go into and buy tickets ,then leave the hall. If there has
100 people, then buyers should wait outside the please answer the
following questions:
(1)Is it synchronization or mutual exclusion between the buyers?
(2)Describe the process of buyers with wait() and signal() operation.

A:
(1)购票者直接是互斥关系。
(2)一 个售票厅可容纳100人购票,说明最多允许100人共享售票厅;可引
入一个信号量empty,初值 为100.由于购票者必须是互斥地进行购票,故
应再设一个mutex,初值为1。用 wait() 和signal() 表达如下:
empty,mutex:semaphore;
empty:=100;mutex:=1;
begin:
wait(empty);
wait(mutex);
进入购票,购票后退出
signal(empty);
signal(mutex);
end

a computer system,there is one CPU and two external devices IO1 and IO2,
now three jobs J1,J2 and J3 are already in the main memory to be run,the
priority of them is J1>J2> order and time they use the CPU and devices
are as following:
J1:IO2(30ms),CPU(10ms),IO1(30ms),CPU(10ms).
J2:IO1(20ms),CPU(20ms),IO2(40ms).
J3:CPU(30ms),IO1(20ms).
Now they run at the same time and the use of resources is preemptive,please
answer the following questions(you need not to consider other operating time):


(1)Calculate the time J1,J2,J3 cost from start to finish separately.
(2)What is the CPU utilization when three jobs are finishing?
(3)What is the IO1's utilization when three jobs are finishing?

A:
(1)J1占用完IO2 30ms之后,抢占J2的CPU,运行10ms,再占用IO1 30ms,
然后占用CPU 10ms,完成。所用时间为30+10+30+10=80ms。
J2占用IO1 20ms,抢占了J3的CPU,运行10ms后,被J1抢占CPU,等
待 10ms,之后再次得到CPU,运行10ms,之后占用IO2 40ms,所用时间
为20+10+10+10+40=90ms。
J3占用CPU 20ms被J2抢占,等待30ms,再运行10ms,等待10ms,再
占用IO1 20ms,所用时间为20+30+10+10+20=90ms。
(2)三个作业全部完成时CPU利用率为:(10+20+30+10)90=79=78%。
(3)三个作业全部完成时IO1利用率为:(20+30+20)90=79=78%。

a page virtual storage system, each process has 4 memory allocation
memory the process begins executing ,data area is empty. If now it
calls the pages in the program with this sequence:
5 , 3 , 6 , 4 , 3 , 5 , 1 , 4 , 2 , 5 , 6 , 4 , 2 , 5 , 1
Write down the number of page faults when using the following
page- replacement algorithms and draw the Page trend graph.
(1)FIFO page-replacement algorithm
(2)LRU page-replacement algorithm
(3)OPT page-replacement algorithm

(1)系统采用先进先出淘汰算法,总共缺页10次
5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 4 4 1 1 2 5 6 4 4 4 1
5 3 6 6 6 4 4 1 2 5 6 6 6 4
5 3 3 3 6 6 4 1 2 5 5 5 6
5 5 5 3 3 6 4 1 2 2 2 5
f f f f f f f f f f
(2)系统采用LRU(最少使用)淘汰算法,总共缺页8次
5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 3 5 1 4 2 5 6 4 2 5
5 3 6 4 3 5 1 4 2 5 6 4 2
5 5 6 4 3 5 1 4 2 5 6 4
f f f f f f f f
(3)系统采用OPT淘汰算法,总共缺页7次


5 3 6 4 3 5 1 4 2 5 6 4 2 5 1
5 3 6 4 4 4 4 4 4 4 4 4 4 4 4
5 3 6 6 6 6 6 6 6 6 6 6 6 1
5 3 3 3 1 1 2 2 2 2 2 2 2
5 5 5 5 5 5 5 5 5 5 5 5
f f f f f f f


伤仲永读后感-工程师工作总结


西南科技大学调档线-北京专科录取分数线


苏州大学考研分数线-网站销售技巧


高薪职位-校长职责


集线器是什么-2013年高考语文卷


安徽大学录取分数线-歌颂老师的诗


少先队入队申请书-采访稿范文


项目工程师-项目可行性报告模板