1. In the following options, the interface provided to the application by the operating system is ___a__.
A. System call B. Interrupt C. library function D. Primitive language
System calls are the only interfaces that the operating system provides to programmers. --"Computer operating system Tutorial"
2. The following options cause the operation to create a new process to be ___c___.
I User Login succeeded II device Assignment III Start program execution
A. Only I and II B. Only II and III C. Only I and III D.I, II and III
When the user logs on successfully, the operating system initiates the initial program related to the user, and a new process needs to be created. Starting a program execution will undoubtedly start a new process. However, the device assignment is for an existing process and does not create a new process.
3. Set the initial value of the semaphore associated with a resource to 3 and the current 1. If M indicates that a resource is available
Number, n indicates the number of processes waiting for the resource, and M and N are __b____.
a.0, 1 B.1, 0 c.1, 2 D.2, 0
Since the current value of the semaphore is 1, the natural indication is that the number of available resources is 1. Because there is currently a number of available resources, the number of processes waiting on the resource can only be 0, otherwise there will be no available resources
4. In the following options, a reasonable time to reduce the priority of the process is ___a__.
A. Process time slices run out
B. The process has just completed I/O and entered the ready queue
C. The process is in a ready queue for a long time
D. Process transitions from ready state to run state
The process time slice is used up to reduce its priority, the process of completing I/O should elevate its priority, and the process in readiness queue waiting for dispatch will not change its priority.
5. The shared variable definition of process P0 and P1 and its initial value is
Boolean flag[2];
int turn = 0;
Flag[0] = FALSE; FLAG[1] = FALSE;
If the class C pseudo-code of the process P0 and P1 access critical resources is implemented as follows:
void P0 ()//Process P0
{
while (TRUE)
{
Flag[0]=true; Turn=1;
while (flag[1]&& (turn==1));
Critical Zone;
Flag[0]=false;
}
}
void P1 ()//Process P1
{
while (TRUE)
{
Flag[1]=true; turn=0;
while (flag[0]&& (turn==0));
Critical Zone;
Flag[1]=false;
}
}
The case that occurs when concurrent execution of processes P0 and P1 is ___d___.
A. There is no guarantee that the process is mutually exclusive to the critical section, there will be "starvation" phenomenon
B. There is no guarantee that the process is mutually exclusive to the critical section and there is no "hunger" phenomenon
C. Can guarantee the process of mutual exclusion into the critical area, there will be "hunger" phenomenon
D. Can ensure that the process of mutual exclusion into the critical area, there will be no "hunger" phenomenon
The main idea of realizing mutual exclusion of this algorithm is to set up a turn variable, which is used to "humility" of the process asking.
In general, if a process P0 tries to access a critical resource, set Flag[0]=true to indicate that it wants to access it. At this point, if the process P1 has not attempted to access the critical resource, flag[1] has been set to false after the process last accessed the critical resource exit critical section. So process P0 in the execution of the cyclic judging condition, the first condition is not satisfied, the process P0 can enter the critical section normally, and satisfies the mutually exclusive condition.
What we need to consider is that two processes are trying to access critical resources at the same time. Note that the meaning of the turn variable: When the process tries to access it, it first sets its own flag variable to true, indicating that it wants to access it, but sets the turn variable to be the process number of the other, which means "humility", because the turn variable is not the number of its own in the cyclic judgment condition. At this point two processes will be "humility" to each other, but this will not cause "hunger" situation, because the turn variable will have a final value, so there must be a process to end the loop into the critical section. The actual situation is that the process of "humility" first enters the critical area, and then the process of "humility" needs to be recycled.
In fact, it can be imagined as two people enter the door, everyone in front of each other and each other polite "you go first." If no one in the door, and the air to say nonsense, and then strode into the door, if two people at the same time, on each other "humility", but each only polite once, so the first polite people please finish each other, waiting for each other to please themselves, and then the door aboveboard.
6. A computer based on dynamic partitioned storage management whose main memory capacity is 55M B (initially idle), using
Best fit algorithm, allocation and release order: Allocate 15M B, allocate 30M B, release
Put 15M B, allocate 8M B, allocate 6M B, at this time the maximum size of the free partition in main memory is __b____.
A.7mb
B.9mb
c.10mb
D.15mb
Its main memory capacity of 55MB (first time for space), the initial allocation of 15MB after the 55MB-15MB=40MB, the second step to allocate 30MB after the 40MB-30MB=10MB, the third release 15MB after two free zone 15MB, and 10MB, the fourth step to allocate 8MB , the idle area is 15MB,2MB, the fifth step is allocated 6MB, then the idle area is 9MB,2MB, so this topic should be the choice B
7. A computer using a two-level page table of paging storage management, by byte address, page size of 2^10 word
section, the page table entry size is 2 bytes, and the logical address structure is:
Page Directory number page number offset
The logical address space size is 2^16 page, which indicates that the table entry is contained in the page catalog table for the entire logical address space
The number is at least ____b__.
A. B. 512 C. D.
The page size is 2 of the 10 square bytes, the page table entry size is 2 bytes, with a two-level page table, a page can hold 2 of the 9 page table entries, the logical address space is 2 of the 16-page, to make the page catalog table representing the entire logical address space contains the minimum number of table items, you need 2 of 16 times/2 of 9 square = 2 of 7 parties = 128 Pages Save page table entries, that is, the page directory contains a minimum number of x
8. When a local user logs into the system via the keyboard, the first procedure to obtain the keyboard input information is __b____.
A. Command interpreter B. Interrupt handler
C. System Invoke Service Program D. User login program
When the user enters information using the keyboard, an interrupt is generated for each input. Therefore, the program that first obtains the keyboard input information is the interrupt handler.
9. In a single processor system, the parallel is D
I process and process II processor with equipment III processor with channel IV set
Preparation and equipment
A.I, II and III B.I, II and IV C.I., III and IV D.II, III
and IV
10. In the following process scheduling algorithms, it is __d____ to consider the process wait time and execution time synthetically.
A. Time-Slice rotation scheduling algorithm B. Short process priority scheduling algorithm
C. First come first service scheduling algorithm D. High response ratio priority scheduling algorithm
11. There are 8 printers in a computer system, competing with the K process, which requires a maximum of 3 per process
Printer. The minimum value of K that the system may be deadlocked on is __c____.
A.2 B.3 C.4 D.5
Resolution: A deadlock occurs when each process occupies 2 printers.
12. The primary protection measure for partitioning memory management is ___a___.
A. Perimeter address Protection B. Program code Protection c. Data protection D. Stack protection
In the partition allocation memory management mode, mainly use the upper and lower registers to protect the partition, also known as the boundary address protection. The answer to the question is a.
13. In a segmented storage management system, the address length is 32 bits, where the segment number is 8 bits, the largest section
It's ____c__.
A.2^8 bytes b.2^16 bytes c.2^24 bytes d.2^32 bytes
14. In systems employing spooling technology, the user's print data is first sent to (B).
A, disk fixed area B, memory fixed area
C, interrupt D, printer
Explanation: Spooling is an online technology, a buffer of one, put in memory.
15. If I/O takes much less time than the CPU processing time, the buffer (B).
A, the most effective B, almost invalid
C, balanced D, above are not
16. The device Independence statement is correct (B).
A, device independence refers to the I/O device has the independent implementation of I/O function of a feature
B, device independence refers to a user program independent of the specific physical equipment, a feature
C, device independence refers to the ability to achieve device sharing a feature
D, device independence refers to a device driver independent of the specific physical device of a feature
Resolution: Device independence refers to the user does not specify a specific device, and the specified logical device, so that the user work and physical equipment independent, and other ways to establish the logical device and the physical device of the corresponding relationship between the characteristics of the user program is independent of the specific use of a physical device.
17. If the data exchange between the I/O device and the storage device is not done by the CPU, this data exchange
The way is (C).
A, program query mode B, interrupt mode
C, DMA mode D, provide primary, secondary storage interface
Resolution: Under the control of DMA (direct memory storage) controller, peripherals directly swap batches of data with memory without CPU intervention. So choose c.
18. There are 7 address entries in the File index node, where 4 address entries are direct address indexes and 2 locations
Site entry is a primary indirect address index, 1 address entries are level two indirect address index, each address item size
is 4 bytes. If both the disk index block and the disk data block size are 256 bytes, you can represent the single
The maximum length of a file is ___c___.
a.33 KB b.519 KB c.1057 KB d.16513 kb
Answer: The file structure of the subject is a mixed index allocation method. Each address entry size is 4 bytes, the index block and the size of the block is 256 bytes, and the number of items in each index block is =256b/4b=64. 4 address entries are direct address indexes, and the corresponding file size is 4x256b=1kb. 2 Address entry is a primary indirect address index, the corresponding file size is 2X64X256B=32KB, an address entry is a level two indirect address index, the corresponding file size is 1x64x64x256b=1024kb. So the maximum length of a single file is =1kb+32kb+1024kb=1057kb.
19. The main purpose of setting the current working directory is to __c_____.
A. Save external memory space B. Save memory space
C. Speed up the retrieval of files D. Speed up file read/write speeds
20. In the physical structure of the following files, __b____ is suitable for random access and easy to file extension.
A. Continuous structure B. Index structure
C. Chained structure and disk block length D. Chain structure and disk blocks grow
Parse: The index structure is suitable for random access and easy to file extension.
21. Assuming that the head is currently in the 105th Lane, it is moving in the direction of the track number increment. An existing magnetic
The access request sequence is 35,45,12,68,110,180,170,195, using the SCAN schedule (elevator
The track access sequence obtained by the algorithm is ____a__.
a.110,170,180,195,68,45,35,12 b.110,68,45,35,12,170,180,195
c.110,170,180,195,12,35,45,68 d.12,35,45,68,110,170,180,195
Scan scheduling (elevator scheduling) algorithm: Elevator scheduling algorithm based on the daily life of the elevator working mode: The elevator keeps moving in one direction, until there is no request in that direction, and then change the direction. reflected on the disk schedule, the I/O request closest to the current position of the head is always selected along the moving direction of the moving arm as the next scheduled object. If there are no I/O requests in that direction, change the direction and make the selection. Assuming that the head is currently in the 105th Lane, it is moving in the direction of the track number increment. Now a track access request sequence is 35,45,12,68,110,180,170,195, using scan scheduling (the track access sequence obtained by the elevator scheduling algorithm is: 110,170,180,195,68,45,35,12.
22. In the file system, the logical location of the file access control information store is __a____.
A. File control block B. File allocation table c. User password table D. System registry
A file control block is a set of fixed-format data structures that the operating system sets up to manage files, storing all the attribute information (file attributes or metadata) that is required to manage files.
The file allocation table, the FAT (Allocation table), is used to record the table where the file is located.
23. Set the current reference count value of file F1 to 1, first establish the F1 Symbolic link (soft link) file F2,
Re-establish the F1 hard-link file F3, and then delete the F1. At this point, the reference count values for F2 and F3
___b___, respectively.
A. 0, 1 B.1, 1 C.1, 2 D.2, 1
Hard link: There is a copy of the contents of the file on disk, but does not change the inode of the file, that is, to share the inode with the original file.
Soft Link: Does not have a copy of the contents of the disk on the same file generated, but create a new inode.
24. When a programmer uses a system call to open an I/O device, the device identity that is typically used is ___a___.
A. Logical device name B. Physical device name C. Master device number D. From the device number
What programmers see is the device's logical device name
Choice of operating system principle