Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Modern operating system (1)-- introduction

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

What is multiprogramming?

Multiprogramming is the division of memory into sections, each of which stores different jobs, such as:

While one job waits for an I/O operation to complete, another job can use the CPU. If enough jobs can be stored in memory at the same time, CPU utilization can be close to 100%, and multiple jobs residing in memory at the same time require special hardware to protect them from theft or exposure.

2. What is SPOOLING? Do you think future advanced personal computers will include SPOOLing as a standard feature?

When a job finishes running, the operating system can read a new job from disk and load it into the empty memory area to run. This technique is called SPOOLing(simultaneous external device online operation).

3. In early computers, each byte read or write was handled directly by the CPU (i.e., no DMA). What does this organization mean for multi-channel programs?

4. Has the idea of serial computers died out or is it alive and well since it was introduced by IBM into the System/360 mainframe in the 1960s?

5. One reason for the slow adoption of GUIs is the cost (high) of the hardware to support them. How much video RAM should I need to support a monochrome text screen with 25 lines and 80 columns of characters? How much video RAM is needed for a 1024*768 pixel 24 color bitmap? How much did this RAM cost in 1980 ($5/kb)? What does it cost now? What does it cost now?

6. There are several design goals in building an operating system, such as resource utilization, timeliness, robustness, etc. List two potentially conflicting design goals.

7. Which of the following instructions can only be used in kernel mode?

a) All interrupts are disabled

b) Read the date-time clock

c) Set date-time clock

d) Change memory mapping

8. Consider a system with two CPUs and two threads per CPU. Suppose there are three programs, P0, P1, P2, starting at 5ms, 10ms, and 20ms, respectively. How long does it take to run these programs? Assume that all three programs are 100% CPU-limited, run without blocking, and do not change CPU once set.

9. A computer has a four-stage pipeline, and each stage takes the same amount of time to perform its task, i.e. 1ns. How many instructions per second can this machine execute?

10. Suppose a computer system has cache, memory (RAM), and disks, and the operating system uses virtual memory. Reading a word from cache takes 2 ns, RAM 10ns, and disk 10 ms. If cache hit rate is 95%, memory hit rate is 99%, what is the average time to read a word?

11. A school team member noticed a repeated spelling error in a forthcoming manuscript of an operating system. The book is roughly 700 pages, 50 lines each and 80 characters each. How long does it take for the master copy to enter each storage system hierarchy if the document is scanned electronically? For internal storage, consider that the given storage time is one character at a time, for magnetic disk devices, the access time is assumed to be one disk block of 1024 characters at a time, and for magnetic tape, the access time after the given start time is assumed to be the same as the disk access time.

12. When a user program makes a system call to read or write a disk file, the program provides an indication of the file required, a pointer to the data buffer, and a count. Control then passes to the operating system, which calls the relevant driver, assuming that the driver starts the disk and does not terminate until an interrupt occurs, and in the case of reading from disk, the caller is blocked (because there is no data in the file). What happens when writing to disk? Do I need to block callers until the disk transfer is complete?

13. What is a trap command? Explain its purpose in the operating system

14. What is the main difference between traps and interrupts?

15. Why do I need a schedule in a timesharing system? In a PC system where there is only one process that controls the entire machine until the process ends, does this machine also need a process list?

16. Is there a reason to mount a file system in a non-empty directory? If so, how?

17. What is the purpose of system calls in an operating system?

18. For the following system calls, give the conditions that cause failures: fork, exec, and unlink.

19. In the count=write(fd,buffer,nbytes); call, can the value be returned in count instead of nbytes? If so, why?

20. There is a file whose file descriptor is fd and contains the following byte sequence: 3,1,4,1,5,9,2,6,5,3,5. There are the following system calls:

lseek(fd,3,SEEK_SET);

read(fd,&buffer,4);

Where the lseek call looks for bytes in the file 3. What is the content of the buffer after the read operation is complete?

21. Suppose a 10MB file exists on the same track (track number: 50) of consecutive sectors of disk. The disk head arm is now in track 100. How long will it take to retrieve this file from disk? Suppose it takes 1ms for the head arm to move from one cylinder to the next, 5ms for the sector stored at the beginning of the file to rotate under the head, and the read rate is 100MB/s.

What is the basic difference between block special files and character special files?

23. In the example of Figure 1-17, the library call is called read, and the system call itself is called read. Is it normal for both to have the same name? If not, which is more important?

24. In distributed systems, the client-server model is common. Can this model be used in a single computer system?

25. For programmers, system calls are just like calls to other library procedures. Is it necessary for programmers to know which library procedure caused the system call? Under what circumstances and why?

26. Figure 1-23 illustrates a number of UNIX system calls that do not have an equivalent Win32 API. For each of the listed calls that do not have Win32 equivalents, what happens if you convert a UNIX program to run under Windows?

27. A portable operating system is one that can be moved from one system architecture to another without any modification. Why building a fully portable operating system is not feasible, describe what the advanced two layers look like when designing a highly portable operating system.

28. Explain the benefits of separating policies from mechanisms when building microkernel-based operating systems

29. Here's how to convert units

a) How many seconds is a microyear?

b) Microns are often referred to as microns. How long is gigamicron?

c) How many bytes are in 1TB of memory?

d) The mass of the Earth is 6000 yottagrams, what is that in kilograms?

30. Write a shell similar to Figure 1-19, but with enough code to actually work, and fill in features such as input/output redirection, pipelines, and background jobs.

31. If you have a personal UNIX-like operating system (Linux, MINIX, Free BSD) that can safely crash and restart, write a shell script that tries to create an unlimited number of child processes and watch what happens. Before running, prepare file buffers on disk to avoid file system corruption by shell typing sync.

32. Use a program similar to UNIX od or MS-DOS DEBUG to examine and attempt to interpret the directories of UNIX-like systems or Windows.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report