recitation os
Reading: We did nothing wrong¶
主要讲了个软件出错然后辐射量增大导致病人死亡或得癌症的事件。本来FDA不管软件的事,但造成伤亡后开始进行监管。质检机制只能减少这种情况,很难消除。然后讲了措施避免这样的问题,其中一条就是提高从业人员的专业门槛。我个人的看法是提高专业门槛是有必要的,但是这门槛不能简单用标化成绩或者学位证来衡量。
注:之前卡在这儿的原因是,十页以上的英文阅读真不知道如何读起?😭现在知道咋读了。
R: DNS¶
The internet domain name system is designed for the communication between client and server. The primary purpose of DNS is to associate domain names to internet addresses.
DNS的设计主要从三个部分看:
-
name resolution
Design of structures
it can be designed in three ways:Telephone book model, the central directory service model and the distributed directory service model.
Telephone book model gives one big file to every machine. The volume of network traffic required to keep it up to date would grow with the cube of the number of domain names.
Central view is one powerful machine with one big table.That machine is hit with a ton of requests, which leads to a trade-off between a performance bottleneck and a potential source of massive failure.
Distributed view provides delegation and respond to increases in scale while maintaining reliability and performance.
Operations
- Name client makes a request. Its DNS_RESOLVE sends that domain name to a root name server
- recursive part:The root name server matches the name in the request with the subset of domain names it knows about,starting with the most significant component of the requested domain name. If matching, respond with both domain names and internet addresses.
- DNS_RESOLVE receives the response and resends the same name resolution request to what the response is.
- Repeat operations above until DNS_RESOLVE finally reaches the the name server we wants.
Details
-
cache in name server and recursive names query
A server that provides recursive name service thus collects records that can greatly speed up future name resolution requests.
Fact: cache uses expiration instead of explicit invalidation of changed entries.
A DNS cache manager is expected to discard entries that have passed their expiration period.
由于name server发出的请求总是会在recursive name的范围中,那么请求次数较多的网址在缓存中保存的期限就会更长。从而增加了hit ratio。
-
hierarchical name management
- Benefits: decentralization->distributing responsibility and Independent naming authorities(path name different).
- Drawbacks?
-
name discovery
- How this address gets into the configuration table?
- Domain names
- the extension that is used for unqualified domain names.
-
Other features
Problem1: 如果总服务器着火了,那么连接就断了,那该怎么上网?
Problem2: 如果我想要去的地址改变了地址,那我还怎么找到它?
- 备份: replica of servers and network services to increase fault-tolerance
- Fact: the importance of separated attachment increases at higher levels of the naming hierarchy.
- Robust design of DNS
- DNS server’s public interface is idempotent
- DNS server’s job is simple: accept a request packet, search a table, and send a response packet.
- 重定向
- Maintenance: the names of services can be expected to outlive their bindings to particular Internet addresses, and synonyms cater to this difference in lifetimes.
- allow a single computer to appear to be in two widely different naming domains
- 备份: replica of servers and network services to increase fault-tolerance
-
trustworthiness of dns response: authentication and accuracy
Paper: UNIX¶
历史:UNIX是一个很棒的操作系统,现代的许多os都是从unix出发,它的历史可以追溯到70年代,贝尔实验室的研究员为了摆脱现有的糟糕的可用计算机设施而研制出的,之后再逐渐添加了新的功能。它并不是从一开始就从设计上决定的,但为了适合研究员编程的需要而逐渐添加的功能使它最后成为了虽然小但是功能强大的操作系统。
basic structures¶
UNIX 的设计可以分为四部分:
-
file system
-
Naming in file system applies layering and hierarchy like that in DNS.
-
The file can be divided into: ordinary files, directories, special files.
-
operations on files
- create
- open
- write
- read
- delete
-
Implementations:
- When the file is accessed, the i-number is used as an index into a system table(the i-list) stored somewhere.
- The entry thereby found is file’s i-node.
-
-
process
- Create a new process
- Pipes: communication between processes using the read and write calls
- execute
- Process synchronization: wait()
- Terminate a process
-
shell
- Standard I/O
- filters
- Command separators to perform multitasking
- Command files
- Implementations
-
Traps
- illegal action
- Unwanted command
- Quit